use of io.pravega.cli.admin.utils.ZKConnectionFailedException in project pravega by pravega.
the class GetClusterNodesCommand method execute.
@Override
public void execute() {
ensureArgCount(0);
try {
@Cleanup ZKHelper zkStoreHelper = ZKHelper.create(getServiceConfig().getZkURL(), getServiceConfig().getClusterName());
prettyJSONOutput("cluster_name", getServiceConfig().getClusterName());
prettyJSONOutput("controllers", zkStoreHelper.getControllers());
prettyJSONOutput("segment_stores", zkStoreHelper.getSegmentStores());
prettyJSONOutput("bookies", zkStoreHelper.getBookies());
} catch (ZKConnectionFailedException e) {
System.err.println("Exception accessing to Zookeeper cluster metadata.");
}
}
use of io.pravega.cli.admin.utils.ZKConnectionFailedException in project pravega by pravega.
the class GetSegmentStoreByContainerCommand method execute.
@Override
public void execute() {
ensureArgCount(1);
try {
@Cleanup ZKHelper zkStoreHelper = ZKHelper.create(getServiceConfig().getZkURL(), getServiceConfig().getClusterName());
Optional<Host> host = zkStoreHelper.getHostForContainer(getIntArg(0));
prettyJSONOutput("owner_segment_store", host.get());
} catch (ZKConnectionFailedException e) {
System.err.println("Exception accessing to Zookeeper cluster metadata.");
}
}
Aggregations