Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-23093 : Avoid Optional Anti-Pattern where possible #673

Merged
merged 1 commit into from
Oct 11, 2019

Conversation

virajjasani
Copy link
Contributor

@virajjasani virajjasani commented Sep 29, 2019

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
💙 reexec 1m 9s Docker mode activated.
_ Prechecks _
💚 dupname 0m 0s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 5 new or modified test files.
_ master Compile Tests _
💙 mvndep 1m 3s Maven dependency ordering for branch
💚 mvninstall 5m 50s master passed
💚 compile 1m 46s master passed
💚 checkstyle 2m 20s master passed
💚 shadedjars 4m 59s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 1m 16s master passed
💙 spotbugs 4m 18s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 6m 6s master passed
_ Patch Compile Tests _
💙 mvndep 0m 13s Maven dependency ordering for patch
💚 mvninstall 5m 30s the patch passed
💚 compile 1m 45s the patch passed
💚 javac 1m 45s the patch passed
💔 checkstyle 0m 33s hbase-client: The patch generated 4 new + 38 unchanged - 1 fixed = 42 total (was 39)
💔 checkstyle 1m 33s hbase-server: The patch generated 4 new + 258 unchanged - 0 fixed = 262 total (was 258)
💔 checkstyle 0m 13s hbase-examples: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 5m 2s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 17m 12s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 1m 14s the patch passed
💚 findbugs 6m 39s the patch passed
_ Other Tests _
💚 unit 1m 49s hbase-client in the patch passed.
💔 unit 287m 12s hbase-server in the patch failed.
💚 unit 2m 4s hbase-examples in the patch passed.
💚 asflicense 1m 18s The patch does not generate ASF License warnings.
364m 10s
Reason Tests
Failed junit tests hadoop.hbase.client.TestFromClientSide
hadoop.hbase.client.TestFromClientSideWithCoprocessor
hadoop.hbase.tool.TestBulkLoadHFiles
hadoop.hbase.tool.TestSecureBulkLoadHFiles
Subsystem Report/Notes
Docker Client=19.03.0 Server=19.03.0 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/1/artifact/out/Dockerfile
GITHUB PR #673
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 79b0696572aa 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-673/out/precommit/personality/provided.sh
git revision master / 1170f28
Default Java 1.8.0_181
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/1/artifact/out/diff-checkstyle-hbase-client.txt
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/1/artifact/out/diff-checkstyle-hbase-server.txt
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/1/artifact/out/diff-checkstyle-hbase-examples.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/1/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/1/testReport/
Max. process+thread count 4825 (vs. ulimit of 10000)
modules C: hbase-client hbase-server hbase-examples U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/1/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
💙 reexec 0m 30s Docker mode activated.
_ Prechecks _
💚 dupname 0m 0s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 5 new or modified test files.
_ master Compile Tests _
💙 mvndep 0m 35s Maven dependency ordering for branch
💚 mvninstall 6m 6s master passed
💚 compile 1m 45s master passed
💚 checkstyle 2m 19s master passed
💚 shadedjars 5m 1s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 1m 15s master passed
💙 spotbugs 4m 26s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 6m 12s master passed
_ Patch Compile Tests _
💙 mvndep 0m 14s Maven dependency ordering for patch
💚 mvninstall 5m 29s the patch passed
💚 compile 1m 50s the patch passed
💚 javac 1m 50s the patch passed
💔 checkstyle 0m 34s hbase-client: The patch generated 4 new + 38 unchanged - 1 fixed = 42 total (was 39)
💔 checkstyle 1m 29s hbase-server: The patch generated 4 new + 258 unchanged - 0 fixed = 262 total (was 258)
💔 checkstyle 0m 13s hbase-examples: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 5m 1s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 17m 12s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 1m 13s the patch passed
💚 findbugs 6m 38s the patch passed
_ Other Tests _
💚 unit 1m 46s hbase-client in the patch passed.
💔 unit 161m 33s hbase-server in the patch failed.
💚 unit 1m 47s hbase-examples in the patch passed.
💚 asflicense 1m 11s The patch does not generate ASF License warnings.
237m 12s
Reason Tests
Failed junit tests hadoop.hbase.procedure.TestProcedureManager
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/2/artifact/out/Dockerfile
GITHUB PR #673
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux b71d977535d5 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-673/out/precommit/personality/provided.sh
git revision master / 1170f28
Default Java 1.8.0_181
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/2/artifact/out/diff-checkstyle-hbase-client.txt
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/2/artifact/out/diff-checkstyle-hbase-server.txt
checkstyle https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/2/artifact/out/diff-checkstyle-hbase-examples.txt
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/2/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/2/testReport/
Max. process+thread count 4447 (vs. ulimit of 10000)
modules C: hbase-client hbase-server hbase-examples U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/2/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
💙 reexec 1m 17s Docker mode activated.
_ Prechecks _
💚 dupname 0m 0s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 1s The patch appears to include 5 new or modified test files.
_ master Compile Tests _
💙 mvndep 1m 2s Maven dependency ordering for branch
💚 mvninstall 5m 46s master passed
💚 compile 1m 45s master passed
💚 checkstyle 2m 21s master passed
💚 shadedjars 4m 57s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 1m 16s master passed
💙 spotbugs 4m 23s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 6m 11s master passed
_ Patch Compile Tests _
💙 mvndep 0m 14s Maven dependency ordering for patch
💚 mvninstall 5m 25s the patch passed
💚 compile 1m 47s the patch passed
💚 javac 1m 47s the patch passed
💚 checkstyle 0m 33s hbase-client: The patch generated 0 new + 38 unchanged - 1 fixed = 38 total (was 39)
💚 checkstyle 1m 32s The patch passed checkstyle in hbase-server
💚 checkstyle 0m 14s The patch passed checkstyle in hbase-examples
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 4m 58s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 17m 8s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 1m 15s the patch passed
💚 findbugs 6m 33s the patch passed
_ Other Tests _
💚 unit 1m 49s hbase-client in the patch passed.
💔 unit 256m 16s hbase-server in the patch failed.
💚 unit 2m 9s hbase-examples in the patch passed.
💚 asflicense 1m 17s The patch does not generate ASF License warnings.
332m 32s
Reason Tests
Failed junit tests hadoop.hbase.master.assignment.TestMergeTableRegionsProcedure
Subsystem Report/Notes
Docker Client=19.03.0 Server=19.03.0 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/3/artifact/out/Dockerfile
GITHUB PR #673
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 90501c29504b 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-673/out/precommit/personality/provided.sh
git revision master / ce0fbc2
Default Java 1.8.0_181
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/3/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/3/testReport/
Max. process+thread count 4975 (vs. ulimit of 10000)
modules C: hbase-client hbase-server hbase-examples U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/3/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@virajjasani
Copy link
Contributor Author

Please review @Apache9 @petersomogyi

Copy link
Contributor

@petersomogyi petersomogyi left a comment

Choose a reason for hiding this comment

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

Looks good. Minor nit.

@@ -400,18 +400,17 @@ private void sendToServer(ServerName serverName, ServerRequest serverReq, int tr
// based on the load of the region server and the region.
private void sendOrDelay(Map<ServerName, ServerRequest> actionsByServer, int tries) {
Optional<MetricsConnection> metrics = conn.getConnectionMetrics();
Optional<ServerStatisticTracker> optStats = conn.getStatisticsTracker();
if (!optStats.isPresent()) {
ServerStatisticTracker optStats = conn.getStatisticsTracker();
Copy link
Contributor

Choose a reason for hiding this comment

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

The variable name can be stats now.

@petersomogyi petersomogyi requested a review from Apache9 October 5, 2019 14:36
@petersomogyi
Copy link
Contributor

Added @Apache9 as a reviewer since he had some comments on the Jira.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
💙 reexec 1m 15s Docker mode activated.
_ Prechecks _
💚 dupname 0m 1s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 5 new or modified test files.
_ master Compile Tests _
💙 mvndep 0m 35s Maven dependency ordering for branch
💚 mvninstall 5m 49s master passed
💚 compile 1m 48s master passed
💚 checkstyle 2m 20s master passed
💚 shadedjars 5m 3s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 1m 18s master passed
💙 spotbugs 4m 23s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 6m 11s master passed
_ Patch Compile Tests _
💙 mvndep 0m 13s Maven dependency ordering for patch
💚 mvninstall 5m 25s the patch passed
💚 compile 1m 49s the patch passed
💚 javac 1m 49s the patch passed
💚 checkstyle 0m 35s hbase-client: The patch generated 0 new + 38 unchanged - 1 fixed = 38 total (was 39)
💚 checkstyle 1m 27s The patch passed checkstyle in hbase-server
💚 checkstyle 0m 13s The patch passed checkstyle in hbase-examples
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 5m 0s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 17m 18s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 1m 15s the patch passed
💚 findbugs 6m 44s the patch passed
_ Other Tests _
💚 unit 1m 49s hbase-client in the patch passed.
💚 unit 246m 41s hbase-server in the patch passed.
💚 unit 1m 59s hbase-examples in the patch passed.
💚 asflicense 1m 16s The patch does not generate ASF License warnings.
323m 7s
Subsystem Report/Notes
Docker Client=19.03.2 Server=19.03.2 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/4/artifact/out/Dockerfile
GITHUB PR #673
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux d99b0fcd225f 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-673/out/precommit/personality/provided.sh
git revision master / f69e770
Default Java 1.8.0_181
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/4/testReport/
Max. process+thread count 5083 (vs. ulimit of 10000)
modules C: hbase-client hbase-server hbase-examples U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/4/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@@ -281,7 +281,7 @@ void clearMasterStubCache(MasterService.Interface stub) {
masterStub.compareAndSet(stub, null);
}

Optional<ServerStatisticTracker> getStatisticsTracker() {
ServerStatisticTracker getStatisticsTracker() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this change? It could be null and it is a return value, not a parameter...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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 should align the interface... It is a bit confusing that we return Optional for some methods, and then some other methods which do not return an Optional but could still return null...

@@ -415,13 +414,15 @@ static void incRegionCountMetrics(ScanMetrics scanMetrics) {
* increase the hedge read related metrics.
*/
private static <T> void connect(CompletableFuture<T> srcFuture, CompletableFuture<T> dstFuture,
Optional<MetricsConnection> metrics) {
MetricsConnection metrics) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here I do not think it is necessary to do this change? The upper layer will get an Optional, and then we convert it to an object or a null, by checking if the object is null, and here we check it again...

@@ -435,23 +436,25 @@ static void incRegionCountMetrics(ScanMetrics scanMetrics) {

private static <T> void sendRequestsToSecondaryReplicas(
Function<Integer, CompletableFuture<T>> requestReplica, RegionLocations locs,
CompletableFuture<T> future, Optional<MetricsConnection> metrics) {
CompletableFuture<T> future, MetricsConnection metrics) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

static void updateStats(Optional<ServerStatisticTracker> optStats,
Optional<MetricsConnection> optMetrics, ServerName serverName, MultiResponse resp) {
if (!optStats.isPresent() && !optMetrics.isPresent()) {
static void updateStats(ServerStatisticTracker serverStatisticTracker,
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

@@ -220,7 +220,8 @@ private static Result toResult(HBaseRpcController controller, MutateResponse res
public CompletableFuture<Result> get(Get get) {
return timelineConsistentRead(conn.getLocator(), tableName, get, get.getRow(),
RegionLocateType.CURRENT, replicaId -> get(get, replicaId), readRpcTimeoutNs,
conn.connConf.getPrimaryCallTimeoutNs(), retryTimer, conn.getConnectionMetrics());
conn.connConf.getPrimaryCallTimeoutNs(), retryTimer,
conn.getConnectionMetrics().orElse(null));
Copy link
Contributor

Choose a reason for hiding this comment

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

This is what I mean, we unwrap the Optional, and then check if it is null, this does not make sense...

@@ -351,11 +350,11 @@ public StoreScanner(ScanInfo scanInfo, ScanType scanType,

// Used to instantiate a scanner for compaction in test
@VisibleForTesting
StoreScanner(ScanInfo scanInfo, OptionalInt maxVersions, ScanType scanType,
StoreScanner(ScanInfo scanInfo, Integer maxVersions, ScanType scanType,
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, what is the differece between an OptionalInt and an Integer? They are both wrapping types...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True both are wrapping but OptionalInt is again wrapping Integer also.
Here we call this:
https://github.com/apache/hbase/pull/673/files#diff-ff286d61ea5468d0f8978181e4f3a896R946
https://github.com/apache/hbase/pull/673/files#diff-ff286d61ea5468d0f8978181e4f3a896R974

At least we can directly pass int value 2 or null rather than OptionalInt.of(2) and Optional.empty()

Copy link
Contributor

Choose a reason for hiding this comment

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

Passing value 2 will introduce a Integer.valueOf(2) as you are passing an Integer, not a int. And Optional.empty is just a static object, which does not make any difference with null...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, let me change this to as it was before

Copy link
Contributor

Choose a reason for hiding this comment

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

And is it possible to just pass an int? I think not all the int values are valid for maxVersions, maybe we can use -1 to indicate null here?

@@ -289,7 +289,7 @@ public boolean replicate(ReplicateContext replicateContext) {
}
continue outer;
}
if (!requiresReplication(tableDesc, entry)) {
if (!requiresReplication(tableDesc.orElse(null), entry)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

OK, again, here we unwrap the optional by checking whether it is null and inside the method we checl it again...

Where does this Optional come from? If we could not change the root, let's keep it as is?

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
💙 reexec 0m 31s Docker mode activated.
_ Prechecks _
💚 dupname 0m 0s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 4 new or modified test files.
_ master Compile Tests _
💙 mvndep 1m 0s Maven dependency ordering for branch
💚 mvninstall 6m 1s master passed
💚 compile 1m 57s master passed
💚 checkstyle 2m 36s master passed
💚 shadedjars 5m 46s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 1m 36s master passed
💙 spotbugs 4m 52s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 6m 51s master passed
_ Patch Compile Tests _
💙 mvndep 0m 15s Maven dependency ordering for patch
💚 mvninstall 6m 29s the patch passed
💚 compile 1m 55s the patch passed
💚 javac 1m 55s the patch passed
💚 checkstyle 0m 37s hbase-client: The patch generated 0 new + 30 unchanged - 1 fixed = 30 total (was 31)
💚 checkstyle 1m 40s The patch passed checkstyle in hbase-server
💚 checkstyle 0m 15s The patch passed checkstyle in hbase-examples
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 5m 17s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 19m 5s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 1m 24s the patch passed
💚 findbugs 7m 42s the patch passed
_ Other Tests _
💚 unit 1m 59s hbase-client in the patch passed.
💚 unit 164m 17s hbase-server in the patch passed.
💚 unit 1m 54s hbase-examples in the patch passed.
💚 asflicense 1m 10s The patch does not generate ASF License warnings.
248m 39s
Subsystem Report/Notes
Docker Client=19.03.2 Server=19.03.2 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/6/artifact/out/Dockerfile
GITHUB PR #673
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 8cfb097407db 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-673/out/precommit/personality/provided.sh
git revision master / e911bb7
Default Java 1.8.0_181
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/6/testReport/
Max. process+thread count 4352 (vs. ulimit of 10000)
modules C: hbase-client hbase-server hbase-examples U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/6/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@Apache9
Copy link
Contributor

Apache9 commented Oct 10, 2019

Will take a look this night...

@@ -8743,7 +8743,7 @@ public void registerChildren(ConfigurationManager manager) {
*/
@Override
public void deregisterChildren(ConfigurationManager manager) {
stores.values().forEach(configurationManager.get()::deregisterObserver);
stores.values().forEach(store -> configurationManager.deregisterObserver(store));
Copy link
Contributor

Choose a reason for hiding this comment

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

Just use configurationManager::deregisterObserver?

@@ -357,7 +357,7 @@ public boolean passesKeyRangeFilter(Scan scan) {
}
}
}
return this.firstKey;
return Optional.ofNullable(this.firstKey);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this has been answered but I think this method will be called multiple times? And we always need to do a wrapping and a null check?

.of(((CombinedBlockCache.CombinedCacheStats) this.cacheStats.get()).getLruCacheStats());
l2Stats = Optional.of(((CombinedBlockCache.CombinedCacheStats) this.cacheStats.get())
.getBucketCacheStats());
this.blockCache = this.regionServer.getBlockCache().isPresent() ?
Copy link
Contributor

Choose a reason for hiding this comment

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

Just use orElse(null)?

@@ -170,7 +170,8 @@ private void initBlockCache() {
* Initializes the mob file cache.
*/
private void initMobFileCache() {
this.mobFileCache = this.regionServer.getMobFileCache();
this.mobFileCache = this.regionServer.getMobFileCache().isPresent() ?
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

Copy link
Contributor

@Apache9 Apache9 left a comment

Choose a reason for hiding this comment

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

+1

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
💙 reexec 1m 16s Docker mode activated.
_ Prechecks _
💚 dupname 0m 1s No case conflicting files found.
💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
💚 @author 0m 0s The patch does not contain any @author tags.
💚 test4tests 0m 0s The patch appears to include 4 new or modified test files.
_ master Compile Tests _
💙 mvndep 0m 34s Maven dependency ordering for branch
💚 mvninstall 5m 49s master passed
💚 compile 1m 46s master passed
💚 checkstyle 2m 19s master passed
💚 shadedjars 4m 58s branch has no errors when building our shaded downstream artifacts.
💚 javadoc 1m 15s master passed
💙 spotbugs 4m 29s Used deprecated FindBugs config; considering switching to SpotBugs.
💚 findbugs 6m 15s master passed
_ Patch Compile Tests _
💙 mvndep 0m 14s Maven dependency ordering for patch
💚 mvninstall 5m 27s the patch passed
💚 compile 1m 47s the patch passed
💚 javac 1m 47s the patch passed
💚 checkstyle 0m 34s hbase-client: The patch generated 0 new + 30 unchanged - 1 fixed = 30 total (was 31)
💚 checkstyle 1m 29s The patch passed checkstyle in hbase-server
💚 checkstyle 0m 14s The patch passed checkstyle in hbase-examples
💚 whitespace 0m 0s The patch has no whitespace issues.
💚 shadedjars 5m 3s patch has no errors when building our shaded downstream artifacts.
💚 hadoopcheck 17m 9s Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.
💚 javadoc 1m 14s the patch passed
💚 findbugs 6m 44s the patch passed
_ Other Tests _
💚 unit 1m 44s hbase-client in the patch passed.
💔 unit 247m 6s hbase-server in the patch failed.
💚 unit 1m 58s hbase-examples in the patch passed.
💚 asflicense 1m 14s The patch does not generate ASF License warnings.
323m 37s
Reason Tests
Failed junit tests hadoop.hbase.regionserver.TestBulkLoadReplication
Subsystem Report/Notes
Docker Client=19.03.3 Server=19.03.3 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/7/artifact/out/Dockerfile
GITHUB PR #673
Optional Tests dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile
uname Linux 023c2e97fdd4 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 GNU/Linux
Build tool maven
Personality /home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-673/out/precommit/personality/provided.sh
git revision master / fd9cfd7
Default Java 1.8.0_181
unit https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/7/artifact/out/patch-unit-hbase-server.txt
Test Results https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/7/testReport/
Max. process+thread count 4982 (vs. ulimit of 10000)
modules C: hbase-client hbase-server hbase-examples U: .
Console output https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-673/7/console
versions git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11
Powered by Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.

@virajjasani
Copy link
Contributor Author

TestBulkLoadReplication is passing locally

@Apache9 Apache9 merged commit 2f0b3ac into apache:master Oct 11, 2019
asfgit pushed a commit that referenced this pull request Oct 11, 2019
asfgit pushed a commit that referenced this pull request Oct 11, 2019
asfgit pushed a commit that referenced this pull request Oct 11, 2019
infraio pushed a commit to infraio/hbase that referenced this pull request Aug 17, 2020
symat pushed a commit to symat/hbase that referenced this pull request Feb 17, 2021
Signed-off-by: Peter Somogyi <[email protected]>
Signed-off-by: Duo Zhang <[email protected]>
(cherry picked from commit 122b5b2)

Change-Id: I0f995fdf1e4d6b19c39c8bf8f63066bf5843a81a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants