try (NimbusClient client = new NimbusClient(conf, nimbusInfo.getHost(), nimbusInfo.getPort(), null)) { rbm = client.getClient().getBlobMeta(key); remoteBlobStore = new NimbusBlobStore();
public static void createStateInZookeeper(Map<String, Object> conf, String key, NimbusInfo nimbusInfo) throws TTransportException { ClientBlobStore cb = new NimbusBlobStore(); cb.setClient(conf, new NimbusClient(conf, nimbusInfo.getHost(), nimbusInfo.getPort(), null)); cb.createStateInZookeeper(key); }
@Override public NimbusSummary getLeader() throws AuthorizationException, TException { getLeaderCalls.mark(); checkAuthorization(null, null, "getClusterInfo"); List<NimbusSummary> nimbuses = stormClusterState.nimbuses(); NimbusInfo leader = leaderElector.getLeader(); for (NimbusSummary nimbusSummary : nimbuses) { if (leader.getHost().equals(nimbusSummary.get_host()) && leader.getPort() == nimbusSummary.get_port()) { nimbusSummary.set_uptime_secs(Time.deltaSecs(nimbusSummary.get_uptime_secs())); nimbusSummary.set_isLeader(true); return nimbusSummary; } } return null; }
break; try (NimbusClient client = new NimbusClient(conf, nimbusInfo.getHost(), nimbusInfo.getPort(), null)) { remoteBlobStore = new NimbusBlobStore(); remoteBlobStore.setClient(conf, client);
new NimbusSummary(hpi.getHost(), hpi.getPort(), Time.currentTimeSecs(), false, STORM_VERSION)); leaderElector.addToLeaderLockQueue(); this.blobStore.startSyncBlobs();
boolean isLeader = leader.getHost().equals(nimbusSummary.get_host()) && leader.getPort() == nimbusSummary.get_port(); if (isLeader && this.nimbusHostPortInfo.getHost().equals(leader.getHost()) && !this.isLeader()) { isLeader = false;
try(NimbusClient client = new NimbusClient(conf, nimbusInfo.getHost(), nimbusInfo.getPort(), null)) { rbm = client.getClient().getBlobMeta(key); remoteBlobStore = new NimbusBlobStore();
public static void createStateInZookeeper(Map conf, String key, NimbusInfo nimbusInfo) throws TTransportException { ClientBlobStore cb = new NimbusBlobStore(); cb.setClient(conf, new NimbusClient(conf, nimbusInfo.getHost(), nimbusInfo.getPort(), null)); cb.createStateInZookeeper(key); }
break; try(NimbusClient client = new NimbusClient(conf, nimbusInfo.getHost(), nimbusInfo.getPort(), null)) { remoteBlobStore = new NimbusBlobStore(); remoteBlobStore.setClient(conf, client);