storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [1/3] git commit: Added a hacky workaround for a FileNotFoundException I encountered while using storm and tika
Date Mon, 21 Jul 2014 16:47:27 GMT
Repository: incubator-storm
Updated Branches:
  refs/heads/master c1aed00e0 -> 5b425e41b


Added a hacky workaround for a FileNotFoundException I encountered
while using storm and tika


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

Branch: refs/heads/master
Commit: c2176bafefdc0bcefe2db5586c26d53ff27f0512
Parents: 9e77cd2
Author: Milad <icksa1@gmail.com>
Authored: Fri Jul 11 09:01:13 2014 -0500
Committer: Milad <icksa1@gmail.com>
Committed: Fri Jul 11 09:01:13 2014 -0500

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/daemon/supervisor.clj | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-storm/blob/c2176baf/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
index 414d894..ac9c3f7 100644
--- a/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/supervisor.clj
@@ -14,7 +14,8 @@
 ;; See the License for the specific language governing permissions and
 ;; limitations under the License.
 (ns backtype.storm.daemon.supervisor
-  (:import [backtype.storm.scheduler ISupervisor])
+  (:import [backtype.storm.scheduler ISupervisor]
+           [java.net JarURLConnection])
   (:use [backtype.storm bootstrap])
   (:use [backtype.storm.daemon common])
   (:require [backtype.storm.daemon [worker :as worker]])
@@ -532,8 +533,11 @@
               url
               (do
                 (log-message "Copying resources at " (str url) " to " target-dir)
-                (FileUtils/copyDirectory (File. (.getFile url)) (File. target-dir))
-                ))
+                (if (.startsWith (str url) "jar:file:" )
+                    (extract-dir-from-jar (.getFile (.getJarFileURL (.openConnection url)))
RESOURCES-SUBDIR stormroot)
+                    (FileUtils/copyDirectory (File. (.getFile url)) (File. target-dir)))
+                )
+              )
             )))
 
 (defmethod launch-worker


Mime
View raw message