-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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-24051 Allows indirect inheritance to CanUnbuffer #1415
Conversation
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
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.
It's not clear to me why this class uses reflection to access CanUnbuffer
. That class has been in Hadoop at least since 2.8, and continues to be available on trunk
. However, it's marked as Public/Evolving
. Since it's a public class, I think it's fine to import the class directly instead of locating it via reflection.
I have the same question about looking for the presence of the method unbuffer
, unless we're protecting against the method disappearing in a future release.
I don't think any of the above is the case; I think this is an artifact of hadoop1 compat. So basically, I think you can get rid of all this reflection and replace all this with something like
import org.apache.hadoop.fs.CanUnbuffer;
...
this.instanceOfCanUnbuffer = wrappedStream instanced CanUnbuffer;
+ "left open in CLOSE_WAIT state.", e); | ||
} | ||
return; | ||
if(wrappedStream instanceof CanUnbuffer){ |
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.
nit: whitespace.
if (...) {
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@shenshengli have you seen the @ndimiduk comment above? Any response? Thank you. |
I closed this issue that has gone 28 days w/o response. Please open new PR to make progress again. |
If you have an inherited parent class that implements CanUnbuffer instead of directly implementing CanUnbuffer. Modify unit tests.