Skip to content

Conversation

@bharatviswa504
Copy link
Contributor

No description provided.

@bharatviswa504 bharatviswa504 self-assigned this Apr 9, 2019
@bharatviswa504 bharatviswa504 changed the title HDDS-1406. Avoid using of commonPool in RatisPipelineUtils. HDDS-1406. Avoid usage of commonPool in RatisPipelineUtils. Apr 9, 2019
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 455 Docker mode activated.
_ Prechecks _
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
-1 mvninstall 1316 root in trunk failed.
+1 compile 64 trunk passed
+1 checkstyle 22 trunk passed
+1 mvnsite 35 trunk passed
+1 shadedclient 749 branch has no errors when building and testing our client artifacts.
+1 findbugs 45 trunk passed
+1 javadoc 25 trunk passed
_ Patch Compile Tests _
+1 mvninstall 35 the patch passed
+1 compile 27 the patch passed
+1 javac 27 the patch passed
+1 checkstyle 15 the patch passed
+1 mvnsite 26 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 804 patch has no errors when building and testing our client artifacts.
+1 findbugs 46 the patch passed
+1 javadoc 19 the patch passed
_ Other Tests _
+1 unit 97 server-scm in the patch passed.
+1 asflicense 26 The patch does not generate ASF License warnings.
3884
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-714/1/artifact/out/Dockerfile
GITHUB PR #714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 131df6f78a2d 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 312d4d4
maven version: Apache Maven 3.3.9
Default Java 1.8.0_191
mvninstall https://builds.apache.org/job/hadoop-multibranch/job/PR-714/1/artifact/out/branch-mvninstall-root.txt
findbugs v3.1.0-RC1
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-714/1/testReport/
Max. process+thread count 394 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm U: hadoop-hdds/server-scm
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-714/1/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to make submit call for each datanode.

Copy link
Contributor

@lokeshj1703 lokeshj1703 Apr 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use a simple executor as fork join pool is an executor for fork join tasks. Also we can always keep the number of threads to three as there is a network call involved in the task.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used ForkJoinPool can be used for normal tasks also. Refer NonFrok Join Clients.
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ForkJoinPool.html

Used this ForJoinPool here to take advantage of its WorkSteal Algorithm in allocating/claiming threads. I think this might be useful. More can be read from the documentation.

And if no of available processors is less than 3, even setting to 3 will not have any advantage. This is the reason for setting this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use three threads as these threads would ultimately be blocked on network IO and will not be CPU intensive. Also we need to shutdown the fork join pool.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bharatviswa504
Copy link
Contributor Author

/retest

@bharatviswa504
Copy link
Contributor Author

Thank You @arp7 for offline review comments.
I have fixed them.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 41 Docker mode activated.
_ Prechecks _
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 mvninstall 1130 trunk passed
+1 compile 30 trunk passed
+1 checkstyle 20 trunk passed
+1 mvnsite 31 trunk passed
+1 shadedclient 781 branch has no errors when building and testing our client artifacts.
+1 findbugs 48 trunk passed
+1 javadoc 23 trunk passed
_ Patch Compile Tests _
+1 mvninstall 37 the patch passed
+1 compile 26 the patch passed
+1 javac 26 the patch passed
+1 checkstyle 15 the patch passed
+1 mvnsite 30 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 788 patch has no errors when building and testing our client artifacts.
+1 findbugs 54 the patch passed
+1 javadoc 20 the patch passed
_ Other Tests _
-1 unit 119 server-scm in the patch failed.
+1 asflicense 29 The patch does not generate ASF License warnings.
3297
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-714/2/artifact/out/Dockerfile
GITHUB PR #714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 74a655c7064c 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / a0468c5
maven version: Apache Maven 3.3.9
Default Java 1.8.0_191
findbugs v3.1.0-RC1
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-714/2/artifact/out/patch-unit-hadoop-hdds_server-scm.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-714/2/testReport/
Max. process+thread count 354 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm U: hadoop-hdds/server-scm
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-714/2/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@bharatviswa504
Copy link
Contributor Author

Thank You @lokeshj1703 for the review.
Fixed review comments.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 25 Docker mode activated.
_ Prechecks _
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 mvninstall 1066 trunk passed
+1 compile 49 trunk passed
+1 checkstyle 22 trunk passed
+1 mvnsite 32 trunk passed
+1 shadedclient 665 branch has no errors when building and testing our client artifacts.
+1 findbugs 46 trunk passed
+1 javadoc 28 trunk passed
_ Patch Compile Tests _
+1 mvninstall 36 the patch passed
+1 compile 27 the patch passed
+1 javac 27 the patch passed
+1 checkstyle 16 the patch passed
+1 mvnsite 27 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 748 patch has no errors when building and testing our client artifacts.
+1 findbugs 48 the patch passed
+1 javadoc 22 the patch passed
_ Other Tests _
+1 unit 98 server-scm in the patch passed.
+1 asflicense 29 The patch does not generate ASF License warnings.
3077
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-714/4/artifact/out/Dockerfile
GITHUB PR #714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 98a0fe5d23aa 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 0c1fec3
maven version: Apache Maven 3.3.9
Default Java 1.8.0_191
findbugs v3.1.0-RC1
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-714/4/testReport/
Max. process+thread count 411 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm U: hadoop-hdds/server-scm
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-714/4/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 63 Docker mode activated.
_ Prechecks _
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 mvninstall 1109 trunk passed
+1 compile 31 trunk passed
+1 checkstyle 21 trunk passed
+1 mvnsite 31 trunk passed
+1 shadedclient 777 branch has no errors when building and testing our client artifacts.
+1 findbugs 40 trunk passed
+1 javadoc 24 trunk passed
_ Patch Compile Tests _
+1 mvninstall 33 the patch passed
+1 compile 25 the patch passed
+1 javac 25 the patch passed
+1 checkstyle 14 the patch passed
+1 mvnsite 26 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 809 patch has no errors when building and testing our client artifacts.
+1 findbugs 45 the patch passed
+1 javadoc 19 the patch passed
_ Other Tests _
+1 unit 182 server-scm in the patch passed.
+1 asflicense 26 The patch does not generate ASF License warnings.
3380
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-714/3/artifact/out/Dockerfile
GITHUB PR #714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 4c374b190af4 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 0c1fec3
maven version: Apache Maven 3.3.9
Default Java 1.8.0_191
findbugs v3.1.0-RC1
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-714/3/testReport/
Max. process+thread count 394 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm U: hadoop-hdds/server-scm
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-714/3/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shutdown will wait for previously submitted tasks to complete. You can probably call shutdownNow since we don't care about the completion on shutdown.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bharatviswa504
Copy link
Contributor Author

Thank You @arp7 for the review.
Addressed review comments.

Copy link
Contributor

@arp7 arp7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Bharat. A couple of more minor comments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't log here, just throw IOException that wraps the ExecutionException.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, don't log.

Copy link
Contributor Author

@bharatviswa504 bharatviswa504 Apr 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging here, because in the actual createPipelines method in BackGroudPipelineCreator which calls this method when we throw IOException they break from while loop. That is the reason for the logging. Let me know if we still don't want to log here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That method is already logging right:

          pipelineManager.createPipeline(type, factor);
        } catch (IOException ioe) {
          break;
        } catch (Throwable t) {
          LOG.error("Error while creating pipelines {}", t);
          break;
        }

So if we log here the exception will be logged twice. Perhaps I'm looking at it wrong.

Copy link
Contributor Author

@bharatviswa504 bharatviswa504 Apr 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We return IOException, so in case of IOException we have no logging right?
It has only break;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simplify the code a bit by catching multiple exceptions in one clause. e.g.
catch(ExecutionException|RejectedExecutionException e)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 41 Docker mode activated.
_ Prechecks _
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 mvninstall 1119 trunk passed
+1 compile 69 trunk passed
+1 checkstyle 24 trunk passed
+1 mvnsite 33 trunk passed
+1 shadedclient 765 branch has no errors when building and testing our client artifacts.
+1 findbugs 42 trunk passed
+1 javadoc 24 trunk passed
_ Patch Compile Tests _
+1 mvninstall 34 the patch passed
+1 compile 24 the patch passed
+1 javac 24 the patch passed
+1 checkstyle 15 the patch passed
+1 mvnsite 26 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 826 patch has no errors when building and testing our client artifacts.
+1 findbugs 46 the patch passed
+1 javadoc 19 the patch passed
_ Other Tests _
-1 unit 101 server-scm in the patch failed.
+1 asflicense 26 The patch does not generate ASF License warnings.
3298
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-714/5/artifact/out/Dockerfile
GITHUB PR #714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux cfa19566ca15 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / b5dcf64
maven version: Apache Maven 3.3.9
Default Java 1.8.0_191
findbugs v3.1.0-RC1
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-714/5/artifact/out/patch-unit-hadoop-hdds_server-scm.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-714/5/testReport/
Max. process+thread count 342 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm U: hadoop-hdds/server-scm
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-714/5/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

@bharatviswa504
Copy link
Contributor Author

/retest

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 26 Docker mode activated.
_ Prechecks _
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 mvninstall 1049 trunk passed
+1 compile 34 trunk passed
+1 checkstyle 25 trunk passed
+1 mvnsite 34 trunk passed
+1 shadedclient 733 branch has no errors when building and testing our client artifacts.
+1 findbugs 58 trunk passed
+1 javadoc 26 trunk passed
_ Patch Compile Tests _
+1 mvninstall 38 the patch passed
+1 compile 24 the patch passed
+1 javac 24 the patch passed
+1 checkstyle 16 the patch passed
+1 mvnsite 26 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 737 patch has no errors when building and testing our client artifacts.
+1 findbugs 46 the patch passed
+1 javadoc 21 the patch passed
_ Other Tests _
-1 unit 106 server-scm in the patch failed.
+1 asflicense 29 The patch does not generate ASF License warnings.
3100
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-714/6/artifact/out/Dockerfile
GITHUB PR #714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 39bcea67402b 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / b5dcf64
maven version: Apache Maven 3.3.9
Default Java 1.8.0_191
findbugs v3.1.0-RC1
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-714/6/artifact/out/patch-unit-hadoop-hdds_server-scm.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-714/6/testReport/
Max. process+thread count 445 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm U: hadoop-hdds/server-scm
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-714/6/console
Powered by Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please check if one of the threads is not used up in waiting for parallel stream to finish execution? If it does then there are only two threads available for making a rpc call.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid making it static? The problem with static occurs in the MiniOzoneCluster tests. Once SCM is stopped by one of the tests, the fork join pool will be shutdown and will not be available again for execution. I think this might be a reason for unit test failures.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bharatviswa504
Copy link
Contributor Author

Test failures are not related to this patch.
I will commit this shortly.

@bharatviswa504
Copy link
Contributor Author

Thank You @lokeshj1703 for the review.
I have addressed the review comments.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 30 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
0 mvndep 61 Maven dependency ordering for branch
+1 mvninstall 391 trunk passed
+1 compile 197 trunk passed
+1 checkstyle 46 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 786 branch has no errors when building and testing our client artifacts.
+1 javadoc 122 trunk passed
0 spotbugs 239 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 425 trunk passed
_ Patch Compile Tests _
0 mvndep 28 Maven dependency ordering for patch
+1 mvninstall 439 the patch passed
+1 compile 192 the patch passed
+1 javac 192 the patch passed
-0 checkstyle 28 hadoop-hdds: The patch generated 4 new + 0 unchanged - 0 fixed = 4 total (was 0)
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 631 patch has no errors when building and testing our client artifacts.
+1 javadoc 121 the patch passed
+1 findbugs 430 the patch passed
_ Other Tests _
-1 unit 131 hadoop-hdds in the patch failed.
-1 unit 1308 hadoop-ozone in the patch failed.
+1 asflicense 38 The patch does not generate ASF License warnings.
6389
Reason Tests
Failed junit tests hadoop.ozone.client.rpc.TestWatchForCommit
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-714/7/artifact/out/Dockerfile
GITHUB PR #714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux b4b5ff3f75e2 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / b832e17
Default Java 1.8.0_191
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-714/7/artifact/out/diff-checkstyle-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-714/7/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-714/7/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-714/7/testReport/
Max. process+thread count 5060 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm hadoop-ozone/integration-test U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-714/7/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.


PipelineFactory(NodeManager nodeManager, PipelineStateManager stateManager,
Configuration conf) {
Configuration conf, RatisPipelineUtils ratisPipelineUtils) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bharatviswa504 Thanks for adding the changes! An instance of RatisPipelineUtils does not seem right as it is a utility class. Could we move the functions of RatisPipelineUtils to RatisPipelineProvider instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@bharatviswa504
Copy link
Contributor Author

Thank You @lokeshj1703 for the review.
I have addressed review comments.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 29 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 3 new or modified test files.
_ trunk Compile Tests _
0 mvndep 62 Maven dependency ordering for branch
+1 mvninstall 395 trunk passed
+1 compile 199 trunk passed
+1 checkstyle 51 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 818 branch has no errors when building and testing our client artifacts.
+1 javadoc 126 trunk passed
0 spotbugs 240 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 416 trunk passed
-0 patch 274 Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
0 mvndep 27 Maven dependency ordering for patch
+1 mvninstall 392 the patch passed
+1 compile 206 the patch passed
+1 javac 206 the patch passed
-0 checkstyle 31 hadoop-hdds: The patch generated 17 new + 0 unchanged - 0 fixed = 17 total (was 0)
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 650 patch has no errors when building and testing our client artifacts.
+1 javadoc 114 the patch passed
+1 findbugs 440 the patch passed
_ Other Tests _
-1 unit 129 hadoop-hdds in the patch failed.
-1 unit 1493 hadoop-ozone in the patch failed.
+1 asflicense 31 The patch does not generate ASF License warnings.
5762
Reason Tests
Failed junit tests hadoop.ozone.container.common.statemachine.commandhandler.TestBlockDeletion
hadoop.ozone.client.rpc.TestBCSID
hadoop.ozone.client.rpc.TestContainerStateMachineFailures
hadoop.ozone.client.rpc.TestOzoneRpcClient
hadoop.ozone.web.TestOzoneRestWithMiniCluster
hadoop.ozone.TestContainerStateMachineIdempotency
hadoop.ozone.client.rpc.TestHybridPipelineOnDatanode
hadoop.ozone.scm.TestGetCommittedBlockLengthAndPutKey
hadoop.ozone.client.rpc.TestOzoneAtRestEncryption
hadoop.ozone.scm.TestContainerSmallFile
hadoop.ozone.client.rpc.TestContainerStateMachine
hadoop.ozone.client.rpc.TestWatchForCommit
hadoop.ozone.client.rpc.TestOzoneRpcClientWithRatis
hadoop.ozone.om.TestOzoneManagerHA
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-714/8/artifact/out/Dockerfile
GITHUB PR #714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux b68105a4635e 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 5847e00
Default Java 1.8.0_191
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-714/8/artifact/out/diff-checkstyle-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-714/8/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-714/8/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-714/8/testReport/
Max. process+thread count 5275 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm hadoop-ozone/integration-test U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-714/8/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 49 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 3 new or modified test files.
_ trunk Compile Tests _
0 mvndep 66 Maven dependency ordering for branch
+1 mvninstall 408 trunk passed
+1 compile 198 trunk passed
+1 checkstyle 53 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 898 branch has no errors when building and testing our client artifacts.
+1 javadoc 125 trunk passed
0 spotbugs 239 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 422 trunk passed
-0 patch 266 Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
0 mvndep 24 Maven dependency ordering for patch
+1 mvninstall 395 the patch passed
+1 compile 199 the patch passed
+1 javac 199 the patch passed
+1 checkstyle 57 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 703 patch has no errors when building and testing our client artifacts.
+1 javadoc 121 the patch passed
+1 findbugs 436 the patch passed
_ Other Tests _
-1 unit 148 hadoop-hdds in the patch failed.
-1 unit 1249 hadoop-ozone in the patch failed.
+1 asflicense 34 The patch does not generate ASF License warnings.
5662
Reason Tests
Failed junit tests hadoop.ozone.client.rpc.TestBlockOutputStreamWithFailures
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-714/10/artifact/out/Dockerfile
GITHUB PR #714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux c9ed3643581d 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 389e640
Default Java 1.8.0_191
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-714/10/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-714/10/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-714/10/testReport/
Max. process+thread count 4620 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm hadoop-ozone/integration-test U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-714/10/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

}

@VisibleForTesting
public PipelineProvider getProvider(ReplicationType type) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to expose this api for now. In the test where it is used, we can call pipelineManager.createPipeline instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


void triggerPipelineCreation();

PipelineFactory getPipelineFactory();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to expose this api as well. The shutdown for pipelineFactory should be called from PipelineManager itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


@Override
public void shutdown() {
forkJoinPool.shutdownNow();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also wait for the tasks to finish. We need to use awaitTermination call. We can use timeout of 60 seconds? That is what is used in Scheduler class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done based on arpit's comment, as on an unclean shutdown this terminate abruptly. So we can use shutdownNow(), instead of awaitTermination in normal case too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bharatviswa504 I agree. We need to use shutdownNow but we also need to use awaitTermination. shutdownNow would interrupt the running tasks but the running task should handle the interrupt. If the task does not exit on interrupt, it is a better idea to wait for the task to finish.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

(pool -> {
final ForkJoinWorkerThread worker = ForkJoinPool.
defaultForkJoinWorkerThreadFactory.newThread(pool);
worker.setName("ratisCreatePipeline" + worker.getPoolIndex());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT - "ratisCreatePipeline" - Can we make it all capital?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

* @param pipeline - Pipeline to be created
* @throws IOException if creation fails
*/
public void createPipeline(Pipeline pipeline)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this fn and replace it with initializePipeline.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}

@Override
public PipelineFactory getPipelineFactory() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dont need to expose this api. We can add a shutdown call for the pipelineFactory in the SCMPipelineManager#close fn.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


@Override
public void shutdown() {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT - Can we add a comment like //do nothing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}

// shutdown pipeline provider.
pipelineManager.getPipelineFactory().shutdown();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


@Override
public void shutdown() {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT - Can we add a comment like // do nothing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

HddsProtos.ReplicationType.RATIS);
try {
RatisPipelineUtils.createPipeline(pipelines.get(0), conf);
ratisPipelineProvider.createPipeline(pipelines.get(0));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use pipelineManager#create call instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@bharatviswa504
Copy link
Contributor Author

Thank You @lokeshj1703 for the review.
I have addressed the review comments.

private final Configuration conf;

// Set parallelism at 3, as now in Ratis we create 1 and 3 node pipelines.
private final int parallelisimForPool = 3;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo. parallelis'i'mForPool.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bharatviswa504
Copy link
Contributor Author

@lokeshj1703 Addressed the review comments.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 51 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
+1 test4tests 0 The patch appears to include 3 new or modified test files.
_ trunk Compile Tests _
0 mvndep 89 Maven dependency ordering for branch
+1 mvninstall 702 trunk passed
+1 compile 351 trunk passed
+1 checkstyle 98 trunk passed
+1 mvnsite 0 trunk passed
+1 shadedclient 1106 branch has no errors when building and testing our client artifacts.
+1 javadoc 175 trunk passed
0 spotbugs 294 Used deprecated FindBugs config; considering switching to SpotBugs.
+1 findbugs 489 trunk passed
-0 patch 349 Used diff version of patch file. Binary files and potentially other changes not applied. Please rebase and squash commits if necessary.
_ Patch Compile Tests _
0 mvndep 28 Maven dependency ordering for patch
+1 mvninstall 481 the patch passed
+1 compile 273 the patch passed
+1 javac 273 the patch passed
+1 checkstyle 84 the patch passed
+1 mvnsite 0 the patch passed
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 738 patch has no errors when building and testing our client artifacts.
+1 javadoc 146 the patch passed
+1 findbugs 499 the patch passed
_ Other Tests _
-1 unit 161 hadoop-hdds in the patch failed.
-1 unit 1379 hadoop-ozone in the patch failed.
+1 asflicense 65 The patch does not generate ASF License warnings.
7085
Reason Tests
Failed junit tests hadoop.ozone.container.common.statemachine.commandhandler.TestCloseContainerByPipeline
hadoop.hdds.scm.safemode.TestSCMSafeModeWithPipelineRules
hadoop.ozone.container.server.TestSecureContainerServer
hadoop.ozone.container.common.statemachine.commandhandler.TestCloseContainerHandler
Subsystem Report/Notes
Docker Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-714/13/artifact/out/Dockerfile
GITHUB PR #714
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 9b8dd3bcb2ce 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 1cb2eb0
Default Java 1.8.0_212
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-714/13/artifact/out/patch-unit-hadoop-hdds.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-714/13/artifact/out/patch-unit-hadoop-ozone.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-714/13/testReport/
Max. process+thread count 5418 (vs. ulimit of 5500)
modules C: hadoop-hdds/server-scm hadoop-ozone/integration-test U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-714/13/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@lokeshj1703
Copy link
Contributor

@bharatviswa504 Thanks for updating the PR! The changes look good to me. +1.

@arp7
Copy link
Contributor

arp7 commented May 21, 2019

@bharatviswa504 can you check if the UT failure is related to the patch?

@bharatviswa504
Copy link
Contributor Author

bharatviswa504 commented May 21, 2019

Failed test is not related to this patch. I think we can improve waitForClusterToBeReady to also check for safeMode also, so that we don't see these failures randomly. (Not completely sure we need though, if it is needed, I can open a new Jira to fix this.)
Ran locally.
Screen Shot 2019-05-21 at 8 44 51 AM

@bharatviswa504 bharatviswa504 merged commit 77c49f2 into apache:trunk May 22, 2019
@bharatviswa504
Copy link
Contributor Author

Thank You @lokeshj1703 and @arp7 for the review.
I have committed this to the trunk.

@bharatviswa504 bharatviswa504 deleted the HDDS-1406 branch May 22, 2019 01:50
shanthoosh pushed a commit to shanthoosh/hadoop that referenced this pull request Oct 15, 2019
Author: Sanil15 <[email protected]>

Reviewers: Jagadish<[email protected]>

Closes apache#714 from Sanil15/SAMZA-1930
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants