storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [1/4] storm git commit: STORM-3288: Fix issue with reources in jar files
Date Sat, 24 Nov 2018 14:02:03 GMT
Repository: storm
Updated Branches:
  refs/heads/master 40f1b6104 -> 52cb6b20a


STORM-3288: Fix issue with reources in jar files


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/5784eb1a
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/5784eb1a
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/5784eb1a

Branch: refs/heads/master
Commit: 5784eb1afc1ea911aeb639020f6c9afd7e414280
Parents: 29eb449
Author: Robert (Bobby) Evans <evans@yahoo-inc.com>
Authored: Fri Nov 16 10:02:47 2018 -0600
Committer: Robert (Bobby) Evans <evans@yahoo-inc.com>
Committed: Fri Nov 16 10:16:35 2018 -0600

----------------------------------------------------------------------
 .../org/apache/storm/localizer/LocallyCachedTopologyBlob.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/5784eb1a/storm-server/src/main/java/org/apache/storm/localizer/LocallyCachedTopologyBlob.java
----------------------------------------------------------------------
diff --git a/storm-server/src/main/java/org/apache/storm/localizer/LocallyCachedTopologyBlob.java
b/storm-server/src/main/java/org/apache/storm/localizer/LocallyCachedTopologyBlob.java
index 795abe7..ae0a8a9 100644
--- a/storm-server/src/main/java/org/apache/storm/localizer/LocallyCachedTopologyBlob.java
+++ b/storm-server/src/main/java/org/apache/storm/localizer/LocallyCachedTopologyBlob.java
@@ -189,7 +189,7 @@ public class LocallyCachedTopologyBlob extends LocallyCachedBlob {
                 JarEntry entry = jarEnums.nextElement();
                 String name = entry.getName();
                 if (!entry.isDirectory() && name.startsWith(toRemove)) {
-                    String shortenedName = name.replace(toRemove, "");
+                    String shortenedName = name.substring(toRemove.length());
                     Path targetFile = dest.resolve(shortenedName);
                     LOG.debug("EXTRACTING {} SHORTENED to {} into {}", name, shortenedName,
targetFile);
                     fsOps.forceMkdir(targetFile.getParent());
@@ -197,6 +197,8 @@ public class LocallyCachedTopologyBlob extends LocallyCachedBlob {
                          InputStream in = jarFile.getInputStream(entry)) {
                         IOUtils.copy(in, out);
                     }
+                } else {
+                    LOG.debug("Skipping {}", entry);
                 }
             }
         }


Mime
View raw message