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

    https://github.com/apache/storm/pull/2925#discussion_r240759867
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/dependency/DependencyUploader.java ---
    @@ -154,11 +154,23 @@ private boolean uploadDependencyToBlobStore(String 
key, File dependency)
                 acls.add(new AccessControl(AccessControlType.OTHER,
                                            BlobStoreAclHandler.READ));
     
    -            AtomicOutputStream blob = getBlobStore().createBlob(key, new 
SettableBlobMeta(acls));
    -            Files.copy(dependency.toPath(), blob);
    -            blob.close();
    +            AtomicOutputStream blob = null;
    +            try {
    +                blob = getBlobStore().createBlob(key, new 
SettableBlobMeta(acls));
    +                Files.copy(dependency.toPath(), blob);
    +                blob.close();
    +                blob = null;
     
    -            uploadNew = true;
    +                uploadNew = true;
    +            } finally {
    +                try {
    +                    if (blob != null) {
    +                        blob.cancel();
    +                    }
    +                } catch (IOException throwaway) {
    +                    // Ignore.
    --- End diff --
    
    Ignore that. This exception will appear only while attempting to cancel the 
blob connection. We should ignore it.


---

Reply via email to