this.controlLocator = new LocatorService.Client(inProtocol, outProtocol);
.getAllServersWithPreferredServer(this.gfxdServerTypeSet, serverGroups, failedServers); controlLocator.getOutputProtocol().getTransport().close(); failedServers = failoverToAvailableHost(failedServers, te); } catch (Throwable t) {
private HostAddress getLocatorPreferredServer( Set<HostAddress> failedServers, Set<String> serverGroups) throws GFXDException, TException { if (SanityManager.TraceClientHA) { SanityManager.DEBUG_PRINT(SanityManager.TRACE_CLIENT_HA, "getPreferredServer() trying using host " + this.controlHost); } if (SanityManager.TraceClientStatement) { final long ns = System.nanoTime(); SanityManager.DEBUG_PRINT_COMPACT("getPreferredServer_S", null, 0, ns, true, null); } HostAddress preferredServer = controlLocator.getPreferredServer( this.gfxdServerTypeSet, serverGroups, failedServers); if (SanityManager.TraceClientStatement) { final long ns = System.nanoTime(); SanityManager.DEBUG_PRINT_COMPACT("getPreferredServer_E", null, 0, ns, false, null); } return preferredServer; }
public void closeConnection() throws org.apache.thrift.TException { send_closeConnection(); }
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } }
public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
public void send_closeConnection() throws org.apache.thrift.TException { closeConnection_args args = new closeConnection_args(); sendBase("closeConnection", args); }
public HostAddress recv_getPreferredServer() throws GFXDException, org.apache.thrift.TException { getPreferredServer_result result = new getPreferredServer_result(); receiveBase(result, "getPreferredServer"); if (result.isSetSuccess()) { return result.success; } if (result.error != null) { throw result.error; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPreferredServer failed: unknown result"); }
private GFXDException unexpectedError(Throwable t, HostAddress host) { this.controlHost = null; if (this.controlLocator != null) { this.controlLocator.getOutputProtocol().getTransport().close(); this.controlLocator = null; } return ThriftExceptionUtil.newGFXDException(SQLState.JAVA_EXCEPTION, t, host != null ? host.toString() : null, t.getClass(), t.getMessage()); }
public List<HostAddress> getAllServersWithPreferredServer(Set<ServerType> serverTypes, Set<String> serverGroups, Set<HostAddress> failedServers) throws GFXDException, org.apache.thrift.TException { send_getAllServersWithPreferredServer(serverTypes, serverGroups, failedServers); return recv_getAllServersWithPreferredServer(); }
public List<HostAddress> recv_getAllServersWithPreferredServer() throws GFXDException, org.apache.thrift.TException { getAllServersWithPreferredServer_result result = new getAllServersWithPreferredServer_result(); receiveBase(result, "getAllServersWithPreferredServer"); if (result.isSetSuccess()) { return result.success; } if (result.error != null) { throw result.error; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllServersWithPreferredServer failed: unknown result"); }
public void send_getPreferredServer(Set<ServerType> serverTypes, Set<String> serverGroups, Set<HostAddress> failedServers) throws org.apache.thrift.TException { getPreferredServer_args args = new getPreferredServer_args(); args.setServerTypes(serverTypes); args.setServerGroups(serverGroups); args.setFailedServers(failedServers); sendBase("getPreferredServer", args); }
public void send_getAllServersWithPreferredServer(Set<ServerType> serverTypes, Set<String> serverGroups, Set<HostAddress> failedServers) throws org.apache.thrift.TException { getAllServersWithPreferredServer_args args = new getAllServersWithPreferredServer_args(); args.setServerTypes(serverTypes); args.setServerGroups(serverGroups); args.setFailedServers(failedServers); sendBase("getAllServersWithPreferredServer", args); }
public HostAddress getPreferredServer(Set<ServerType> serverTypes, Set<String> serverGroups, Set<HostAddress> failedServers) throws GFXDException, org.apache.thrift.TException { send_getPreferredServer(serverTypes, serverGroups, failedServers); return recv_getPreferredServer(); }