ArafatKhan2198 commented on code in PR #9436:
URL: https://github.com/apache/ozone/pull/9436#discussion_r2597394090
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/OzoneManagerServiceProviderImpl.java:
##########
@@ -272,6 +272,7 @@ public void start() {
throw new RuntimeException(runtimeException);
}
}
+ reconTaskController.updateOMMetadataManager(omMetadataManager);
Review Comment:
What's happening is that `ReconTaskControllerImpl` contains a
`ReconOMMetadataManager` object that is not initialized in the constructor.
Instead, it is initialized by the `updateOMMetadataManager` method, which is
called at a different point in the startup sequence.
When `OzoneManagerServiceProviderImpl` starts up, its `.start()` method
calls `reconTaskController.start()`. At that moment, the `reconTaskController`
begins its operations, but its internal `ReconOMMetadataManager` object is
still null. - [Code
Line](https://github.com/apache/ozone/blob/55562bd9ac93383de806c3a5eab0103d9236d093/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/OzoneManagerServiceProviderImpl.java#L275)
-
The logs show an error in `reconTaskController` occurring when an upgrade
action for rebuilding the tree is executed. This action calls
`ReconTaskControllerImpl.createOMCheckpoint()`, which requires the
`ReconOMMetadataManager` object to be set.
To fix this, I added the call to
`reconTaskController.updateOMMetadataManager(omMetadataManager);` before
`reconTaskController.start()`. This ensures the `ReconOMMetadataManager` object
is initialized for the `reconTaskController` before it's needed, which is a
pattern seen in other parts of the code as well.
```
2025-12-02 19:41:57,791 INFO
[main]-org.apache.hadoop.ozone.recon.upgrade.ReconLayoutVersionManager: Feature
versioned 2 finalized successfully.
2025-12-02 19:41:57,792 INFO
[main]-org.apache.hadoop.ozone.recon.ReconSchemaVersionTableManager: Updated
schema version to '3'.
2025-12-02 19:41:57,792 INFO
[main]-org.apache.hadoop.ozone.recon.upgrade.ReconLayoutVersionManager: MLV
updated to: 3
2025-12-02 19:41:57,792 INFO
[main]-org.apache.hadoop.ozone.recon.upgrade.NSSummaryAggregatedTotalsUpgrade:
Triggering asynchronous NSSummary tree rebuild for materialized totals (upgrade
action).
2025-12-02 19:41:57,792 INFO
[main]-org.apache.hadoop.ozone.recon.tasks.ReconTaskControllerImpl: Queueing
task reinitialization event due to: MANUAL_TRIGGER (retry attempt count: 0)
2025-12-02 19:41:57,792 INFO
[main]-org.apache.hadoop.ozone.recon.tasks.ReconTaskControllerImpl: Attempting
checkpoint creation (retry attempt: 1)
2025-12-02 19:41:57,794 ERROR
[main]-org.apache.hadoop.ozone.recon.upgrade.ReconLayoutVersionManager: Failed
to finalize feature 3. Rolling back changes.
java.lang.NullPointerException: Cannot invoke
"org.apache.hadoop.ozone.recon.recovery.ReconOMMetadataManager.getStore()"
because "omMetaManager" is null
at
org.apache.hadoop.ozone.recon.tasks.ReconTaskControllerImpl.cleanTempCheckPointPath(ReconTaskControllerImpl.java:624)
at
org.apache.hadoop.ozone.recon.tasks.ReconTaskControllerImpl.createOMCheckpoint(ReconTaskControllerImpl.java:607)
at
org.apache.hadoop.ozone.recon.tasks.ReconTaskControllerImpl.queueReInitializationEvent(ReconTaskControllerImpl.java:503)
at
org.apache.hadoop.ozone.recon.upgrade.NSSummaryAggregatedTotalsUpgrade.execute(NSSummaryAggregatedTotalsUpgrade.java:54)
at
org.apache.hadoop.ozone.recon.upgrade.ReconLayoutVersionManager.finalizeLayoutFeatures(ReconLayoutVersionManager.java:101)
at org.apache.hadoop.ozone.recon.ReconServer.call(ReconServer.java:177)
at org.apache.hadoop.ozone.recon.ReconServer.call(ReconServer.java:73)
at picocli.CommandLine.executeUserObject(CommandLine.java:2031)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at
picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2423)
at
picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2425)
at picocli.CommandLine.execute(CommandLine.java:2174)
at org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:89)
at org.apache.hadoop.hdds.cli.GenericCli.run(GenericCli.java:80)
at org.apache.hadoop.ozone.recon.ReconServer.main(ReconServer.java:95)
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]