Kohei Sugihara created HDDS-8636:
------------------------------------
Summary: Containers in schema V1 fail for replication after the
1.3.0 upgrade
Key: HDDS-8636
URL: https://issues.apache.org/jira/browse/HDDS-8636
Project: Apache Ozone
Issue Type: Bug
Components: Ozone Datanode
Reporter: Kohei Sugihara
Containers with the schema version V1 fail for replication with
NullPointerException. I will attach the stack trace taken by the debugger.
Source revision is [our forked
version|https://github.com/pfnet/ozone/tree/pfn-ozone-1.3.990004] (ozone-1.3
compatible).
{code:java}
"ContainerReplicationThread-30@14206" daemon prio=5 tid=0x939 nid=NA runnable
java.lang.Thread.State: RUNNABLE
at
org.apache.hadoop.ozone.container.keyvalue.helpers.KeyValueContainerLocationUtil.getContainerDBFile(KeyValueContainerLocationUtil.java:110)
at
org.apache.hadoop.ozone.container.keyvalue.KeyValueContainer.getContainerDBFile(KeyValueContainer.java:824)
at
org.apache.hadoop.ozone.container.keyvalue.KeyValueContainer.populatePathFields(KeyValueContainer.java:230)
at
org.apache.hadoop.ozone.container.keyvalue.KeyValueHandler.populateContainerPathFields(KeyValueHandler.java:341)
at
org.apache.hadoop.ozone.container.keyvalue.KeyValueHandler.importContainer(KeyValueHandler.java:976)
at
org.apache.hadoop.ozone.container.ozoneimpl.ContainerController.importContainer(ContainerController.java:162)
at
org.apache.hadoop.ozone.container.replication.DownloadAndImportReplicator.importContainer(DownloadAndImportReplicator.java:83)
at
org.apache.hadoop.ozone.container.replication.DownloadAndImportReplicator.replicate(DownloadAndImportReplicator.java:121)
at
org.apache.hadoop.ozone.container.replication.MeasuredReplicator.replicate(MeasuredReplicator.java:77)
at
org.apache.hadoop.ozone.container.replication.ReplicationSupervisor$TaskRunner.run(ReplicationSupervisor.java:168)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:829) {code}
The problem is containerData.getSchemaVersion() returns null. I think container
schema V1 does not have the 'schemaVersion' field in a .container YAML so that
this code will fail with NPE.
{code:java}
/**
* Return containerDB File.
*/
public static File getContainerDBFile(KeyValueContainerData containerData) {
if (containerData.getSchemaVersion().equals(OzoneConsts.SCHEMA_V3)) {
return new File(containerData.getVolume().getDbParentDir(),
OzoneConsts.CONTAINER_DB_NAME);
}
return getContainerDBFile(containerData.getMetadataPath(), containerData);
} {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]