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

Rakesh R commented on HDFS-14401:
---------------------------------

Apart from the following comments, latest patch looks good to me. I will commit 
the patch after fixing these comments, if there is no more comments from others.
 # How about adding a function to the interface and makes {{FsDatasetCache}} 
code simple.
{code:java}
MappableBlockLoader.java
  /**
   * Cleaning up the cache, can be used during shutdown.
   */
  void cleanup() {
    // do nothing
  }

PmemMappableBlockLoader.java
  @Override
  void cleanup() {
    LOG.info("Clean up cache on persistent memory during shutdown.");
    pmemVolumeManager.cleanup();
  }


  /**
   * Clean up cache.
   */
  void shutdown() {
    cacheLoader.cleanup();
  }
{code}

 # Why can't we simply do {{return new File(rawPmemDir, 
CACHE_DIR).getAbsolutePath();}} instead of {{rawPmemDir.endsWith("/") ? 
rawPmemDir + CACHE_DIR}}

> Refine the implementation for HDFS cache on SCM
> -----------------------------------------------
>
>                 Key: HDFS-14401
>                 URL: https://issues.apache.org/jira/browse/HDFS-14401
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: caching, datanode
>            Reporter: Feilong He
>            Assignee: Feilong He
>            Priority: Major
>         Attachments: HDFS-14401.000.patch, HDFS-14401.001.patch, 
> HDFS-14401.002.patch, HDFS-14401.003.patch, HDFS-14401.004.patch, 
> HDFS-14401.005.patch, HDFS-14401.006.patch, HDFS-14401.007.patch, 
> HDFS-14401.008.patch, HDFS-14401.009.patch
>
>
> In this Jira, we will refine the implementation for HDFS cache on SCM, such 
> as: 1) Handle full pmem volume in VolumeManager; 2) Refine pmem volume 
> selection impl; 3) Clean up MapppableBlockLoader interface; etc.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
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