You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/08/13 15:35:45 UTC

[GitHub] [hadoop] adoroszlai commented on a change in pull request #1287: HDDS-1956. Aged IO Thread exits on first read

adoroszlai commented on a change in pull request #1287: HDDS-1956. Aged IO Thread exits on first read
URL: https://github.com/apache/hadoop/pull/1287#discussion_r313467570
 
 

 ##########
 File path: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneLoadGenerator.java
 ##########
 @@ -201,11 +210,12 @@ private void startAgedFilesLoad(long runTimeMillis) {
       String keyName = null;
       try {
         if (agedWriteProbability.isTrue()) {
-          keyName = writeData(agedFileWrittenIndex.incrementAndGet(),
+          keyName = writeData(agedFileWrittenIndex.getAndIncrement(),
               agedLoadBucket, threadName);
         } else {
-          keyName = getKeyToRead();
-          if (keyName != null) {
+          Optional<Integer> index = randomKeyToRead();
+          if (index.isPresent()) {
+            keyName = getKeyName(index.get(), threadName);
             readData(agedLoadBucket, keyName);
 
 Review comment:
   OK, makes sense.

----------------------------------------------------------------
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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org