-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HDFS-16428. Source path with storagePolicy cause wrong typeConsumed while rename #3898
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -339,6 +339,16 @@ public boolean isFile() { | |
return false; | ||
} | ||
|
||
/** | ||
* Check whether this inode itself set storage policy. | ||
*/ | ||
public boolean isSetStoragePolicy() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A minor comment. It will be good if we add a comment to this method. People may confuse about "inheriting storage policy from its parent" and "containing storage policy itself". Add a comment like getStoragePolicyID() and getLocalStoragePolicyID(). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @wojiaodoubao thank you very much for your comment. I had fixed it and repush it. |
||
if (isSymlink()) { | ||
return false; | ||
} | ||
return getLocalStoragePolicyID() != HdfsConstants.BLOCK_STORAGE_POLICY_ID_UNSPECIFIED; | ||
} | ||
|
||
/** Cast this inode to an {@link INodeFile}. */ | ||
public INodeFile asFile() { | ||
throw new IllegalStateException("Current inode is not a file: " | ||
|
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.
Can we also add a test case to verify the quota check part.