Class ContainerLogger
java.lang.Object
org.apache.hadoop.ozone.container.common.utils.ContainerLogger
Utility class defining methods to write to the datanode container log.
The container log contains brief messages about container replica level
events like state changes or replication/reconstruction. Messages in this
log are minimal, so it can be used to track the history of every container
on a datanode for a long period of time without rolling off.
All messages should be logged after their corresponding event succeeds, to
prevent misleading state changes or logs filling with retries on errors.
Errors and retries belong in the main datanode application log.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidlogChecksumUpdated(ContainerData containerData, long oldDataChecksum) Logged when a container's checksum is updated.static voidlogClosed(ContainerData containerData) Logged when a container is moved to the closed state.static voidlogClosing(ContainerData containerData) Logged when a container is moved to the closing state.static voidlogDeleted(ContainerData containerData, boolean force) Logged when a container is deleted because it is empty.static voidlogExported(ContainerData containerData) Logged when a container is copied from this datanode.static voidlogImported(ContainerData containerData) Logged when a container is copied in to this datanode.static voidlogLost(ContainerData containerData, String message) Logged when a container is lost from this datanode.static voidlogOpen(ContainerData containerData) Logged when an open container is first created.static voidlogQuasiClosed(ContainerData containerData, String message) Logged when a Ratis container is moved to the quasi-closed state.static voidlogReconciled(ContainerData containerData, long oldDataChecksum, org.apache.hadoop.hdds.protocol.DatanodeDetails peer) Logged when a container is reconciled.static voidlogRecovered(ContainerData containerData) Logged when a container is recovered using EC offline reconstruction.static voidlogUnhealthy(ContainerData containerData, ScanResult reason) Logged when a container is moved to the unhealthy state.
-
Field Details
-
LOG_NAME
- See Also:
-
-
Method Details
-
logOpen
Logged when an open container is first created.- Parameters:
containerData- The container that was created and opened.
-
logClosing
Logged when a container is moved to the closing state.- Parameters:
containerData- The container that was marked as closing.
-
logQuasiClosed
Logged when a Ratis container is moved to the quasi-closed state.- Parameters:
containerData- The container that was quasi-closed.message- The reason the container was quasi-closed, if known.
-
logClosed
Logged when a container is moved to the closed state.- Parameters:
containerData- The container that was closed.
-
logUnhealthy
Logged when a container is moved to the unhealthy state.- Parameters:
containerData- The container that was marked unhealthy.reason- The reason the container was marked unhealthy.
-
logLost
Logged when a container is lost from this datanode. Currently this would only happen on volume failure. Container deletes do not count as lost containers.- Parameters:
containerData- The container that was lost.message- The reason the container was lost.
-
logDeleted
Logged when a container is deleted because it is empty.- Parameters:
containerData- The container that was deleted.
-
logImported
Logged when a container is copied in to this datanode.- Parameters:
containerData- The container that was imported to this datanode.
-
logExported
Logged when a container is copied from this datanode.- Parameters:
containerData- The container that was exported from this datanode.
-
logRecovered
Logged when a container is recovered using EC offline reconstruction.- Parameters:
containerData- The container that was recovered on this datanode.
-
logChecksumUpdated
Logged when a container's checksum is updated.- Parameters:
containerData- The container which has the updated data checksum.oldDataChecksum- The old data checksum.
-
logReconciled
public static void logReconciled(ContainerData containerData, long oldDataChecksum, org.apache.hadoop.hdds.protocol.DatanodeDetails peer) Logged when a container is reconciled.- Parameters:
containerData- The container that was reconciled on this datanode.oldDataChecksum- The old data checksum.
-