-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-17921. DistCp derives if XAttr is supported wrongly #3463
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
Conversation
I can see from a purism perspective this is the correct thing to do. But I worry that changing it now will break things. After all, if an IOE is raised here for some reason (network, auth etc) distcp will go on to fail shortly afterwards |
Thanks for the review @steveloughran !!
021-08-02 10:05:17,150 ERROR org.apache.hadoop.tools.DistCp: [Thread-1973153]: XAttrs not supported on at least one file system: Didn't expect this call to fail for hdfs. And the only reason I could think of is the improper exception handling. It could probably be an intermittent network issue or so in this case.
/**
*/ |
|
💔 -1 overall
This message was automatically generated. |
|
One other consideration is the behavior as it stands now for HDFS clusters that have disabled xattrs with In current behavior, the NameNode will throw an With this patch, the NameNode still throws I'm not certain there is a problem, but I agree with @steveloughran that there is reason to be cautious. It's also difficult to anticipate if custom |
Thanks for the review @cnauroth. I would agree on your observation on behavioral difference on dfs.namenode.xattrs.enabled being 'false'. |
We have to consider exceptions to be part of that public API. Worse, sometimes the text message is part of that API. Distcp is sometimes wrapped by applications (hive,...) so they may be looking for the explicit exception type. |
|
My only other thought is that this sort of logic is the kind of thing that should eventually make its way over to using I've tried more brainstorming on this, and unfortunately, I can't think of a solution with high confidence in guaranteeing backward compatibility. We've focused discussion on xattrs so far, but there is similar logic for ACLs too that is susceptible to the same problems. |
|
We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
Description of PR
The exception handling in distcp code during the check seems improper. In a FileSystem implementation which doesn't override getXAttrs(), it would throw UnsupportedOperationException(). However, in distCp while handling the code, it tries to catch Exception class. That would result in normal IOException also treated as if the feature is not supported. This will lead to wrong behavior.
How was this patch tested?
👀
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?