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_r358837954
########## 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)); + } + } + + public void readKey(ByteBuffer buffer, String keyName) throws Exception { + readKey(isFsOp(), buffer, keyName); + } + + public void readKey(boolean fsOp, ByteBuffer buffer, + String keyName) throws Exception { + LOG.info("LOADGEN: {} Reading key {}", fsOp, keyName); Review comment: `fsOp` is boolean, the log message will not be easy to understand without looking at the code. ---------------------------------------------------------------- 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