[
https://issues.apache.org/jira/browse/HDFS-10802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15661722#comment-15661722
]
Rakesh R commented on HDFS-10802:
---------------------------------
Thank you [~yuanbo] for the patch. Could you please look at the following
comments on yor patch.
# It is good to mention that the "API is non-recursive in nature". The
subdirectories of the path won't be considered for satisfying the storage
policy.
{code}
/**
+ * Set the source path to satisfy storage policy.
+ * @param path The source path referring to either a directory or a file.
+ * @throws IOException
+ */
{code}
# Presently, SPS will throw following exception if the path is a directory. We
need to add logic to iterate all the files under the given directory and add it
to {{bm.satisfyStoragePolicy(inode.getId());}}. There are two cases (1)
multiples files under a directory (2) sub-directories will be ignored.
{code}
java.lang.IllegalStateException: Current inode is not a file:
root1(INodeDirectory@f6a28bf), parentDir=/
at org.apache.hadoop.hdfs.server.namenode.INode.asFile(INode.java:321)
at
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockCollection(FSNamesystem.java:3337)
at
org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getBlockCollection(FSNamesystem.java:1)
at
org.apache.hadoop.hdfs.server.namenode.StoragePolicySatisfier.computeAndAssignStorageMismatchedBlocksToDNs(StoragePolicySatisfier.java:146)
{code}
# Can we add test case to verify that, this API will throw exception if storage
policy is disabled.
# It seems test failures are related. Please look at these failures. For eg.
{{TestOfflineEditsViewer.testStored}},
{{TestOfflineEditsViewer.testGenerated}}, {{TestDFSInotifyEventInputStream}}
etc.
# Also, please fix necessary checkstyle warnings.
> [SPS]: Add satisfyStoragePolicy API in HdfsAdmin
> ------------------------------------------------
>
> Key: HDFS-10802
> URL: https://issues.apache.org/jira/browse/HDFS-10802
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: hdfs-client
> Reporter: Uma Maheswara Rao G
> Assignee: Yuanbo Liu
> Attachments: HDFS-10802-HDFS-10285.001.patch, HDFS-10802.001.patch
>
>
> This JIRA is to track the work for adding user/admin API for calling to
> satisfyStoragePolicy
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]