[ 
https://issues.apache.org/jira/browse/HDFS-10802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15669887#comment-15669887
 ] 

Uma Maheswara Rao G commented on HDFS-10802:
--------------------------------------------

[~yuanbo] , Thank you for all your work.
Almost Patch looks nice to me. I have few nits though
# -
{code}
LOG.debug("Added block collection id {} to block "
+        + "storageMovementNeeded queue", id);
{code}
Can you add isDebugEnable check?
# -
{code}
+  /**
+   * satisfy the storage policy for a file/directory.
{code}
Should be Satisfy (Should start with capital letter)
# -
{code}
 Assert.fail(String.format(
+            "Failed to satisfy storage policy for %s since %s is set to 
false.",
+            file, DFS_STORAGE_POLICY_ENABLED_KEY));
{code}
I think this message would confuse if test fails. If this assertion fails, 
message would be still right. So, we should log expectation here I think.
Exa: “Should failed to satisfy…….”
 
On API part, I had one thought as follows. Currently user may need to call two 
APIs, one is setStoargePolicy and then satisfyStoragePolicy. Some times if user 
wants to do both immediately then there can be one API which should do both.
how about thinking to have one overloaded API to setStoragePolicy with args of 
path and satisfy flag to trigger storage policy satisfaction? example: 
setStoragePolicy (src, true) 
This can be in another JIRA. I am raising here just to think and raise new JIRA 
if you guys agree.

Regarding TODO of persisting: do you want to file new JIRA?


> [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-HDFS-10285.002.patch, HDFS-10802-HDFS-10285.003.patch, 
> HDFS-10802-HDFS-10285.004.patch, HDFS-10802-HDFS-10285.005.patch, 
> HDFS-10802.001.patch, editsStored
>
>
> 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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to