Github user danny0405 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2517#discussion_r162608557
--- Diff:
storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java ---
@@ -1263,24 +1281,23 @@ private void setupStormCode(Map<String, Object>
conf, String topoId, String tmpJ
String codeKey = ConfigUtils.masterStormCodeKey(topoId);
String confKey = ConfigUtils.masterStormConfKey(topoId);
NimbusInfo hostPortInfo = nimbusHostPortInfo;
+
if (tmpJarLocation != null) {
//in local mode there is no jar
try (FileInputStream fin = new
FileInputStream(tmpJarLocation)) {
store.createBlob(jarKey, fin, new
SettableBlobMeta(BlobStoreAclHandler.DEFAULT), subject);
}
- if (store instanceof LocalFsBlobStore) {
- clusterState.setupBlobstore(jarKey, hostPortInfo,
getVersionForKey(jarKey, hostPortInfo, conf));
- }
}
topoCache.addTopoConf(topoId, subject, topoConf);
- if (store instanceof LocalFsBlobStore) {
- clusterState.setupBlobstore(confKey, hostPortInfo,
getVersionForKey(confKey, hostPortInfo, conf));
- }
-
topoCache.addTopology(topoId, subject, topology);
+
if (store instanceof LocalFsBlobStore) {
- clusterState.setupBlobstore(codeKey, hostPortInfo,
getVersionForKey(codeKey, hostPortInfo, conf));
+ if (tmpJarLocation != null) {
+ clusterState.setupBlobstore(jarKey, hostPortInfo,
getVersionForKey(jarKey, hostPortInfo, getOrCreateZkClient()));
--- End diff --
Done.
---