Java Code Examples for org.apache.thrift.TException

The following are top voted examples for showing how to use org.apache.thrift.TException. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: ditb   File: Hbase.java   View source code 6 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, incrementRows_args struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    {
      org.apache.thrift.protocol.TList _list453 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
      struct.increments = new ArrayList<TIncrement>(_list453.size);
      TIncrement _elem454;
      for (int _i455 = 0; _i455 < _list453.size; ++_i455)
      {
        _elem454 = new TIncrement();
        _elem454.read(iprot);
        struct.increments.add(_elem454);
      }
    }
    struct.setIncrementsIsSet(true);
  }
}
 
Example 2
Project: ditb   File: Hbase.java   View source code 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStopTs_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  if (struct.isSetIo()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetSuccess()) {
    oprot.writeI32(struct.success);
  }
  if (struct.isSetIo()) {
    struct.io.write(oprot);
  }
}
 
Example 3
Project: athena   File: Bmv2DeviceThriftClient.java   View source code 6 votes vote down vote up
@Override
public Pair<Long, Long> readCounter(String counterName, int index) throws Bmv2RuntimeException {

    log.debug("Reading table entry counters... > deviceId={}, counterName={}, index={}",
              deviceId, counterName, index);

    try {
        BmCounterValue counterValue = standardClient.bm_counter_read(CONTEXT_ID, counterName, index);
        log.debug("Table entry counters retrieved! >deviceId={}, counterName={}, index={}, bytes={}, packets={}",
                  deviceId, counterName, index, counterValue.bytes, counterValue.packets);
        return Pair.of(counterValue.bytes, counterValue.packets);
    } catch (TException e) {
        log.debug("Exception while reading table counters: {} > deviceId={}, counterName={}, index={}",
                  e.toString(), deviceId);
        throw parseTException(e);
    }
}
 
Example 4
Project: ditb   File: Hbase.java   View source code 6 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  if (struct.isSetIo()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetSuccess()) {
    oprot.writeBool(struct.success);
  }
  if (struct.isSetIo()) {
    struct.io.write(oprot);
  }
}
 
Example 5
Project: Cobweb   File: LocalWorkerCrawlerServiceBase.java   View source code 6 votes vote down vote up
public void write(org.apache.thrift.protocol.TProtocol oprot, updateTaskProgressRate_args struct) throws TException {
    struct.validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (struct.taskId != null) {
        oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
        oprot.writeString(struct.taskId);
        oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(NEW_PROGRESS_RATE_FIELD_DESC);
    oprot.writeI32(struct.newProgressRate);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MARKUP_FIELD_DESC);
    oprot.writeI32(struct.markup);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(STATUS_FIELD_DESC);
    oprot.writeByte(struct.status);
    oprot.writeFieldEnd();
    oprot.writeFieldStop();
    oprot.writeStructEnd();
}
 
Example 6
Project: java-benchmark   File: DeserThrift.java   View source code 6 votes vote down vote up
@Setup(Level.Trial)
public void benchSetup(BenchmarkParams params) throws TException {
    testObject = new ThriftTestObject();
    testObject.addToField1(31.415926);
    testObject.addToField1(61.415923);
    testObject.addToField1(31.415269);
    testObject.addToField1(53.141926);
    testObject.addToField1(13.145926);
    testObject.addToField1(43.115926);
    testObject.addToField1(31.419265);
    testObject.addToField1(23.141596);
    testObject.addToField1(43.161592);
    testObject.addToField1(0.112);
    serializer = new TSerializer(new TCompactProtocol.Factory());
    deserializer = new TDeserializer(new TCompactProtocol.Factory());
    testData = serializer.serialize(testObject);
}
 
Example 7
Project: fresco_floodlight   File: VersionedValue.java   View source code 6 votes vote down vote up
public void write(org.apache.thrift.protocol.TProtocol oprot, VersionedValue struct) throws org.apache.thrift.TException {
  struct.validate();

  oprot.writeStructBegin(STRUCT_DESC);
  if (struct.value != null) {
    if (struct.isSetValue()) {
      oprot.writeFieldBegin(VALUE_FIELD_DESC);
      oprot.writeBinary(struct.value);
      oprot.writeFieldEnd();
    }
  }
  if (struct.version != null) {
    oprot.writeFieldBegin(VERSION_FIELD_DESC);
    struct.version.write(oprot);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}
 
Example 8
Project: ditb   File: TIllegalArgument.java   View source code 5 votes vote down vote up
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
  try {
    write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
  } catch (org.apache.thrift.TException te) {
    throw new java.io.IOException(te);
  }
}
 
Example 9
Project: ditb   File: Hbase.java   View source code 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getRows_args struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(3);
  if (incoming.get(0)) {
    struct.tableName = iprot.readBinary();
    struct.setTableNameIsSet(true);
  }
  if (incoming.get(1)) {
    {
      org.apache.thrift.protocol.TList _list237 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.rows = new ArrayList<ByteBuffer>(_list237.size);
      ByteBuffer _elem238;
      for (int _i239 = 0; _i239 < _list237.size; ++_i239)
      {
        _elem238 = iprot.readBinary();
        struct.rows.add(_elem238);
      }
    }
    struct.setRowsIsSet(true);
  }
  if (incoming.get(2)) {
    {
      org.apache.thrift.protocol.TMap _map240 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
      struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map240.size);
      ByteBuffer _key241;
      ByteBuffer _val242;
      for (int _i243 = 0; _i243 < _map240.size; ++_i243)
      {
        _key241 = iprot.readBinary();
        _val242 = iprot.readBinary();
        struct.attributes.put(_key241, _val242);
      }
    }
    struct.setAttributesIsSet(true);
  }
}
 
Example 10
Project: ditb   File: THBaseService.java   View source code 5 votes vote down vote up
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteSingle_result struct) throws org.apache.thrift.TException {
  org.apache.thrift.protocol.TField schemeField;
  iprot.readStructBegin();
  while (true)
  {
    schemeField = iprot.readFieldBegin();
    if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
      break;
    }
    switch (schemeField.id) {
      case 1: // IO
        if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
          struct.io = new TIOError();
          struct.io.read(iprot);
          struct.setIoIsSet(true);
        } else { 
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        break;
      default:
        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
    }
    iprot.readFieldEnd();
  }
  iprot.readStructEnd();

  // check for required fields of primitive type, which can't be checked in the validate method
  struct.validate();
}
 
Example 11
Project: iotdb-jdbc   File: TSQueryDataSet.java   View source code 5 votes vote down vote up
public void write(org.apache.thrift.protocol.TProtocol oprot, TSQueryDataSet struct) throws org.apache.thrift.TException {
  struct.validate();

  oprot.writeStructBegin(STRUCT_DESC);
  if (struct.keys != null) {
    oprot.writeFieldBegin(KEYS_FIELD_DESC);
    {
      oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size()));
      for (String _iter122 : struct.keys)
      {
        oprot.writeString(_iter122);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  if (struct.values != null) {
    oprot.writeFieldBegin(VALUES_FIELD_DESC);
    {
      oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.values.size()));
      for (TSDynamicOneColumnData _iter123 : struct.values)
      {
        _iter123.write(oprot);
      }
      oprot.writeListEnd();
    }
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}
 
Example 12
Project: ditb   File: ThriftHBaseServiceHandler.java   View source code 5 votes vote down vote up
@Override
public void mutateRow(ByteBuffer table, TRowMutations rowMutations) throws TIOError, TException {
  Table htable = getTable(table);
  try {
    htable.mutateRow(rowMutationsFromThrift(rowMutations));
  } catch (IOException e) {
    throw getTIOError(e);
  } finally {
    closeTable(htable);
  }
}
 
Example 13
Project: ditb   File: THBaseService.java   View source code 5 votes vote down vote up
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
  try {
    write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
  } catch (org.apache.thrift.TException te) {
    throw new java.io.IOException(te);
  }
}
 
Example 14
Project: ditb   File: TColumn.java   View source code 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TColumn struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  struct.family = iprot.readBinary();
  struct.setFamilyIsSet(true);
  BitSet incoming = iprot.readBitSet(2);
  if (incoming.get(0)) {
    struct.qualifier = iprot.readBinary();
    struct.setQualifierIsSet(true);
  }
  if (incoming.get(1)) {
    struct.timestamp = iprot.readI64();
    struct.setTimestampIsSet(true);
  }
}
 
Example 15
Project: Cobweb   File: LocalWorkerCrawlerServiceBase.java   View source code 5 votes vote down vote up
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws TException {
    prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("finishTask", org.apache.thrift.protocol.TMessageType.CALL, 0));
    finishTask_args args = new finishTask_args();
    args.setTaskId(taskId);
    args.write(prot);
    prot.writeMessageEnd();
}
 
Example 16
Project: dremio-oss   File: HiveClient.java   View source code 5 votes vote down vote up
List<String> getDatabases(boolean ignoreAuthzErrors) throws TException{
  return doCommand(new RetryableClientCommand<List<String>>(){
    @Override
    public List<String> run(HiveMetaStoreClient client) throws TException {
      return client.getAllDatabases();
    }});
}
 
Example 17
Project: waggle-dance   File: FederatedHMSHandler.java   View source code 5 votes vote down vote up
@Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME)
@Override
public boolean delete_table_column_statistics(String db_name, String tbl_name, String col_name)
  throws NoSuchObjectException, MetaException, InvalidObjectException, InvalidInputException, TException {
  DatabaseMapping mapping = checkWritePermissions(db_name);
  return mapping.getClient().delete_table_column_statistics(mapping.transformInboundDatabaseName(db_name), tbl_name,
      col_name);
}
 
Example 18
Project: Cobweb   File: LocalWorkerCrawlerServiceBase.java   View source code 5 votes vote down vote up
public void read(org.apache.thrift.protocol.TProtocol iprot, finishTask_result struct) throws TException {
    org.apache.thrift.protocol.TField schemeField;
    iprot.readStructBegin();
    while (true) {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
        }
        switch (schemeField.id) {
            case 0: // SUCCESS
                if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                    struct.success = iprot.readBool();
                    struct.setSuccessIsSet(true);
                } else {
                    org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                break;
            default:
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    struct.validate();
}
 
Example 19
Project: ditb   File: Hbase.java   View source code 5 votes vote down vote up
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
  try {
    read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
  } catch (org.apache.thrift.TException te) {
    throw new java.io.IOException(te);
  }
}
 
Example 20
Project: iotdb-jdbc   File: TSGetOperationStatusResp.java   View source code 5 votes vote down vote up
public void write(org.apache.thrift.protocol.TProtocol oprot, TSGetOperationStatusResp struct) throws org.apache.thrift.TException {
  struct.validate();

  oprot.writeStructBegin(STRUCT_DESC);
  if (struct.status != null) {
    oprot.writeFieldBegin(STATUS_FIELD_DESC);
    struct.status.write(oprot);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}
 
Example 21
Project: ditb   File: Hbase.java   View source code 5 votes vote down vote up
public void recv_disableTable() throws IOError, org.apache.thrift.TException
{
  disableTable_result result = new disableTable_result();
  receiveBase(result, "disableTable");
  if (result.io != null) {
    throw result.io;
  }
  return;
}
 
Example 22
Project: fresco_floodlight   File: SwitchPortTuple.java   View source code 5 votes vote down vote up
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
  try {
    write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
  } catch (org.apache.thrift.TException te) {
    throw new java.io.IOException(te);
  }
}
 
Example 23
Project: Cobweb   File: LocalWorkerCrawlerServiceBase.java   View source code 5 votes vote down vote up
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bitfield = 0;
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (TException te) {
        throw new java.io.IOException(te);
    }
}
 
Example 24
Project: ditb   File: Hbase.java   View source code 5 votes vote down vote up
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
  try {
    read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
  } catch (org.apache.thrift.TException te) {
    throw new java.io.IOException(te);
  }
}
 
Example 25
Project: ditb   File: Hbase.java   View source code 5 votes vote down vote up
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
  try {
    // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
    __isset_bitfield = 0;
    read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
  } catch (org.apache.thrift.TException te) {
    throw new java.io.IOException(te);
  }
}
 
Example 26
Project: iotdb-jdbc   File: TSIService.java   View source code 5 votes vote down vote up
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
  prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("executeStatement", org.apache.thrift.protocol.TMessageType.CALL, 0));
  executeStatement_args args = new executeStatement_args();
  args.setReq(req);
  args.write(prot);
  prot.writeMessageEnd();
}
 
Example 27
Project: fresco_floodlight   File: PacketStreamer.java   View source code 5 votes vote down vote up
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, pushMessageSync_args struct) throws org.apache.thrift.TException {
  TTupleProtocol iprot = (TTupleProtocol) prot;
  BitSet incoming = iprot.readBitSet(1);
  if (incoming.get(0)) {
    struct.packet = new Message();
    struct.packet.read(iprot);
    struct.setPacketIsSet(true);
  }
}
 
Example 28
Project: iTAP-controller   File: SyncError.java   View source code 5 votes vote down vote up
public void write(org.apache.thrift.protocol.TProtocol oprot, SyncError struct) throws org.apache.thrift.TException {
  struct.validate();

  oprot.writeStructBegin(STRUCT_DESC);
  oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
  oprot.writeI32(struct.errorCode);
  oprot.writeFieldEnd();
  if (struct.message != null) {
    oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
    oprot.writeString(struct.message);
    oprot.writeFieldEnd();
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}
 
Example 29
Project: ditb   File: Hbase.java   View source code 5 votes vote down vote up
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
  try {
    // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
    __isset_bitfield = 0;
    read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
  } catch (org.apache.thrift.TException te) {
    throw new java.io.IOException(te);
  }
}
 
Example 30
Project: scheduler   File: SchedulerService.java   View source code 5 votes vote down vote up
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
  try {
    read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
  } catch (org.apache.thrift.TException te) {
    throw new java.io.IOException(te);
  }
}
 
Example 31
Project: ditb   File: Hbase.java   View source code 5 votes vote down vote up
public getTableNames_result getResult(I iface, getTableNames_args args) throws org.apache.thrift.TException {
  getTableNames_result result = new getTableNames_result();
  try {
    result.success = iface.getTableNames();
  } catch (IOError io) {
    result.io = io;
  }
  return result;
}
 
Example 32
Project: ditb   File: THBaseService.java   View source code 5 votes vote down vote up
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
  try {
    read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
  } catch (org.apache.thrift.TException te) {
    throw new java.io.IOException(te);
  }
}
 
Example 33
Project: waggle-dance   File: FederatedHMSHandler.java   View source code 5 votes vote down vote up
@Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME)
@Override
public Partition add_partition(Partition new_part)
  throws InvalidObjectException, AlreadyExistsException, MetaException, TException {
  DatabaseMapping mapping = checkWritePermissions(new_part.getDbName());
  Partition result = mapping.getClient().add_partition(mapping.transformInboundPartition(new_part));
  return mapping.transformOutboundPartition(result);
}
 
Example 34
Project: ditb   File: THBaseService.java   View source code 5 votes vote down vote up
public TResult getResult() throws TIOError, org.apache.thrift.TException {
  if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
    throw new IllegalStateException("Method call not finished!");
  }
  org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
  org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
  return (new Client(prot)).recv_increment();
}
 
Example 35
Project: ditb   File: THBaseService.java   View source code 5 votes vote down vote up
public int getResult() throws TIOError, org.apache.thrift.TException {
  if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
    throw new IllegalStateException("Method call not finished!");
  }
  org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
  org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
  return (new Client(prot)).recv_openScanner();
}
 
Example 36
Project: iotdb-jdbc   File: TS_Status.java   View source code 5 votes vote down vote up
public void validate() throws org.apache.thrift.TException {
  // check for required fields
  if (statusCode == null) {
    throw new org.apache.thrift.protocol.TProtocolException("Required field 'statusCode' was not present! Struct: " + toString());
  }
  // check for sub-struct validity
}
 
Example 37
Project: ditb   File: TRowResult.java   View source code 5 votes vote down vote up
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TRowResult struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetRow()) {
    optionals.set(0);
  }
  if (struct.isSetColumns()) {
    optionals.set(1);
  }
  if (struct.isSetSortedColumns()) {
    optionals.set(2);
  }
  oprot.writeBitSet(optionals, 3);
  if (struct.isSetRow()) {
    oprot.writeBinary(struct.row);
  }
  if (struct.isSetColumns()) {
    {
      oprot.writeI32(struct.columns.size());
      for (Map.Entry<ByteBuffer, TCell> _iter17 : struct.columns.entrySet())
      {
        oprot.writeBinary(_iter17.getKey());
        _iter17.getValue().write(oprot);
      }
    }
  }
  if (struct.isSetSortedColumns()) {
    {
      oprot.writeI32(struct.sortedColumns.size());
      for (TColumn _iter18 : struct.sortedColumns)
      {
        _iter18.write(oprot);
      }
    }
  }
}
 
Example 38
Project: scheduler   File: AgentService.java   View source code 5 votes vote down vote up
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
  try {
    write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
  } catch (org.apache.thrift.TException te) {
    throw new java.io.IOException(te);
  }
}
 
Example 39
Project: ditb   File: Hbase.java   View source code 5 votes vote down vote up
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
  try {
    write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
  } catch (org.apache.thrift.TException te) {
    throw new java.io.IOException(te);
  }
}
 
Example 40
Project: ditb   File: THBaseService.java   View source code 5 votes vote down vote up
public increment_result getResult(I iface, increment_args args) throws org.apache.thrift.TException {
  increment_result result = new increment_result();
  try {
    result.success = iface.increment(args.table, args.tincrement);
  } catch (TIOError io) {
    result.io = io;
  }
  return result;
}