Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update from apache/incubator-storm #3

Merged
merged 36 commits into from
Apr 15, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9368ac4
Fix for launching jar when some JVM opts are specified, now corrected…
yerenkow Feb 3, 2014
b25eeed
update commons-io dependency version
ptgoetz Mar 11, 2014
28e65a8
Fix race condition in Time.java
apetresc Mar 21, 2014
813952a
Bolt with whitespace in name can be viewed in ui
nielsbasjes Mar 24, 2014
dbf8faf
storm-starter: fix base directory path to point to `incubator-storm`
miguno Mar 24, 2014
be8a22b
storm-starter: remove leiningen section because leiningen is not used…
miguno Mar 24, 2014
df687cb
Ensure that no evil chars can be put into the HTML via the the name o…
nielsbasjes Mar 24, 2014
2c636ba
Ensure that also the topology id is encoded/decoded correctly
nielsbasjes Mar 24, 2014
447fdb0
STORM-263: update to carbonite 1.4.0/kryo 2.21
ptgoetz Mar 26, 2014
94c4d4d
STORM-12 Reduce thread usage of Netty transport.
Apr 1, 2014
ae71186
STORM-270 don't package .clj files in release jars.
Apr 3, 2014
0d3b833
STORM-273. Error while running storm topologies on Windows using "sto…
Apr 3, 2014
b30de82
Add STORM-263 to changelog.
Apr 4, 2014
2c8d3c8
STROM-247: Replace links to github resources in storm script (for Jul…
revans2 Apr 7, 2014
c028856
Merge branch 'master' of https://github.com/sureshms/incubator-storm
revans2 Apr 8, 2014
38ea0ca
STORM-273 updated change log.
revans2 Apr 8, 2014
4fbbf72
Merge branch 'no-clj-in-jar' of https://github.com/revans2/incubator-…
revans2 Apr 9, 2014
bde4f88
Added STORM-270 to changelog
revans2 Apr 9, 2014
fd82382
Merge branch 'STORM-258'
ptgoetz Apr 9, 2014
979fc28
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incu…
ptgoetz Apr 9, 2014
eb3ecb3
STORM-258: update changelog
ptgoetz Apr 9, 2014
23f6670
Merge branch 'patch-1' of github.com:apetresc/incubator-storm
ptgoetz Apr 9, 2014
89e2fbb
update CHANGELOG
ptgoetz Apr 9, 2014
6f0f30c
add JIRA # to changelog entry
ptgoetz Apr 9, 2014
1fc5c42
Merge branch 'readme-base-dir' of github.com:miguno/incubator-storm
ptgoetz Apr 9, 2014
253eac7
Merge branch 'readme-leiningen' of github.com:miguno/incubator-storm
ptgoetz Apr 9, 2014
3cf3f55
Merge branch 'master' of github.com:nielsbasjes/incubator-storm
ptgoetz Apr 9, 2014
2cd8f99
updated my e-mail address
Apr 10, 2014
9da324e
clean up fd after reading config
Apr 10, 2014
8a9c635
Remove too verbose comment about JAR_JVM_OPTS being array
yerenkow Apr 11, 2014
de46f71
Merge branch 'fix-storm-shlex' of https://github.com/yerenkow/incubat…
revans2 Apr 11, 2014
6c1af3e
Updated Changelog STORM-196: When JVM_OPTS are set, storm jar fails t…
revans2 Apr 11, 2014
0138928
Merge branch 'fix-readconfig-fd-leak' of github.com:d2r/incubator-storm
ptgoetz Apr 11, 2014
1be3d0f
STORM-281: update changelog
ptgoetz Apr 11, 2014
3e7abfc
Merge branch 'netty-thread-usage' of github.com:revans2/incubator-storm
ptgoetz Apr 11, 2014
1a0b46e
STORM-12: update changelog
ptgoetz Apr 11, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
## 0.9.2-incubating (unreleased)
* STORM-12: reduce thread usage of netty transport
* STORM-281: fix and issue with config parsing that could lead to leaking file descriptors
* STORM-196: When JVM_OPTS are set, storm jar fails to detect storm.jar from environment
* STORM-260: Fix a potential race condition with simulated time in Storm's unit tests
* STORM-258: Update commons-io version to 2.4
* STORM-270: don't package .clj files in release jars.
* STORM-273: Error while running storm topologies on Windows using "storm jar"
* STROM-247: Replace links to github resources in storm script
* STORM-263: Update Kryo version to 2.21+
* STORM-187: Fix Netty error "java.lang.IllegalArgumentException: timeout value is negative"
* STORM-186: fix float secs to millis long convertion
* STORM-70: Upgrade to ZK-3.4.5 and curator-1.3.3
* STORM-146: Unit test regression when storm is compiled with 3.4.5 zookeeper

## 0.9.1-incubating
* Fix to prevent Nimbus from hanging if random data is sent to nimbus thrift port
* Improved support for running on Windows platforms
Expand Down
19 changes: 10 additions & 9 deletions bin/storm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import random
import subprocess as sub
import getopt
import re
import shlex

def identity(x):
return x
Expand All @@ -45,7 +46,7 @@ if (not os.path.isfile(USER_CONF_DIR + "/storm.yaml")):
USER_CONF_DIR = CLUSTER_CONF_DIR
CONFIG_OPTS = []
CONFFILE = ""
JAR_JVM_OPTS = os.getenv('STORM_JAR_JVM_OPTS', '')
JAR_JVM_OPTS = shlex.split(os.getenv('STORM_JAR_JVM_OPTS', ''))


def get_config_opts():
Expand Down Expand Up @@ -147,15 +148,15 @@ def jar(jarfile, klass, *args):
Runs the main method of class with the specified arguments.
The storm jars and configs in ~/.storm are put on the classpath.
The process is configured so that StormSubmitter
(http://nathanmarz.github.com/storm/doc/backtype/storm/StormSubmitter.html)
(http://storm.incubator.apache.org/apidocs/backtype/storm/StormSubmitter.html)
will upload the jar at topology-jar-path when the topology is submitted.
"""
exec_storm_class(
klass,
jvmtype="-client",
extrajars=[jarfile, USER_CONF_DIR, STORM_DIR + "/bin"],
args=args,
jvmopts=[' '.join(filter(None, [JAR_JVM_OPTS, "-Dstorm.jar=" + jarfile]))])
jvmopts=JAR_JVM_OPTS + ["-Dstorm.jar=" + jarfile])

def kill(*args):
"""Syntax: [storm kill topology-name [-w wait-time-secs]]
Expand Down Expand Up @@ -262,7 +263,7 @@ def nimbus(klass="backtype.storm.daemon.nimbus"):
supervision with a tool like daemontools or monit.

See Setting up a Storm cluster for more information.
(https://github.com/nathanmarz/storm/wiki/Setting-up-a-Storm-cluster)
(http://storm.incubator.apache.org/documentation/Setting-up-a-Storm-cluster)
"""
cppaths = [CLUSTER_CONF_DIR]
jvmopts = parse_args(confvalue("nimbus.childopts", cppaths)) + [
Expand All @@ -282,7 +283,7 @@ def supervisor(klass="backtype.storm.daemon.supervisor"):
under supervision with a tool like daemontools or monit.

See Setting up a Storm cluster for more information.
(https://github.com/nathanmarz/storm/wiki/Setting-up-a-Storm-cluster)
(http://storm.incubator.apache.org/documentation/Setting-up-a-Storm-cluster)
"""
cppaths = [CLUSTER_CONF_DIR]
jvmopts = parse_args(confvalue("supervisor.childopts", cppaths)) + [
Expand All @@ -303,7 +304,7 @@ def ui():
should be run under supervision with a tool like daemontools or monit.

See Setting up a Storm cluster for more information.
(https://github.com/nathanmarz/storm/wiki/Setting-up-a-Storm-cluster)
(http://storm.incubator.apache.org/documentation/Setting-up-a-Storm-cluster)
"""
cppaths = [CLUSTER_CONF_DIR]
jvmopts = parse_args(confvalue("ui.childopts", cppaths)) + [
Expand All @@ -324,7 +325,7 @@ def logviewer():
tool like daemontools or monit.

See Setting up a Storm cluster for more information.
(https://github.com/nathanmarz/storm/wiki/Setting-up-a-Storm-cluster)
(http://storm.incubator.apache.org/documentation/Setting-up-a-Storm-cluster)
"""
cppaths = [CLUSTER_CONF_DIR]
jvmopts = parse_args(confvalue("logviewer.childopts", cppaths)) + [
Expand All @@ -344,7 +345,7 @@ def drpc():
with a tool like daemontools or monit.

See Distributed RPC for more information.
(https://github.com/nathanmarz/storm/wiki/Distributed-RPC)
(http://storm.incubator.apache.org/documentation/Distributed-RPC)
"""
cppaths = [CLUSTER_CONF_DIR]
jvmopts = parse_args(confvalue("drpc.childopts", cppaths)) + [
Expand Down Expand Up @@ -392,7 +393,7 @@ def print_commands():
"""Print all client commands and link to documentation"""
print "Commands:\n\t", "\n\t".join(sorted(COMMANDS.keys()))
print "\nHelp:", "\n\thelp", "\n\thelp <command>"
print "\nDocumentation for the storm client can be found at https://github.com/nathanmarz/storm/wiki/Command-line-client\n"
print "\nDocumentation for the storm client can be found at http://storm.incubator.apache.org/documentation/Command-line-client.html\n"
print "Configs can be overridden using one or more -c flags, e.g. \"storm list -c nimbus.host=nimbus.mycompany.com\"\n"

def print_usage(command=None):
Expand Down
14 changes: 2 additions & 12 deletions examples/storm-starter/README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Next, make sure you have the storm-starter code available on your machine. Git/
following command to download the latest storm-starter code and change to the new directory that contains the downloaded
code.

$ git clone git://github.com/apache/incubator-storm.git && cd storm/examples/storm-starter
$ git clone git://github.com/apache/incubator-storm.git && cd incubator-storm/examples/storm-starter


## storm-starter overview
Expand All @@ -47,16 +47,6 @@ If you want to learn more about how Storm works, please head over to the
[Storm project page](http://storm.incubator.apache.org).


<a name="leiningen"></a>

# Using storm-starter with Leiningen

## Install Leiningen

The storm-starter build uses [Leiningen](http://leiningen.org/) 2.0. Install Leiningen by following the
[leiningen installation instructions](https://github.com/technomancy/leiningen).


<a name="maven"></a>

# Using storm-starter with Maven
Expand Down Expand Up @@ -106,7 +96,7 @@ The following instructions will import storm-starter as a new project in Intelli


* Open _File > Import Project..._ and navigate to the storm-starter directory of your storm clone (e.g.
`~/git/storm/examples/storm-starter`).
`~/git/incubator-storm/examples/storm-starter`).
* Select _Import project from external model_, select "Maven", and click _Next_.
* In the following screen, enable the checkbox _Import Maven projects automatically_. Leave all other values at their
defaults. Click _Next_.
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<developer>
<id>jjackson</id>
<name>Jason Jackson</name>
<email>jason@cvk.ca</email>
<email>jasonjckn@gmail.com</email>
<roles>
<role>Committer</role>
</roles>
Expand Down Expand Up @@ -153,7 +153,7 @@
<clojure.version>1.4.0</clojure.version>
<compojure.version>1.1.3</compojure.version>
<hiccup.version>0.3.6</hiccup.version>
<commons-io.verson>1.4</commons-io.verson>
<commons-io.verson>2.4</commons-io.verson>
<commons-lang.version>2.5</commons-lang.version>
<commons-exec.version>1.1</commons-exec.version>
<clj-time.version>0.4.1</clj-time.version>
Expand All @@ -162,7 +162,7 @@
<ring.version>0.3.11</ring.version>
<clojure.tools.logging.version>0.2.3</clojure.tools.logging.version>
<clojure.math.numeric-tower.version>0.0.1</clojure.math.numeric-tower.version>
<carbonite.version>1.3.2</carbonite.version>
<carbonite.version>1.4.0</carbonite.version>
<snakeyaml.version>1.11</snakeyaml.version>
<httpclient.version>4.1.1</httpclient.version>
<clojure.tools.cli.version>0.2.2</clojure.tools.cli.version>
Expand Down
4 changes: 4 additions & 0 deletions storm-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@
<testSourceDirectory>test/clj</testSourceDirectory>
</testSourceDirectories>
<warnOnReflection>false</warnOnReflection>
<copyDeclaredNamespaceOnly>true</copyDeclaredNamespaceOnly>
<copiedNamespaces>
<copiedNamespace>none</copiedNamespace>
</copiedNamespaces>
</configuration>
<executions>
<execution>
Expand Down
25 changes: 16 additions & 9 deletions storm-core/src/clj/backtype/storm/ui/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@
:let [disp ((display-map k) k)]]
[(link-to (if (= k window) {:class "red"} {})
(url-format "/topology/%s?window=%s" id k)
disp)
(escape-html disp))
(get-in stats [:emitted k])
(get-in stats [:transferred k])
(float-str (get-in stats [:complete-latencies k]))
Expand Down Expand Up @@ -717,7 +717,7 @@
:let [disp ((display-map k) k)]]
[(link-to (if (= k window) {:class "red"} {})
(url-format "/topology/%s/component/%s?window=%s" topology-id id k)
disp)
(escape-html disp))
(get-in stats [:emitted k])
(get-in stats [:transferred k])
(float-str (get-in stats [:complete-latencies k]))
Expand Down Expand Up @@ -935,7 +935,7 @@
:let [disp ((display-map k) k)]]
[(link-to (if (= k window) {:class "red"} {})
(url-format "/topology/%s/component/%s?window=%s" topology-id id k)
disp)
(escape-html disp))
(get-in stats [:emitted k])
(get-in stats [:transferred k])
(float-str (get-in stats [:execute-latencies k]))
Expand Down Expand Up @@ -1016,34 +1016,40 @@
(-> (main-page)
ui-template))
(GET "/topology/:id" [:as {cookies :cookies} id & m]
(let [include-sys? (get-include-sys? cookies)]
(let [include-sys? (get-include-sys? cookies)
id (java.net.URLDecoder/decode id)]
(try
(-> (topology-page id (:window m) include-sys?)
(concat [(mk-system-toggle-button include-sys?)])
ui-template)
(catch Exception e (resp/redirect "/")))))
(GET "/topology/:id/component/:component" [:as {cookies :cookies} id component & m]
(let [include-sys? (get-include-sys? cookies)]
(let [include-sys? (get-include-sys? cookies)
id (java.net.URLDecoder/decode id)
component (java.net.URLDecoder/decode component)]
(-> (component-page id component (:window m) include-sys?)
(concat [(mk-system-toggle-button include-sys?)])
ui-template)))
(POST "/topology/:id/activate" [id]
(with-nimbus nimbus
(let [tplg (.getTopologyInfo ^Nimbus$Client nimbus id)
(let [id (java.net.URLDecoder/decode id)
tplg (.getTopologyInfo ^Nimbus$Client nimbus id)
name (.get_name tplg)]
(.activate nimbus name)
(log-message "Activating topology '" name "'")))
(resp/redirect (str "/topology/" id)))
(POST "/topology/:id/deactivate" [id]
(with-nimbus nimbus
(let [tplg (.getTopologyInfo ^Nimbus$Client nimbus id)
(let [id (java.net.URLDecoder/decode id)
tplg (.getTopologyInfo ^Nimbus$Client nimbus id)
name (.get_name tplg)]
(.deactivate nimbus name)
(log-message "Deactivating topology '" name "'")))
(resp/redirect (str "/topology/" id)))
(POST "/topology/:id/rebalance/:wait-time" [id wait-time]
(with-nimbus nimbus
(let [tplg (.getTopologyInfo ^Nimbus$Client nimbus id)
(let [id (java.net.URLDecoder/decode id)
tplg (.getTopologyInfo ^Nimbus$Client nimbus id)
name (.get_name tplg)
options (RebalanceOptions.)]
(.set_wait_secs options (Integer/parseInt wait-time))
Expand All @@ -1052,7 +1058,8 @@
(resp/redirect (str "/topology/" id)))
(POST "/topology/:id/kill/:wait-time" [id wait-time]
(with-nimbus nimbus
(let [tplg (.getTopologyInfo ^Nimbus$Client nimbus id)
(let [id (java.net.URLDecoder/decode id)
tplg (.getTopologyInfo ^Nimbus$Client nimbus id)
name (.get_name tplg)
options (KillOptions.)]
(.set_wait_secs options (Integer/parseInt wait-time))
Expand Down
2 changes: 1 addition & 1 deletion storm-core/src/clj/backtype/storm/util.clj
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@

(defn zip-contains-dir? [zipfile target]
(let [entries (->> zipfile (ZipFile.) .entries enumeration-seq (map (memfn getName)))]
(some? #(.startsWith % (str target file-path-separator)) entries)
(some? #(.startsWith % (str target "/")) entries)
))

(defn url-encode [s]
Expand Down
Loading