locklessServers.remove(zPath); ServerServices services = new ServerServices(new String(lockData, UTF_8)); HostAndPort client = services.getAddress(ServerServices.Service.TSERV_CLIENT); TServerInstance instance = new TServerInstance(client, stat.getEphemeralOwner());
private static GCStatus fetchGcStatus() { GCStatus result = null; HostAndPort address = null; try { // Read the gc location from its lock ZooReaderWriter zk = context.getZooReaderWriter(); String path = context.getZooKeeperRoot() + Constants.ZGC_LOCK; List<String> locks = zk.getChildren(path, null); if (locks != null && locks.size() > 0) { Collections.sort(locks); address = new ServerServices(new String(zk.getData(path + "/" + locks.get(0), null), UTF_8)) .getAddress(Service.GC_CLIENT); GCMonitorService.Client client = ThriftUtil.getClient(new GCMonitorService.Client.Factory(), address, context); try { result = client.getStatus(Tracer.traceInfo(), getContext().rpcCreds()); } finally { ThriftUtil.returnClient(client); } } } catch (Exception ex) { log.warn("Unable to contact the garbage collector at " + address, ex); } return result; }
if (!strData.equals("master")) servers.add(new ThriftTransportKey( new ServerServices(strData).getAddress(Service.TSERV_CLIENT), rpcTimeout, context));
locklessServers.remove(server); ServerServices services = new ServerServices(new String(lockData, UTF_8)); InetSocketAddress client = services.getAddress(ServerServices.Service.TSERV_CLIENT); InetSocketAddress addr = AddressUtil.parseAddress(server, Property.TSERV_CLIENTPORT); TServerInstance instance = new TServerInstance(client, stat.getEphemeralOwner());
locklessServers.remove(zPath); ServerServices services = new ServerServices(new String(lockData, UTF_8)); HostAndPort client = services.getAddress(ServerServices.Service.TSERV_CLIENT); TServerInstance instance = new TServerInstance(client, stat.getEphemeralOwner());
private static GCStatus fetchGcStatus() { GCStatus result = null; InetSocketAddress address = null; try { // Read the gc location from its lock ZooReaderWriter zk = ZooReaderWriter.getInstance(); String path = ZooUtil.getRoot(instance) + Constants.ZGC_LOCK; List<String> locks = zk.getChildren(path, null); if (locks != null && locks.size() > 0) { Collections.sort(locks); address = new ServerServices(new String(zk.getData(path + "/" + locks.get(0), null), UTF_8)).getAddress(Service.GC_CLIENT); GCMonitorService.Client client = ThriftUtil.getClient(new GCMonitorService.Client.Factory(), address, config.getConfiguration()); try { result = client.getStatus(Tracer.traceInfo(), SecurityConstants.getSystemCredentials()); } finally { ThriftUtil.returnClient(client); } } } catch (Exception ex) { log.warn("Unable to contact the garbage collector at " + address, ex); } return result; }
private static GCStatus fetchGcStatus() { GCStatus result = null; HostAndPort address = null; try { // Read the gc location from its lock ZooReaderWriter zk = ZooReaderWriter.getInstance(); String path = ZooUtil.getRoot(instance) + Constants.ZGC_LOCK; List<String> locks = zk.getChildren(path, null); if (locks != null && locks.size() > 0) { Collections.sort(locks); address = new ServerServices(new String(zk.getData(path + "/" + locks.get(0), null), UTF_8)) .getAddress(Service.GC_CLIENT); GCMonitorService.Client client = ThriftUtil.getClient(new GCMonitorService.Client.Factory(), address, new AccumuloServerContext(config)); try { result = client.getStatus(Tracer.traceInfo(), getContext().rpcCreds()); } finally { ThriftUtil.returnClient(client); } } } catch (Exception ex) { log.warn("Unable to contact the garbage collector at " + address, ex); } return result; }
if (!strData.equals("master")) servers.add(new ThriftTransportKey( new ServerServices(strData).getAddress(Service.TSERV_CLIENT), rpcTimeout, context));
if (!strData.equals("master")) servers.add(new ThriftTransportKey( new ServerServices(strData).getAddress(Service.TSERV_CLIENT), rpcTimeout, context));