Arpit Agarwal commented on HDFS-13163:

Thanks for this patch [~bharatviswa]. A few comments:
# replicaTrashEnabled can be read/passed during FsDatasetAsyncDiskService 
construction, so it doesn't need to be passed with every deleteAsync/deleteSync 
# The trash directory must be created per hour, following the design doc.
# The following should be LOG.debug)
      if (LOG.isDebugEnabled()) {
        LOG.info("Moving files " + replicaToDelete.getBlockURI() + " and " +
            replicaToDelete.getMetadataURI() + " to replica-trash.");
# Nitpick: coding style - there should be one space before '\{' and '\('.
      if (trashDirectory != null){
        result = moveFiles();
      } else if(replicaTrashEnabled) {
        result = moveFilesToReplicaTrash();
      } else {
        result = deleteFiles();
# FsDatasetImpl.java: Reading the config key on every invalidate call seems to 
be rather inefficient. Fixing #1 will also address this.
# You can call {{DataNodeTestUtils#triggerHeartbeat}} to shorten the test run 
time here. Also wrap the assertion in a {{LambdaTestUtils#await}} call, so it 
can potentially complete sooner and handle delays longer than the hard-coded 6 
      //Wait for few Heart beats, as the deletion is handled asynchronously

      //After delete, replica-trash dir should not be empty
      Assert.assertTrue(replicaTrashDir.list().length > 0);

> Move invalidated blocks to replica-trash with disk layout based on timestamp
> ----------------------------------------------------------------------------
>                 Key: HDFS-13163
>                 URL: https://issues.apache.org/jira/browse/HDFS-13163
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Bharat Viswanadham
>            Assignee: Bharat Viswanadham
>            Priority: Major
>         Attachments: HDFS-13163-HDFS-12996.00.patch, 
> HDFS-13163-HDFS-12996.01.patch
> When Blocks are invalidated, move the blocks to replica-trash directory and 
> place it in the folder when the invalidate is received from the namenode

This message was sent by Atlassian JIRA

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