Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2812#discussion_r213125537
  
    --- 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 --
    
    Yes please. Let's decouple unnecessary things.


---

Reply via email to