@Test public void roundToSeconds() throws Exception { DateTime d = new DateTime(2016, 7, 7, 10, 11, 23, 123); Date d2 = EsDailySnapshotInstance.roundToSeconds(d.toDate()); Assert.assertEquals(d2.getTime(), d.getMillis() - 123); }
public static final Date roundToSeconds(Date dt) { if (dt != null) { return new Date(dt.getTime() / 1000 * 1000); } return dt; }
EsDailySnapshotInstance implements EsDocument { public static final Date roundToSeconds(Date dt) { if (dt != null) { return new Date(dt.getTime() / 1000 * 1000); } return dt; } }
EsDailySnapshotInstance implements EsDocument { public static final Date roundToSeconds(Date dt) { if (dt != null) { return new Date(dt.getTime() / 1000 * 1000); } return dt; } EsDailySnapshotInstance(); @JsonCreator  EsDailySnapshotInstance(@JsonProperty("config") EsInstanceConfig config);  EsDailySnapshotInstance(PinterestEsInstance esInstance); }
EsDailySnapshotInstance implements EsDocument { public static final Date roundToSeconds(Date dt) { if (dt != null) { return new Date(dt.getTime() / 1000 * 1000); } return dt; } EsDailySnapshotInstance(); @JsonCreator  EsDailySnapshotInstance(@JsonProperty("config") EsInstanceConfig config);  EsDailySnapshotInstance(PinterestEsInstance esInstance); static final Date roundToSeconds(Date dt); static final String getStringOfPeriod(Date begin, Date end); String getRegion(); void setRegion(String region); String getLocation(); void setLocation(String location); String getNodePool(); void setNodePool(String nodePool); String getState(); void setState(String state); String getDeployment(); void setDeployment(String deployment); Date getLaunchTime(); void setLaunchTime(Date launchTime); String[] getServiceMappings(); void setServiceMappings(String[] serviceMappings); String[] getServiceTag(); void setServiceTag(String[] serviceTag); String[] getSysTag(); void setSysTag(String[] sysTag); String[] getUsageTag(); void setUsageTag(String[] usageTag); List<String> getSecurityGroups(); void setSecurityGroups(List<String> securityGroups); String getLifecycle(); void setLifecycle(String lifecycle); String getType(); void setType(String type); String getName(); void setName(String name); Date getTerminateTime(); void setTerminateTime(Date terminateTime); String getRunTime(); void setRunTime(String runTime); String getId(); void setId(String id); long getVersion(); void setVersion(long version); @JsonProperty("config") void setConfig(Map<String, Object> foo); Map<String, Object[]> findDiff(EsDailySnapshotInstance inst); }
EsDailySnapshotInstance implements EsDocument { public static final Date roundToSeconds(Date dt) { if (dt != null) { return new Date(dt.getTime() / 1000 * 1000); } return dt; } EsDailySnapshotInstance(); @JsonCreator  EsDailySnapshotInstance(@JsonProperty("config") EsInstanceConfig config);  EsDailySnapshotInstance(PinterestEsInstance esInstance); static final Date roundToSeconds(Date dt); static final String getStringOfPeriod(Date begin, Date end); String getRegion(); void setRegion(String region); String getLocation(); void setLocation(String location); String getNodePool(); void setNodePool(String nodePool); String getState(); void setState(String state); String getDeployment(); void setDeployment(String deployment); Date getLaunchTime(); void setLaunchTime(Date launchTime); String[] getServiceMappings(); void setServiceMappings(String[] serviceMappings); String[] getServiceTag(); void setServiceTag(String[] serviceTag); String[] getSysTag(); void setSysTag(String[] sysTag); String[] getUsageTag(); void setUsageTag(String[] usageTag); List<String> getSecurityGroups(); void setSecurityGroups(List<String> securityGroups); String getLifecycle(); void setLifecycle(String lifecycle); String getType(); void setType(String type); String getName(); void setName(String name); Date getTerminateTime(); void setTerminateTime(Date terminateTime); String getRunTime(); void setRunTime(String runTime); String getId(); void setId(String id); long getVersion(); void setVersion(long version); @JsonProperty("config") void setConfig(Map<String, Object> foo); Map<String, Object[]> findDiff(EsDailySnapshotInstance inst);  }