Package org.apache.thrift7

Examples of org.apache.thrift7.TBase


          throw new NotAliveException("Failed to update metricsMonitor status as " + topologyName + " is not alive");
        }
    } catch(Exception e) {
      String errMsg = "Failed to update metricsMonitor " + topologyName;
      LOG.error(errMsg, e);
      throw new TException(e);
    }
   
  }
View Full Code Here


        }
       
    } catch(Exception e) {
      String errMsg = "Failed to get topology Metric Data " + topologyId;
      LOG.error(errMsg, e);
      throw new TException(e);
    }
   
    return topologyMetricInfo;
  }
View Full Code Here

    private static ThreadLocal<TSerializer> threadSer = new ThreadLocal<TSerializer>();
    private static ThreadLocal<TDeserializer> threadDes = new ThreadLocal<TDeserializer>();
   
    public static byte[] thriftSerialize(TBase t) {
        try {
            TSerializer ser = threadSer.get();
            if (ser == null) {
                ser = new TSerializer();
                threadSer.set(ser);
            }
            return ser.serialize(t);
        } catch (TException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

        try {
            if(host==null) {
                throw new IllegalArgumentException("Nimbus host is not set");
            }
            conn = new TFramedTransport(new TSocket(host, port));
            client = new Nimbus.Client(new TBinaryProtocol(conn));
            conn.open();
        } catch(TException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

        }
    }
   
    private void connect() throws TException {
        conn = new TFramedTransport(new TSocket(host, port));
        client = new DistributedRPC.Client(new TBinaryProtocol(conn));
        conn.open();
    }
View Full Code Here

 
  Map conf=StormConfig.read_storm_config();
  String host=String.valueOf(conf.get(Config.NIMBUS_HOST));
  Integer port=StormUtils.parseInt(conf.get(Config.NIMBUS_THRIFT_PORT));
  TFramedTransport transport=new TFramedTransport(new TSocket(host, port));
  TBinaryProtocol prot=new TBinaryProtocol(transport);
  Nimbus.Client client=new Nimbus.Client(prot);
  transport.open();
  try{
      client.killTopologyWithOpts(name,ops);
  }finally{
View Full Code Here

 
  Map conf=StormConfig.read_storm_config();
  String host=String.valueOf(conf.get(Config.NIMBUS_HOST));
  Integer port=StormUtils.parseInt(conf.get(Config.NIMBUS_THRIFT_PORT));
  TFramedTransport transport=new TFramedTransport(new TSocket(host, port));
  TBinaryProtocol prot=new TBinaryProtocol(transport);
  Nimbus.Client client=new Nimbus.Client(prot);
  transport.open();
  try{
      if(args[0].equals("cluster"))
      {
View Full Code Here

        }
    }
   
    private void connect() throws TException {
        conn = new TFramedTransport(new TSocket(host, port));
        client = new DistributedRPCInvocations.Client(new TBinaryProtocol(conn));
        conn.open();
    }
View Full Code Here

    * Constructor.
    */
  public ThriftReader(InputStream stream, TBaseCreator creator) {
    this.inputStream = stream;
    this.creator = creator;
    binaryIn = new TBinaryProtocol(new TIOStreamTransport(inputStream));
  }
View Full Code Here

        TSocket socket = new TSocket(host, port);
        if(timeout!=null) {
            socket.setTimeout(timeout);
        }
        conn = new TFramedTransport(socket);
        client = new DistributedRPC.Client(new TBinaryProtocol(conn));
        conn.open();
    }
View Full Code Here

TOP

Related Classes of org.apache.thrift7.TBase

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.