File tree 2 files changed +13
-12
lines changed
src/clj/backtype/storm/daemon 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 64
64
([spout-adder]
65
65
(launch-server! DEFAULT-PORT spout-adder))
66
66
([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
+ )
72
74
server (THsHaServer. options)]
73
75
(.addShutdownHook (Runtime/getRuntime ) (Thread. (fn [] (.stop server))))
74
76
(log-message " Starting Distributed RPC server..." )
Original file line number Diff line number Diff line change 607
607
(defn launch-server! [conf]
608
608
(validate-distributed-mode! conf)
609
609
(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
+ )
617
616
server (THsHaServer. options)]
618
617
(.addShutdownHook (Runtime/getRuntime ) (Thread. (fn [] (.shutdown service-handler) (.stop server))))
619
618
(log-message " Starting Nimbus server..." )
You can’t perform that action at this time.
0 commit comments