Skip to content

HBASE-23622 Reduced the number of Checkstyle violations in hbase-common - #1034

Merged
HorizonNet merged 4 commits into
apache:branch-1from
ultratendency:HBASE-23622_branch-1
Jan 19, 2020
Merged

HBASE-23622 Reduced the number of Checkstyle violations in hbase-common#1034
HorizonNet merged 4 commits into
apache:branch-1from
ultratendency:HBASE-23622_branch-1

Conversation

@HorizonNet

Copy link
Copy Markdown
Contributor

Backport of #968 to branch-1.

@Apache-HBase

This comment has been minimized.

@busbeybusbey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we want to do the binary incompatible changes we need a draft release note for how we'll call them out. otherwise please update to remove binary incompatible changes.

Comment threadhbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java Outdated
Comment threadhbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java Outdated
Comment threadhbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java Outdated
Comment threadhbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java Outdated
try {
m = fs.getClass().getDeclaredMethod("setStoragePolicy",
new Class<?>[] { Path.class, String.class });
m = fs.getClass().getDeclaredMethod("setStoragePolicy", Path.class, String.class);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

branch-1's minimum hadoop version is 2.8.5, so for that branch we can remove this reflection as well. Note to potential further backporters: the method is not in Hadoop 2.7, we'll need this reflection in branch-1.4 and branch-1.3.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Removed the reflection part. Will create additional backports for branch-1.4 and branch-1.3.

"more information see the 'ArchivalStorage' docs for your Hadoop release.");
}
// check for lack of HDFS-7228
if (e instanceof InvocationTargetException) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Now that we're not using reflection, this should be a direct check for RemoteException because it won't be wrapped in the reflection invocation exception.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Updated the changes to unwrap the InvocationTargetException check.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 18sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-0 ⚠️test4tests0m 0sThe 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.
_ branch-1 Compile Tests _
+0 🆗mvndep1m 22sMaven dependency ordering for branch
+1 💚mvninstall7m 53sbranch-1 passed
+1 💚compile0m 27sbranch-1 passed with JDK v1.8.0_232
+1 💚compile0m 35sbranch-1 passed with JDK v1.7.0_242
+1 💚checkstyle5m 27sbranch-1 passed
+1 💚shadedjars2m 49sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 32sbranch-1 passed with JDK v1.8.0_232
+1 💚javadoc0m 35sbranch-1 passed with JDK v1.7.0_242
+0 🆗spotbugs1m 1sUsed deprecated FindBugs config; considering switching to SpotBugs.
+0 🆗findbugs0m 23sbranch/hbase-checkstyle no findbugs output file (findbugsXml.xml)
_ Patch Compile Tests _
+0 🆗mvndep0m 15sMaven dependency ordering for patch
+1 💚mvninstall2m 3sthe patch passed
+1 💚compile0m 28sthe patch passed with JDK v1.8.0_232
+1 💚javac0m 28sthe patch passed
+1 💚compile0m 36sthe patch passed with JDK v1.7.0_242
+1 💚javac0m 36sthe patch passed
+1 💚checkstyle4m 56sroot: The patch generated 0 new + 25 unchanged - 16 fixed = 25 total (was 41)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
-1 ❌xml0m 0sThe patch has 1 ill-formed XML file(s).
+1 💚shadedjars2m 43spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck4m 54sPatch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚javadoc0m 28sthe patch passed with JDK v1.8.0_232
+1 💚javadoc0m 35sthe patch passed with JDK v1.7.0_242
+0 🆗findbugs0m 13shbase-checkstyle has no data from findbugs
_ Other Tests _
+1 💚unit0m 13shbase-checkstyle in the patch passed.
+1 💚unit2m 35shbase-common in the patch passed.
+1 💚asflicense0m 23sThe patch does not generate ASF License warnings.
47m 32s
ReasonTests
XMLParsing Error(s):
hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
SubsystemReport/Notes
DockerClient=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1034/3/artifact/out/Dockerfile
GITHUB PR#1034
Optional Testsdupname asflicense checkstyle javac javadoc unit xml spotbugs findbugs shadedjars hadoopcheck hbaseanti compile
unameLinux 74e10a56bffe 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1034/out/precommit/personality/provided.sh
git revisionbranch-1 / b5d0da7
Default Java1.7.0_242
Multi-JDK versions/usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
xmlhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1034/3/artifact/out/xml.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1034/3/testReport/
Max. process+thread count181 (vs. ulimit of 10000)
modulesC: hbase-checkstyle hbase-common U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1034/3/console
versionsgit=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

m.invoke(fs, path, storagePolicy);

// check for lack of HDFS-7228
final Throwable exception = e.getCause();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this is correct. wouldn't e be the RemoteException?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Yes, you're right. I removed the part of getting the cause.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 30sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-0 ⚠️test4tests0m 0sThe 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.
_ branch-1 Compile Tests _
+0 🆗mvndep1m 21sMaven dependency ordering for branch
+1 💚mvninstall7m 29sbranch-1 passed
+1 💚compile0m 30sbranch-1 passed with JDK v1.8.0_232
+1 💚compile0m 35sbranch-1 passed with JDK v1.7.0_242
+1 💚checkstyle6m 8sbranch-1 passed
+1 💚shadedjars3m 11sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 29sbranch-1 passed with JDK v1.8.0_232
+1 💚javadoc0m 35sbranch-1 passed with JDK v1.7.0_242
+0 🆗spotbugs1m 8sUsed deprecated FindBugs config; considering switching to SpotBugs.
+0 🆗findbugs0m 24sbranch/hbase-checkstyle no findbugs output file (findbugsXml.xml)
_ Patch Compile Tests _
+0 🆗mvndep0m 16sMaven dependency ordering for patch
+1 💚mvninstall2m 8sthe patch passed
+1 💚compile0m 27sthe patch passed with JDK v1.8.0_232
+1 💚javac0m 27sthe patch passed
+1 💚compile0m 33sthe patch passed with JDK v1.7.0_242
+1 💚javac0m 33sthe patch passed
+1 💚checkstyle5m 55sroot: The patch generated 0 new + 25 unchanged - 16 fixed = 25 total (was 41)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
-1 ❌xml0m 0sThe patch has 1 ill-formed XML file(s).
+1 💚shadedjars3m 11spatch has no errors when building our shaded downstream artifacts.
+1 💚hadoopcheck5m 16sPatch does not cause any errors with Hadoop 2.8.5 2.9.2.
+1 💚javadoc0m 25sthe patch passed with JDK v1.8.0_232
+1 💚javadoc0m 32sthe patch passed with JDK v1.7.0_242
+0 🆗findbugs0m 13shbase-checkstyle has no data from findbugs
_ Other Tests _
+1 💚unit0m 11shbase-checkstyle in the patch passed.
+1 💚unit2m 36shbase-common in the patch passed.
+1 💚asflicense0m 21sThe patch does not generate ASF License warnings.
50m 23s
ReasonTests
XMLParsing Error(s):
hbase-checkstyle/src/main/resources/hbase/checkstyle-suppressions.xml
SubsystemReport/Notes
DockerClient=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1034/4/artifact/out/Dockerfile
GITHUB PR#1034
Optional Testsdupname asflicense checkstyle javac javadoc unit xml spotbugs findbugs shadedjars hadoopcheck hbaseanti compile
unameLinux 6820c854d6f2 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personality/home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1034/out/precommit/personality/provided.sh
git revisionbranch-1 / b5d0da7
Default Java1.7.0_242
Multi-JDK versions/usr/lib/jvm/zulu-8-amd64:1.8.0_232 /usr/lib/jvm/zulu-7-amd64:1.7.0_242
xmlhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1034/4/artifact/out/xml.txt
Test Resultshttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1034/4/testReport/
Max. process+thread count171 (vs. ulimit of 10000)
modulesC: hbase-checkstyle hbase-common U: .
Console outputhttps://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1034/4/console
versionsgit=1.9.1 maven=3.0.5 findbugs=3.0.1
Powered byApache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@HorizonNet

Copy link
Copy Markdown
ContributorAuthor

Problem in the build seems to be related to HBASE-22732.

@HorizonNet
HorizonNet merged commit 99a59cf into apache:branch-1Jan 19, 2020
@HorizonNet
HorizonNet deleted the HBASE-23622_branch-1 branch January 19, 2020 17:02
Sign up for freeto 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.

3 participants

@HorizonNet@Apache-HBase@busbey