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

Vinayakumar B commented on HDFS-5907:
-------------------------------------

Hi Arpit, Nice work,

Few doubts,
{code}
+      return (blockFile.renameTo(newBlockFile) &&
+          (metaFile.renameTo(newMetaFile) || !metaFile.exists()));
+    }{code}
Do we really need {{ !metaFile.exists()}} here for rename. Its ok for deletion 
case, but for move I feel its not necessary.

{code}       if (rollingUpgradeStatus != null &&
                
rollingUpgradeStatus.getBlockPoolId().compareTo(bpos.getBlockPoolId()) != 0) {
              // Can this ever occur?
              LOG.error("Invalid BlockPoolId " +
                            rollingUpgradeStatus.getBlockPoolId() +
                            " in HeartbeatResponse. Expected " +
                            bpos.getBlockPoolId());{code}
I dont think this check required.

{code}            RollingUpgradeStatus rollingUpgradeStatus = 
resp.getRollingUpdateStatus();
            if (rollingUpgradeStatus != null &&
                
rollingUpgradeStatus.getBlockPoolId().compareTo(bpos.getBlockPoolId()) != 0) {
              // Can this ever occur?
              LOG.error("Invalid BlockPoolId " +
                            rollingUpgradeStatus.getBlockPoolId() +
                            " in HeartbeatResponse. Expected " +
                            bpos.getBlockPoolId());
            } else {
              bpos.signalRollingUpgrade(rollingUpgradeStatus != null);
            }{code}
do you think this should be done for only Active Namenode heartbeat responses..?

> Handle block deletion requests during rolling upgrades
> ------------------------------------------------------
>
>                 Key: HDFS-5907
>                 URL: https://issues.apache.org/jira/browse/HDFS-5907
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode
>    Affects Versions: HDFS-5535 (Rolling upgrades)
>            Reporter: Arpit Agarwal
>            Assignee: Arpit Agarwal
>         Attachments: HDFS-5907.01.patch, HDFS-5907.02.patch
>
>
> DN changes when a rolling upgrade is in progress:
> # DataNode should handle block deletions by moving block files to 'trash'.
> # Block files should be restored to their original locations during a 
> rollback.
> # Purge trash when the rolling upgrade is finalized.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to