Github user revans2 commented on a diff in the pull request: https://github.com/apache/storm/pull/2812#discussion_r213030220 --- Diff: storm-server/src/main/java/org/apache/storm/localizer/LocallyCachedTopologyBlob.java --- @@ -53,21 +54,24 @@ private final boolean isLocalMode; private final Path topologyBasicBlobsRootDir; private final AdvancedFSOps fsOps; + private final String owner; private volatile long version = NOT_DOWNLOADED_VERSION; private volatile long size = 0; + /** * Create a new LocallyCachedBlob. - * - * @param topologyId the ID of the topology. + * @param topologyId the ID of the topology. * @param type the type of the blob. + * @param assignment the assignment, mostly to know who the owner is. */ protected LocallyCachedTopologyBlob(final String topologyId, final boolean isLocalMode, final Map<String, Object> conf, - final AdvancedFSOps fsOps, final TopologyBlobType type) throws IOException { + final AdvancedFSOps fsOps, final TopologyBlobType type, LocalAssignment assignment) throws IOException { super(topologyId + " " + type.getFileName(), type.getKey(topologyId)); this.topologyId = topologyId; this.type = type; this.isLocalMode = isLocalMode; this.fsOps = fsOps; + this.owner = assignment.get_owner(); topologyBasicBlobsRootDir = Paths.get(ConfigUtils.supervisorStormDistRoot(conf, topologyId)); --- End diff -- So originally the code we had internally was using the assignment to decide if it needed to create the `shared_by_topology` directory. This was something that I missed back porting to open source, but when doing it I realized that there was a bug in the code because the assignment could change and the directory would not be updated so I opted to just create it all the time instead, but I didn't update the param being passed in. If you want me to change it I am happy to.
---