Skip to content

Commit 4eb9422

Browse files
author
Nathan Marz
committed
fix setting up hshaserver args
1 parent c89270b commit 4eb9422

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/clj/backtype/storm/daemon/drpc.clj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@
6464
([spout-adder]
6565
(launch-server! DEFAULT-PORT spout-adder))
6666
([port spout-adder]
67-
(let [service-handler (service-handler spout-adder port)
68-
options (THsHaServer$Args. (TNonblockingServerSocket. port))
69-
_ (set! (. options maxWorkerThreads) 64)
70-
_ (set! (. options processor) (DistributedRPC$Processor. service-handler))
71-
_ (set! (. options protocolFactory) (TBinaryProtocol$Factory.))
67+
(let [service-handler (service-handler spout-adder port)
68+
options (-> (TNonblockingServerSocket. port)
69+
(THsHaServer$Args.)
70+
(.workerThreads 64)
71+
(.protocolFactory (TBinaryProtocol$Factory.))
72+
(.processor (DistributedRPC$Processor. service-handler))
73+
)
7274
server (THsHaServer. options)]
7375
(.addShutdownHook (Runtime/getRuntime) (Thread. (fn [] (.stop server))))
7476
(log-message "Starting Distributed RPC server...")

src/clj/backtype/storm/daemon/nimbus.clj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -607,13 +607,12 @@
607607
(defn launch-server! [conf]
608608
(validate-distributed-mode! conf)
609609
(let [service-handler (service-handler conf)
610-
options (THsHaServer$Args.
611-
(TNonblockingServerSocket. (int (conf NIMBUS-THRIFT-PORT))))
612-
_ (set! (. options workerThreads) 64)
613-
_ (set! (. options processor) (Nimbus$Processor. service-handler))
614-
_ (set! (. options protocolFactory) (TBinaryProtocol$Factory.))
615-
_ (set! (. options maxWorkerThreads) 64)
616-
610+
options (-> (TNonblockingServerSocket. (int (conf NIMBUS-THRIFT-PORT)))
611+
(THsHaServer$Args.)
612+
(.workerThreads 64)
613+
(.protocolFactory (TBinaryProtocol$Factory.))
614+
(.processor (Nimbus$Processor. service-handler))
615+
)
617616
server (THsHaServer. options)]
618617
(.addShutdownHook (Runtime/getRuntime) (Thread. (fn [] (.shutdown service-handler) (.stop server))))
619618
(log-message "Starting Nimbus server...")

0 commit comments

Comments
 (0)