Github user btiernay commented on the pull request:
https://github.com/apache/incubator-storm/pull/207#issuecomment-55579147
Source
---
```java
/**
* {@code StormJobExecutor} implementation responsible for executing local
topologies.
*/
@Slf4j
@Setter
public class LocalStormJobExecutor extends AbstractStormJobExecutor {
/**
* Configuration.
*/
@Value("${zk.host}")
private String zkHost;
@Value("${zk.port}")
private long zkPort;
/**
* State.
*/
private LocalCluster cluster;
@PostConstruct
public void initialize() {
log.info("Creating local cluster using external zookeeper: {}:{}...",
zkHost, zkPort);
this.cluster = new LocalCluster(zkHost, zkPort);
log.info("Finished creating local cluster");
}
@Override
public void execute(@NonNull StormJob job) {
log.info("Submitting local storm job '{}'...", job.getId());
cluster.submitTopology(job.getId(), job.getConfig(), job.getTopology());
log.info("Finished submitting local storm job '{}'", job.getId());
}
@PreDestroy
public void shutdown() {
log.info("Shutting down cluster...");
cluster.shutdown();
log.info("Finished shutting down cluster");
}
}
```
Log
---
Notice the `ZooKeeperServer` lines below:
```
2014-09-15 07:32:31,365 [main] INFO i.f.c.c.ComputeConfig - Creating local
storm job executor...
2014-09-15 07:32:31,371 [main] INFO i.f.c.s.LocalStormJobExecutor -
Creating local cluster using external zookeeper: localhost:21812...
2014-09-15 07:32:33,055 [main] INFO o.a.s.z.ZooKeeper - Client
environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2014-09-15 07:32:33,055 [main] INFO o.a.s.z.ZooKeeper - Client
environment:host.name=192.168.0.15
2014-09-15 07:32:33,055 [main] INFO o.a.s.z.ZooKeeper - Client
environment:java.version=1.7.0_55
2014-09-15 07:32:33,055 [main] INFO o.a.s.z.ZooKeeper - Client
environment:java.vendor=Oracle Corporation
2014-09-15 07:32:33,055 [main] INFO o.a.s.z.ZooKeeper - Client
environment:java.home=/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre
2014-09-15 07:32:33,055 [main] INFO o.a.s.z.ZooKeeper - Client
environment:java.class.path=...
2014-09-15 07:32:33,056 [main] INFO o.a.s.z.ZooKeeper - Client
environment:java.library.path=/Users/btiernay/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
2014-09-15 07:32:33,056 [main] INFO o.a.s.z.ZooKeeper - Client
environment:java.io.tmpdir=/var/folders/mf/03qtdmr131j0fstqrhncqmsr0000gp/T/
2014-09-15 07:32:33,056 [main] INFO o.a.s.z.ZooKeeper - Client
environment:java.compiler=<NA>
2014-09-15 07:32:33,056 [main] INFO o.a.s.z.ZooKeeper - Client
environment:os.name=Mac OS X
2014-09-15 07:32:33,056 [main] INFO o.a.s.z.ZooKeeper - Client
environment:os.arch=x86_64
2014-09-15 07:32:33,056 [main] INFO o.a.s.z.ZooKeeper - Client
environment:os.version=10.9.4
2014-09-15 07:32:33,056 [main] INFO o.a.s.z.ZooKeeper - Client
environment:user.name=btiernay
2014-09-15 07:32:33,056 [main] INFO o.a.s.z.ZooKeeper - Client
environment:user.home=/Users/btiernay
2014-09-15 07:32:33,056 [main] INFO o.a.s.z.ZooKeeper - Client
environment:user.dir=/Users/btiernay/Workspaces/fstream/fstream/fstream-compute
2014-09-15 07:32:33,069 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2014-09-15 07:32:33,070 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:host.name=192.168.0.15
2014-09-15 07:32:33,070 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:java.version=1.7.0_55
2014-09-15 07:32:33,070 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:java.vendor=Oracle Corporation
2014-09-15 07:32:33,070 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:java.home=/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/jre
2014-09-15 07:32:33,071 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:java.class.path=...
2014-09-15 07:32:33,071 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:java.library.
2014-09-15 07:32:33,071 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:java.io.tmpdir=/var/folders/mf/03qtdmr131j0fstqrhncqmsr0000gp/T/
2014-09-15 07:32:33,071 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:java.compiler=<NA>
2014-09-15 07:32:33,071 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:os.name=Mac OS X
2014-09-15 07:32:33,071 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:os.arch=x86_64
2014-09-15 07:32:33,071 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:os.version=10.9.4
2014-09-15 07:32:33,071 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:user.name=btiernay
2014-09-15 07:32:33,071 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:user.home=/Users/btiernay
2014-09-15 07:32:33,071 [main] INFO o.a.s.z.s.ZooKeeperServer - Server
environment:user.dir=/Users/btiernay/Workspaces/fstream/fstream/fstream-compute
2014-09-15 07:32:33,473 [main] INFO
b.s.u.StormBoundedExponentialBackoffRetry - The baseSleepTimeMs [1000] the
maxSleepTimeMs [30000] the maxRetries [5]
2014-09-15 07:32:33,521 [main] INFO o.a.s.c.f.i.CuratorFrameworkImpl -
Starting
2014-09-15 07:32:33,523 [main] INFO o.a.s.z.ZooKeeper - Initiating client
connection, connectString=localhost:21812 sessionTimeout=20000
watcher=org.apache.storm.curator.ConnectionState@45a87890
2014-09-15 07:32:33,539 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Opening socket connection to server
localhost/127.0.0.1:21812. Will not attempt to authenticate using SASL (unknown
error)
2014-09-15 07:32:33,545 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Socket connection established to
localhost/127.0.0.1:21812, initiating session
2014-09-15 07:32:33,551 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Session establishment complete on server
localhost/127.0.0.1:21812, sessionid = 0x148791588310003, negotiated timeout =
20000
2014-09-15 07:32:33,553 [main-EventThread] INFO
o.a.s.c.f.s.ConnectionStateManager - State change: CONNECTED
2014-09-15 07:32:33,555 [main-EventThread] INFO b.storm.zookeeper -
Zookeeper state update: :connected:none
2014-09-15 07:32:34,584 [main] INFO o.a.s.z.ZooKeeper - Session:
0x148791588310003 closed
2014-09-15 07:32:34,584 [main-EventThread] INFO o.a.s.z.ClientCnxn -
EventThread shut down
2014-09-15 07:32:34,586 [main] INFO
b.s.u.StormBoundedExponentialBackoffRetry - The baseSleepTimeMs [1000] the
maxSleepTimeMs [30000] the maxRetries [5]
2014-09-15 07:32:34,586 [main] INFO o.a.s.c.f.i.CuratorFrameworkImpl -
Starting
2014-09-15 07:32:34,587 [main] INFO o.a.s.z.ZooKeeper - Initiating client
connection, connectString=localhost:21812/storm sessionTimeout=20000
watcher=org.apache.storm.curator.ConnectionState@5c8e77c1
2014-09-15 07:32:34,588 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Opening socket connection to server
localhost/0:0:0:0:0:0:0:1:21812. Will not attempt to authenticate using SASL
(unknown error)
2014-09-15 07:32:34,588 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Socket connection established to
localhost/0:0:0:0:0:0:0:1:21812, initiating session
2014-09-15 07:32:34,590 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Session establishment complete on server
localhost/0:0:0:0:0:0:0:1:21812, sessionid = 0x148791588310004, negotiated
timeout = 20000
2014-09-15 07:32:34,590 [main-EventThread] INFO
o.a.s.c.f.s.ConnectionStateManager - State change: CONNECTED
2014-09-15 07:32:34,618 [main] INFO
b.s.u.StormBoundedExponentialBackoffRetry - The baseSleepTimeMs [1000] the
maxSleepTimeMs [30000] the maxRetries [5]
2014-09-15 07:32:34,619 [main] INFO o.a.s.c.f.i.CuratorFrameworkImpl -
Starting
2014-09-15 07:32:34,619 [main] INFO o.a.s.z.ZooKeeper - Initiating client
connection, connectString=localhost:21812 sessionTimeout=20000
watcher=org.apache.storm.curator.ConnectionState@2be4a3a2
2014-09-15 07:32:34,620 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Opening socket connection to server
localhost/0:0:0:0:0:0:0:1:21812. Will not attempt to authenticate using SASL
(unknown error)
2014-09-15 07:32:34,620 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Socket connection established to
localhost/0:0:0:0:0:0:0:1:21812, initiating session
2014-09-15 07:32:34,621 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Session establishment complete on server
localhost/0:0:0:0:0:0:0:1:21812, sessionid = 0x148791588310005, negotiated
timeout = 20000
2014-09-15 07:32:34,621 [main-EventThread] INFO
o.a.s.c.f.s.ConnectionStateManager - State change: CONNECTED
2014-09-15 07:32:34,622 [main-EventThread] INFO b.storm.zookeeper -
Zookeeper state update: :connected:none
2014-09-15 07:32:34,623 [main] INFO o.a.s.z.ZooKeeper - Session:
0x148791588310005 closed
2014-09-15 07:32:34,623 [main-EventThread] INFO o.a.s.z.ClientCnxn -
EventThread shut down
2014-09-15 07:32:34,624 [main] INFO
b.s.u.StormBoundedExponentialBackoffRetry - The baseSleepTimeMs [1000] the
maxSleepTimeMs [30000] the maxRetries [5]
2014-09-15 07:32:34,624 [main] INFO o.a.s.c.f.i.CuratorFrameworkImpl -
Starting
2014-09-15 07:32:34,624 [main] INFO o.a.s.z.ZooKeeper - Initiating client
connection, connectString=localhost:21812/storm sessionTimeout=20000
watcher=org.apache.storm.curator.ConnectionState@b898034
2014-09-15 07:32:34,625 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Opening socket connection to server
localhost/0:0:0:0:0:0:0:1:21812. Will not attempt to authenticate using SASL
(unknown error)
2014-09-15 07:32:34,625 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Socket connection established to
localhost/0:0:0:0:0:0:0:1:21812, initiating session
2014-09-15 07:32:34,625 [main] INFO
b.s.u.StormBoundedExponentialBackoffRetry - The baseSleepTimeMs [1000] the
maxSleepTimeMs [30000] the maxRetries [5]
2014-09-15 07:32:34,626 [main] INFO o.a.s.c.f.i.CuratorFrameworkImpl -
Starting
2014-09-15 07:32:34,626 [main] INFO o.a.s.z.ZooKeeper - Initiating client
connection, connectString=localhost:21812 sessionTimeout=20000
watcher=org.apache.storm.curator.ConnectionState@7674fd63
2014-09-15 07:32:34,626 [main-SendThread(localhost:21812)] INFO
o.a.s.z.ClientCnxn - Session establishment complete on server
localhost/0:0:0:0:0:0:0:1:21812, sessionid = 0x148791588310006, negotiated
timeout = 20000
2014-09-15 07:32:34,626 [main-EventThread] INFO
o.a.s.c.f.s.ConnectionStateManager - State change: CONNECTED
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---