-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-23622 Reduced the number of Checkstyle violations in hbase-common #1034
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-23622 Reduced the number of Checkstyle violations in hbase-common #1034
Conversation
This comment has been minimized.
This comment has been minimized.
busbey
left a comment
There was a problem hiding this comment.
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.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
Outdated
Show resolved
Hide resolved
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteRangeUtils.java
Outdated
Show resolved
Hide resolved
hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
Outdated
Show resolved
Hide resolved
hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
Outdated
Show resolved
Hide resolved
| try { | ||
| m = fs.getClass().getDeclaredMethod("setStoragePolicy", | ||
| new Class<?>[] { Path.class, String.class }); | ||
| m = fs.getClass().getDeclaredMethod("setStoragePolicy", Path.class, String.class); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
This comment has been minimized.
This comment has been minimized.
|
💔 -1 overall
This message was automatically generated. |
| m.invoke(fs, path, storagePolicy); | ||
|
|
||
| // check for lack of HDFS-7228 | ||
| final Throwable exception = e.getCause(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
|
💔 -1 overall
This message was automatically generated. |
|
Problem in the build seems to be related to HBASE-22732. |
Backport of #968 to branch-1.