You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2019/12/17 15:14:49 UTC

[GitHub] [hadoop-ozone] nandakumar131 commented on a change in pull request #344: HDDS-2710. Add Filesystem functionality in MiniOzoneChaosCluster.

nandakumar131 commented on a change in pull request #344: HDDS-2710. Add Filesystem functionality in MiniOzoneChaosCluster.
URL: https://github.com/apache/hadoop-ozone/pull/344#discussion_r358836442
 
 

 ##########
 File path: hadoop-ozone/fault-injection-test/mini-chaos-tests/src/test/java/org/apache/hadoop/ozone/utils/LoadBucket.java
 ##########
 @@ -60,12 +89,28 @@ public void writeData(ByteBuffer buffer, String keyName) throws Exception {
     }
   }
 
-  public void readData(ByteBuffer buffer, String keyName) throws Exception {
-    LOG.debug("LOADGEN: Reading key {}", keyName);
+  // Read ops.
+
+  private InputStream getInputStream(boolean fsOp,
+                                     String fileName) throws Exception {
+    if (fsOp) {
+      return bucket.readKey(fileName);
+    } else {
+      return fs.open(new Path("/", fileName));
+    }
 
 Review comment:
   Shouldn't the logic inside `if` and `else` be other way around? Or the condition `!fsOp`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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