Skip to content

Commit fc63b2d

Browse files
author
Nathan Marz
committed
merge master
2 parents 26cc00a + 238f1c9 commit fc63b2d

File tree

5 files changed

+25
-12
lines changed

5 files changed

+25
-12
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## SNAPSHOT
2+
3+
* Bug fix: "storm supervisor" now uses supervisor.childopts instead of nimbus.childopts
4+
* Bug fix: supervisor.childopts and nimbus.childopts can now contain whitespace. Previously only the first token was taken from the string
5+
16
## 0.6.2
27

38
* Automatically delete old files in Nimbus's inbox. Configurable with "nimbus.cleanup.inbox.freq.secs" and "nimbus.inbox.jar.expiration.secs"

bin/storm

+10-9
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def confvalue(name, extrapaths):
5353
for line in lines:
5454
tokens = line.split(" ")
5555
if tokens[0] == "VALUE:":
56-
return tokens[1]
56+
return " ".join(tokens[1:])
5757

5858
def print_localconfvalue(name):
5959
print name + ": " + confvalue(name, [CONF_DIR])
@@ -106,11 +106,12 @@ def nimbus():
106106

107107
def supervisor():
108108
cppaths = [STORM_DIR + "/log4j", STORM_DIR + "/conf"]
109-
childopts = confvalue("nimbus.childopts", cppaths) + " -Dlogfile.name=supervisor.log -Dlog4j.configuration=storm.log.properties"
109+
childopts = confvalue("supervisor.childopts", cppaths) + " -Dlogfile.name=supervisor.log -Dlog4j.configuration=storm.log.properties"
110110
exec_storm_class("backtype.storm.daemon.supervisor", jvmtype="-server", extrajars=cppaths, childopts=childopts)
111111

112112
def ui():
113-
childopts = "-Xmx768m -Dlogfile.name=ui.log -Dlog4j.configuration=storm.log.properties"
113+
cppaths = [STORM_DIR + "/log4j", STORM_DIR + "/conf"]
114+
childopts = confvalue("ui.childopts", cppaths) + " -Dlogfile.name=ui.log -Dlog4j.configuration=storm.log.properties"
114115
exec_storm_class("backtype.storm.ui.core", jvmtype="-server", childopts=childopts, extrajars=[STORM_DIR + "/log4j", STORM_DIR, STORM_DIR + "/conf"])
115116

116117
def drpc():
@@ -120,11 +121,6 @@ def drpc():
120121
def print_classpath():
121122
print get_classpath([])
122123

123-
COMMANDS = {"jar": jar, "kill": kill, "shell": shell, "nimbus": nimbus, "ui": ui,
124-
"drpc": drpc, "supervisor": supervisor, "localconfvalue": print_localconfvalue,
125-
"remoteconfvalue": print_remoteconfvalue, "repl": repl, "classpath": print_classpath,
126-
"activate": activate, "deactivate": deactivate, "rebalance": rebalance}
127-
128124
def print_commands():
129125
global COMMANDS
130126
cmds = COMMANDS.keys()
@@ -137,14 +133,19 @@ def print_usage(msg=None):
137133
print msg
138134
print_commands()
139135

136+
COMMANDS = {"jar": jar, "kill": kill, "shell": shell, "nimbus": nimbus, "ui": ui,
137+
"drpc": drpc, "supervisor": supervisor, "localconfvalue": print_localconfvalue,
138+
"remoteconfvalue": print_remoteconfvalue, "repl": repl, "classpath": print_classpath,
139+
"activate": activate, "deactivate": deactivate, "rebalance": rebalance, "help": print_usage}
140+
140141
def main():
141142
if len(sys.argv) <= 1:
142143
print_usage()
143144
sys.exit(-1)
144145

145146
COMMAND = sys.argv[1]
146147
ARGS = sys.argv[2:]
147-
COMMANDS[COMMAND](*ARGS)
148+
(COMMANDS.get(COMMAND, "help"))(*ARGS)
148149

149150
if __name__ == "__main__":
150151
main()

conf/defaults.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ nimbus.task.launch.secs: 120
2424
nimbus.reassign: true
2525
nimbus.file.copy.expiration.secs: 600
2626

27+
### ui.* configs are for the master
2728
ui.port: 8080
29+
ui.childopts: "-Xmx768m"
2830

2931
drpc.port: 3772
3032
drpc.invocations.port: 3773

src/clj/backtype/storm/util.clj

+2-3
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@
115115
(toks->path (conj toks name))
116116
))
117117

118-
(defn not-nil? [o]
119-
(not (nil? o)))
118+
(def not-nil? (complement nil?))
120119

121120
(defn barr [& vals]
122121
(byte-array (map byte vals)))
@@ -519,7 +518,7 @@
519518
))
520519

521520
(defn nil-to-zero [v]
522-
(if v v 0))
521+
(or v 0))
523522

524523
(defn bit-xor-vals [vals]
525524
(reduce bit-xor 0 vals))

src/jvm/backtype/storm/Config.java

+6
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ public class Config extends HashMap<String, Object> {
154154
*/
155155
public static String UI_PORT = "ui.port";
156156

157+
/**
158+
* Childopts for Storm UI Java process.
159+
*/
160+
public static String UI_CHILDOPTS = "ui.childopts";
161+
162+
157163
/**
158164
* List of DRPC servers so that the DRPCSpout knows who to talk to.
159165
*/

0 commit comments

Comments
 (0)