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

Rakesh R edited comment on HDFS-14401 at 4/26/19 5:12 AM:
----------------------------------------------------------

Thanks [~PhiloHe] for the good progress. Adding few comments,
# Move log message to respective constructor, that will make the 
FsDatasetCache.java more cleaner.
{code:java}
PmemMappableBlockLoader(){
        LOG.info("Initializing cache loader: PmemMappableBlockLoader");
}

MemoryMappableBlockLoader(){
    LOG.info("Initializing cache loader: MemoryMappableBlockLoader");
}
{code}
# How about using a {{MappableBlockLoaderFactory}} and move 
{{#createCacheLoader(DNConf)}} function into that.
{code:java}
   MappableBlockLoader loader = 
MappableBlockLoaderFactory.getInstance().createCacheLoader(this.getDnConf());
{code}
# Typo - '{{due to unsuccessfully mapping'}} -->to-> '{{due to unsuccessful 
mapping'}}.
# Can we make synchronized functions {{long release}} and {{public String 
getCachePath}}
# {{maxBytes = pmemDir.getTotalSpace();}}, IMHO, to use 
[File#getUsableSpace()|https://docs.oracle.com/javase/7/docs/api/java/io/File.html#getUsableSpace()]
 function.
# Remove unused var in PmemVolumeManager.java - {{// private final 
UsedBytesCount usedBytesCount;}}
# Its good to use {} instead of string concatenation in log messages. Please 
take care all such occurrences in newly writing code.
{code:java}
       LOG.info("Added persistent memory - " + volumes[n] +
                      " with size=" + maxBytes);

                               to

        LOG.info("Added persistent memory - {} with size={}",
                        volumes[n], maxBytes);
{code}


was (Author: rakeshr):
Thanks [~PhiloHe] for the good progress. Adding few comments,
 # Move log message to respective constructor, that will make the 
FsDatasetCache.java more cleaner.
{code:java}
PmemMappableBlockLoader(){
        LOG.info("Initializing cache loader: PmemMappableBlockLoader");
}

MemoryMappableBlockLoader(){
    LOG.info("Initializing cache loader: MemoryMappableBlockLoader");
}
{code}

 # How about using a {{MappableBlockLoaderFactory}} and move 
{{#createCacheLoader(DNConf)}} function into that.
{code:java}
   MappableBlockLoader loader = 
MappableBlockLoaderFactory.getInstance().createCacheLoader(this.getDnConf());
{code}

 # Typo - '{{due to unsuccessfully mapping'}} -->to-> '{{due to unsuccessful 
mapping'}}.
 # Can we make synchronized functions {{long release}} and {{public String 
getCachePath}}
 # {{maxBytes = pmemDir.getTotalSpace();}}, IMHO, to use 
[File#getUsableSpace()|https://docs.oracle.com/javase/7/docs/api/java/io/File.html#getUsableSpace()]
 function.
 # Remove unused var in PmemVolumeManager.java - {{// private final 
UsedBytesCount usedBytesCount;}}
 # Its good to use {} instead of string concatenation in log messages. Please 
take care all such occurrences in newly writing code.
{code:java}
       LOG.info("Added persistent memory - " + volumes[n] +
                      " with size=" + maxBytes);

                               to

        LOG.info("Added persistent memory - {} with size={}",
                        volumes[n], maxBytes);
{code}

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