Skip to content

Commit 3fd1eb0

Browse files
jniocheclaude
andcommitted
Fix silent exception swallow in LocalFsBlobStore.prepare()
If ClusterUtils.mkStormClusterState() threw (e.g. ZooKeeper unreachable), the exception was caught and printed to stderr via e.printStackTrace(), leaving stormClusterState null. Every subsequent blob store operation (startSyncBlobs, setupBlobstore, blobSync) would then crash with a NullPointerException rather than a meaningful error. Rethrow as RuntimeException to match the existing pattern used a few lines above for FileBlobStoreImpl initialization, and to surface the root cause at startup instead of at first use. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 76b9b4d commit 3fd1eb0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

storm-server/src/main/java/org/apache/storm/blobstore/LocalFsBlobStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void prepare(Map<String, Object> conf, String overrideBase, NimbusInfo ni
110110
try {
111111
this.stormClusterState = ClusterUtils.mkStormClusterState(conf, new ClusterStateContext(DaemonType.NIMBUS, conf));
112112
} catch (Exception e) {
113-
e.printStackTrace();
113+
throw new RuntimeException("Failed to initialize cluster state for LocalFsBlobStore", e);
114114
}
115115
timer = new Timer("BLOB-STORE-TIMER", true);
116116
this.leaderElector = leaderElector;

0 commit comments

Comments
 (0)