You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2023/01/06 18:06:20 UTC
[GitHub] [ozone] sodonnel opened a new pull request, #4153: HDDS-7739. EC: Increase the information in the RM sending command log message
sodonnel opened a new pull request, #4153:
URL: https://github.com/apache/ozone/pull/4153
## What changes were proposed in this pull request?
Replication Manager writes an info log each time it sends a command to a datanode, but aside from the command name, it doesn't contain any further information about the command. This change is to log more details about the command being sent which may aid debugging issues in the future.
Example new messages after this change:
```
2023-01-06 17:23:06,080 [main] INFO replication.ReplicationManager (ReplicationManager.java:sendDatanodeCommand(426)) - Sending command [replicateContainerCommand: containerId: 1, replicaIndex: 1, sourceNodes: [localhost-143.110.182.62/143.110.182.62, localhost-243.150.55.19/243.150.55.19]] for container ContainerInfo{id=#1, state=CLOSED, pipelineID=PipelineID=bdd96da4-f447-45d4-9331-62480e7bf224, stateEnterTime=1970-01-01T00:00:00Z, owner=Ozone} to f8bca9d9-cf71-4e8a-aaed-f48ddc148a73{ip: 37.218.105.163, host: localhost-37.218.105.163, ports: [STANDALONE=0, RATIS=0, REST=0, REPLICATION=0, RATIS_ADMIN=0, RATIS_SERVER=0, RATIS_DATASTREAM=0], networkLocation: /default-rack, certSerialId: null, persistedOpState: IN_SERVICE, persistedOpStateExpiryEpochSec: 0}
2023-01-06 17:23:05,893 [main] INFO replication.ReplicationManager (ReplicationManager.java:sendDatanodeCommand(426)) - Sending command [closeContainerCommand: containerID: 1, pipelineID: PipelineID=6dad5a63-dfa1-4621-b8c4-7de81e024cdc, force: true] for container ContainerInfo{id=#1, state=CLOSED, pipelineID=PipelineID=6dad5a63-dfa1-4621-b8c4-7de81e024cdc, stateEnterTime=1970-01-01T00:00:00Z, owner=Ozone} to bb47be9c-0886-4852-8ca7-46799ac36883{ip: 140.122.156.42, host: localhost-140.122.156.42, ports: [STANDALONE=0, RATIS=0, REST=0, REPLICATION=0, RATIS_ADMIN=0, RATIS_SERVER=0, RATIS_DATASTREAM=0], networkLocation: /default-rack, certSerialId: null, persistedOpState: IN_SERVICE, persistedOpStateExpiryEpochSec: 0}
2023-01-06 17:23:05,938 [main] INFO replication.ReplicationManager (ReplicationManager.java:sendDatanodeCommand(426)) - Sending command [reconstructECContainersCommand: containerID: 1, replicationConfig: EC/ECReplicationConfig{data=3, parity=2, ecChunkSize=1048576, codec=rs}, sources: [localhost-208.151.31.91/208.151.31.91 replicaIndex: 1, localhost-27.100.52.223/27.100.52.223 replicaIndex: 2, localhost-247.11.160.69/247.11.160.69 replicaIndex: 3], targets: [localhost-220.147.5.156/220.147.5.156, localhost-193.210.182.11/193.210.182.11], missingIndexes: [4, 5]] for container ContainerInfo{id=#1, state=CLOSED, pipelineID=PipelineID=874dd4ae-c222-4f91-b587-81551ef78a20, stateEnterTime=1970-01-01T00:00:00Z, owner=Ozone} to ecd0da3f-68b0-4bf8-85da-b7d3a41100a2{ip: 220.147.5.156, host: localhost-220.147.5.156, ports: [STANDALONE=0, RATIS=0, REST=0, REPLICATION=0, RATIS_ADMIN=0, RATIS_SERVER=0, RATIS_DATASTREAM=0], networkLocation: /default-rack, certSerialId: null, persistedOpState: I
N_SERVICE, persistedOpStateExpiryEpochSec: 0}
2023-01-06 17:23:05,987 [main] INFO replication.ReplicationManager (ReplicationManager.java:sendDatanodeCommand(426)) - Sending command [deleteContainerCommand: containerID: 1, replicaIndex: 1, force: false] for container ContainerInfo{id=#1, state=CLOSED, pipelineID=PipelineID=4c4b1a01-ebbf-466a-a1f3-45b306533709, stateEnterTime=1970-01-01T00:00:00Z, owner=Ozone} to 7c838ac2-d7bd-4719-ac38-f1ff5adb7869{ip: 122.2.174.81, host: localhost-122.2.174.81, ports: [STANDALONE=0, RATIS=0, REST=0, REPLICATION=0, RATIS_ADMIN=0, RATIS_SERVER=0, RATIS_DATASTREAM=0], networkLocation: /default-rack, certSerialId: null, persistedOpState: IN_SERVICE, persistedOpStateExpiryEpochSec: 0}
```
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7739
## How was this patch tested?
Logging only change. I ran some tests which caused the logs to be emitted and checked their format (posted above).
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] sodonnel commented on a diff in pull request #4153: HDDS-7739. EC: Increase the information in the RM sending command log message
Posted by GitBox <gi...@apache.org>.
sodonnel commented on code in PR #4153:
URL: https://github.com/apache/ozone/pull/4153#discussion_r1064545955
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java:
##########
@@ -195,6 +195,15 @@ public String getHostName() {
return hostName;
}
+ /**
+ * Returns the Hostname and IP of the datanode separated by a slash.
+ *
+ * Eg: datanode001.corp/192.168.0.123
+ */
+ public String getHostNameAndIP() {
+ return getHostName() + "/" + getIpAddress();
Review Comment:
I'm fine with adding UUID into the string too. It would solve the problem with mini-cluster where all the nodes are on the same host / IP. I wonder if anything would break if we changed the default datanode details to string? Almost everywhere it is logged, we don't call about all the verbose info it currently includes. We really just want to the host / IP / ID.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on a diff in pull request #4153: HDDS-7739. EC: Increase the information in the RM sending command log message
Posted by GitBox <gi...@apache.org>.
adoroszlai commented on code in PR #4153:
URL: https://github.com/apache/ozone/pull/4153#discussion_r1064538150
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/protocol/DatanodeDetails.java:
##########
@@ -195,6 +195,15 @@ public String getHostName() {
return hostName;
}
+ /**
+ * Returns the Hostname and IP of the datanode separated by a slash.
+ *
+ * Eg: datanode001.corp/192.168.0.123
+ */
+ public String getHostNameAndIP() {
+ return getHostName() + "/" + getIpAddress();
Review Comment:
I would love to make this (or UUID + this) the default toString, and renaming the existing more verbose toString to something like `toDebugString`. This way we could avoid having to convert manually in all places, and use the verbose one explicitly if needed.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai merged pull request #4153: HDDS-7739. EC: Increase the information in the RM sending command log message
Posted by GitBox <gi...@apache.org>.
adoroszlai merged PR #4153:
URL: https://github.com/apache/ozone/pull/4153
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org