[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #272: HDDS-2629. Ozone CLI: CreationTime/modifyTime of volume/bucket/key in…

2019-11-29 Thread GitBox
adoroszlai commented on a change in pull request #272: HDDS-2629. Ozone CLI: 
CreationTime/modifyTime of volume/bucket/key in…
URL: https://github.com/apache/hadoop-ozone/pull/272#discussion_r351807634
 
 

 ##
 File path: hadoop-hdds/common/pom.xml
 ##
 @@ -147,6 +147,11 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd";>
   snakeyaml
   1.16
 
+
+  com.fasterxml.jackson.datatype
+  jackson-datatype-jsr310
+  2.9.8
 
 Review comment:
   Can it use `${jackson2.version}` (currently 2.9.9) defined in root `pom.xml`?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org



[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #272: HDDS-2629. Ozone CLI: CreationTime/modifyTime of volume/bucket/key in…

2019-11-29 Thread GitBox
adoroszlai commented on a change in pull request #272: HDDS-2629. Ozone CLI: 
CreationTime/modifyTime of volume/bucket/key in…
URL: https://github.com/apache/hadoop-ozone/pull/272#discussion_r352098332
 
 

 ##
 File path: 
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/web/ozShell/TestObjectPrinter.java
 ##
 @@ -40,11 +40,13 @@ public void printObjectAsJson() throws IOException {
 OzoneConfiguration conf = new OzoneConfiguration();
 OzoneVolume volume =
 new OzoneVolume(conf, Mockito.mock(ClientProtocol.class), "name",
-"admin", "owner", 1L, 0L,
+"admin", "owner", 1L, Instant.ofEpochMilli(0).toEpochMilli(),
 
 Review comment:
   This seems a complex way of writing `0`.  If the intention is to avoid 
hard-coding the value, I think this one would be simpler:
   
   ```
   Instant.EPOCH.toEpochMilli()
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org



[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #272: HDDS-2629. Ozone CLI: CreationTime/modifyTime of volume/bucket/key in…

2019-11-29 Thread GitBox
adoroszlai commented on a change in pull request #272: HDDS-2629. Ozone CLI: 
CreationTime/modifyTime of volume/bucket/key in…
URL: https://github.com/apache/hadoop-ozone/pull/272#discussion_r352096478
 
 

 ##
 File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHA.java
 ##
 @@ -228,7 +228,8 @@ public void testAllBucketOperations() throws Exception {
 Assert.assertEquals(bucketName, ozoneBucket.getName());
 Assert.assertTrue(ozoneBucket.getVersioning());
 Assert.assertEquals(StorageType.DISK, ozoneBucket.getStorageType());
-Assert.assertTrue(ozoneBucket.getCreationTime() <= Time.now());
+Assert.assertTrue(ozoneBucket.getCreationTime().compareTo(
+Instant.now()) <= 0);
 
 Review comment:
   I think using `isAfter`/`isBefore` would be easier to understand at a glance.
   
   ```
   assertFalse(ozoneBucket.getCreationTime().isAfter(Instant.now()))
   ```
   
   (I hope I got the conversion right).
   
   Similarly in all other places where `compareTo()` is used.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org