Package org.apache.thrift

Examples of org.apache.thrift.TServiceClient


      return null;
    }
  }
 
  public static void close(MasterClientService.Iface iface) {
    TServiceClient client = (TServiceClient) iface;
    if (client != null && client.getInputProtocol() != null && client.getInputProtocol().getTransport() != null) {
      ThriftTransportPool.getInstance().returnTransport(client.getInputProtocol().getTransport());
    } else {
      log.debug("Attempt to close null connection to the master", new Exception());
    }
  }
View Full Code Here


         
          // have a message to send to the master, so grab a
          // connection
          masterHost = getMasterAddress();
          iface = masterConnection(masterHost);
          TServiceClient client = iface;
         
          // if while loop does not execute at all and mm != null,
          // then
          // finally block should place mm back on queue
          while (!serverStopRequested && mm != null && client != null && client.getOutputProtocol() != null
              && client.getOutputProtocol().getTransport() != null && client.getOutputProtocol().getTransport().isOpen()) {
            try {
              mm.send(SecurityConstants.getSystemCredentials(), getClientAddressString(), iface);
              mm = null;
            } catch (TException ex) {
              log.warn("Error sending message: queuing message again");
View Full Code Here

    return createClient(factory, transport);
  }
 
  static public void returnClient(Object iface) { // Eew... the typing here is horrible
    if (iface != null) {
      TServiceClient client = (TServiceClient) iface;
      ThriftTransportPool.getInstance().returnTransport(client.getInputProtocol().getTransport());
    }
  }
View Full Code Here

          // have a message to send to the master, so grab a
          // connection
          masterHost = getMasterAddress();
          iface = masterConnection(masterHost);
          TServiceClient client = (TServiceClient) iface;

          // if while loop does not execute at all and mm != null,
          // then
          // finally block should place mm back on queue
          while (!serverStopRequested && mm != null && client != null && client.getOutputProtocol() != null
              && client.getOutputProtocol().getTransport() != null && client.getOutputProtocol().getTransport().isOpen()) {
            try {
              mm.send(SecurityConstants.getSystemCredentials(), getClientAddressString(), iface);
              mm = null;
            } catch (TException ex) {
              log.warn("Error sending message: queuing message again");
View Full Code Here

         
          // have a message to send to the master, so grab a
          // connection
          masterHost = getMasterAddress();
          iface = masterConnection(masterHost);
          TServiceClient client = iface;
         
          // if while loop does not execute at all and mm != null,
          // then
          // finally block should place mm back on queue
          while (!serverStopRequested && mm != null && client != null && client.getOutputProtocol() != null
              && client.getOutputProtocol().getTransport() != null && client.getOutputProtocol().getTransport().isOpen()) {
            try {
              mm.send(SecurityConstants.getSystemCredentials(), getClientAddressString(), iface);
              mm = null;
            } catch (TException ex) {
              log.warn("Error sending message: queuing message again");
View Full Code Here

          // have a message to send to the master, so grab a
          // connection
          masterHost = getMasterAddress();
          iface = masterConnection(masterHost);
          TServiceClient client = iface;

          // if while loop does not execute at all and mm != null,
          // then
          // finally block should place mm back on queue
          while (!serverStopRequested && mm != null && client != null && client.getOutputProtocol() != null
              && client.getOutputProtocol().getTransport() != null && client.getOutputProtocol().getTransport().isOpen()) {
            try {
              mm.send(SystemCredentials.get().toThrift(instance), getClientAddressString(), iface);
              mm = null;
            } catch (TException ex) {
              log.warn("Error sending message: queuing message again");
View Full Code Here

         
          // have a message to send to the master, so grab a
          // connection
          masterHost = getMasterAddress();
          iface = masterConnection(masterHost);
          TServiceClient client = (TServiceClient) iface;
         
          // if while loop does not execute at all and mm != null,
          // then
          // finally block should place mm back on queue
          while (!serverStopRequested && mm != null && client != null && client.getOutputProtocol() != null
              && client.getOutputProtocol().getTransport() != null && client.getOutputProtocol().getTransport().isOpen()) {
            try {
              mm.send(SecurityConstants.getSystemCredentials(), getClientAddressString(), iface);
              mm = null;
            } catch (TException ex) {
              log.warn("Error sending message: queuing message again");
View Full Code Here

 
  public synchronized void close() throws NoSuchLogIDException, TException {
    try {
      client.close(null, logFile.id);
    } finally {
      TServiceClient c = (TServiceClient) client;
      c.getInputProtocol().getTransport().close();
    }
  }
View Full Code Here

          }
         
          // have a message to send to the master, so grab a connection
          masterHost = getMasterAddress();
          iface = masterConnection(masterHost);
          TServiceClient client = (TServiceClient) iface;
         
          // if while loop does not execute at all and mm != null, then
          // finally block should place mm back on queue
          while (!serverStopRequested && mm != null && client != null && client.getOutputProtocol() != null
              && client.getOutputProtocol().getTransport() != null && client.getOutputProtocol().getTransport().isOpen()) {
            try {
              mm.send(SecurityConstants.systemCredentials, getClientAddressString(), iface);
              mm = null;
            } catch (TException ex) {
              log.warn("Error sending message: queuing message again");
View Full Code Here

    return createClient(factory, transport);
  }
 
  static public void returnClient(Object iface) { // Eew... the typing here is horrible
    if (iface != null) {
      TServiceClient client = (TServiceClient) iface;
      ThriftTransportPool.getInstance().returnTransport(client.getInputProtocol().getTransport());
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.thrift.TServiceClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.