[ https://issues.apache.org/jira/browse/HDFS-16086?focusedWorklogId=615967&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-615967 ]
ASF GitHub Bot logged work on HDFS-16086: ----------------------------------------- Author: ASF GitHub Bot Created on: 29/Jun/21 03:07 Start Date: 29/Jun/21 03:07 Worklog Time Spent: 10m Work Description: jojochuang commented on a change in pull request #3136: URL: https://github.com/apache/hadoop/pull/3136#discussion_r660246410 ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/Replica.java ########## @@ -19,49 +19,56 @@ import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants.ReplicaState; +import org.apache.hadoop.hdfs.server.datanode.fsdataset.FsVolumeSpi; /** * This represents block replicas which are stored in DataNode. */ @InterfaceAudience.Private public interface Replica { /** Get the block ID */ - public long getBlockId(); + long getBlockId(); /** Get the generation stamp */ - public long getGenerationStamp(); + long getGenerationStamp(); /** * Get the replica state * @return the replica state */ - public ReplicaState getState(); + ReplicaState getState(); /** * Get the number of bytes received * @return the number of bytes that have been received */ - public long getNumBytes(); + long getNumBytes(); /** * Get the number of bytes that have written to disk * @return the number of bytes that have written to disk */ - public long getBytesOnDisk(); + long getBytesOnDisk(); /** * Get the number of bytes that are visible to readers * @return the number of bytes that are visible to readers */ - public long getVisibleLength(); + long getVisibleLength(); Review comment: please do not change these interface methods. These changes are not required and makes backport harder. ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java ########## @@ -587,7 +587,7 @@ public void readBlock(final ExtendedBlock block, final String clientTraceFmt = clientName.length() > 0 && ClientTraceLog.isInfoEnabled() ? String.format(DN_CLIENTTRACE_FORMAT, localAddress, remoteAddress, - "%d", "HDFS_READ", clientName, "%d", + "", "%d", "HDFS_READ", clientName, "%d", Review comment: looks like redundant change? ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java ########## @@ -1631,6 +1633,7 @@ public ReplicaHandler createRbw( if (ref == null) { ref = volumes.getNextVolume(storageType, storageId, b.getNumBytes()); } + LOG.info("Creating Rbw, block: {} on volume: {}", b, ref.getVolume()); Review comment: is this really necessary? IMO logging one message for every rbw is just too much. ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java ########## @@ -929,7 +929,7 @@ public void writeBlock(final ExtendedBlock block, if (isDatanode || stage == BlockConstructionStage.PIPELINE_CLOSE_RECOVERY) { datanode.closeBlock(block, null, storageUuid, isOnTransientStorage); - LOG.info("Received {} src: {} dest: {} of size {}", + LOG.info("Received {} src: {} dest: {} volume: {} of size {}", Review comment: missing the parameter for volume. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 615967) Time Spent: 50m (was: 40m) > Add volume information to datanode log for tracing > -------------------------------------------------- > > Key: HDFS-16086 > URL: https://issues.apache.org/jira/browse/HDFS-16086 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: tomscut > Assignee: tomscut > Priority: Minor > Labels: pull-request-available > Attachments: CreatingRbw.jpg, Received.jpg > > Time Spent: 50m > Remaining Estimate: 0h > > To keep track of the block in volume, we can add the volume information to > the datanode log. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org