Java Code Examples for org.apache.thrift.protocol.TTupleProtocol.writeString()

The following are Jave code examples for showing how to use writeString() of the org.apache.thrift.protocol.TTupleProtocol class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: drift   File: LogEntry.java   View Source Code Vote up 6 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LogEntry struct)
        throws TException
{
    TTupleProtocol oprot = (TTupleProtocol) prot;
    BitSet optionals = new BitSet();
    if (struct.isSetCategory()) {
        optionals.set(0);
    }
    if (struct.isSetMessage()) {
        optionals.set(1);
    }
    oprot.writeBitSet(optionals, 2);
    if (struct.isSetCategory()) {
        oprot.writeString(struct.category);
    }
    if (struct.isSetMessage()) {
        oprot.writeString(struct.message);
    }
}
 
Example 2
Project: Cobweb   File: LocalWorkerCrawlerServiceBase.java   View Source Code Vote up 6 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getNewTask_result struct) throws TException {
    TTupleProtocol oprot = (TTupleProtocol) prot;
    BitSet optionals = new BitSet();
    if (struct.isSetSuccess()) {
        optionals.set(0);
    }
    oprot.writeBitSet(optionals, 1);
    if (struct.isSetSuccess()) {
        {
            oprot.writeI32(struct.success.size());
            for (String _iter4 : struct.success) {
                oprot.writeString(_iter4);
            }
        }
    }
}
 
Example 3
Project: fresco_floodlight   File: PutRequestMessage.java   View Source Code Vote up 6 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, PutRequestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  oprot.writeString(struct.storeName);
  oprot.writeBinary(struct.key);
  BitSet optionals = new BitSet();
  if (struct.isSetVersionedValue()) {
    optionals.set(0);
  }
  if (struct.isSetValue()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetVersionedValue()) {
    struct.versionedValue.write(oprot);
  }
  if (struct.isSetValue()) {
    oprot.writeBinary(struct.value);
  }
}
 
Example 4
Project: Cobweb   File: LocalWorkerCrawlerService.java   View Source Code Vote up 6 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, giveUpTask_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetTaskId()) {
    optionals.set(0);
  }
  if (struct.isSetReason()) {
    optionals.set(1);
  }
  oprot.writeBitSet(optionals, 2);
  if (struct.isSetTaskId()) {
    oprot.writeString(struct.taskId);
  }
  if (struct.isSetReason()) {
    oprot.writeString(struct.reason);
  }
}
 
Example 5
Project: grift   File: HelloResponse.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, HelloResponse struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetMessage()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetMessage()) {
    oprot.writeString(struct.message);
  }
}
 
Example 6
Project: Cobweb   File: LocalWorkerCrawlerService.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateTaskProgressRate_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetTaskId()) {
    optionals.set(0);
  }
  if (struct.isSetNewProgressRate()) {
    optionals.set(1);
  }
  if (struct.isSetMarkup()) {
    optionals.set(2);
  }
  if (struct.isSetStatus()) {
    optionals.set(3);
  }
  oprot.writeBitSet(optionals, 4);
  if (struct.isSetTaskId()) {
    oprot.writeString(struct.taskId);
  }
  if (struct.isSetNewProgressRate()) {
    oprot.writeI32(struct.newProgressRate);
  }
  if (struct.isSetMarkup()) {
    oprot.writeI32(struct.markup);
  }
  if (struct.isSetStatus()) {
    oprot.writeByte(struct.status);
  }
}
 
Example 7
Project: high   File: ThriftTestService.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, test_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetName()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetName()) {
    oprot.writeString(struct.name);
  }
}
 
Example 8
Project: fresco_floodlight   File: PacketStreamer.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, terminateSession_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSessionid()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetSessionid()) {
    oprot.writeString(struct.sessionid);
  }
}
 
Example 9
Project: Cobweb   File: HelloWorldService.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sayHello_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetSuccess()) {
    oprot.writeString(struct.success);
  }
}
 
Example 10
Project: Cobweb   File: LocalWorkerCrawlerServiceBase.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getLastProgressRate_args struct) throws TException {
    TTupleProtocol oprot = (TTupleProtocol) prot;
    BitSet optionals = new BitSet();
    if (struct.isSetTaskId()) {
        optionals.set(0);
    }
    oprot.writeBitSet(optionals, 1);
    if (struct.isSetTaskId()) {
        oprot.writeString(struct.taskId);
    }
}
 
Example 11
Project: Cobweb   File: LocalWorkerCrawlerService.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, removeFromBlackList_args struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetTaskId()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetTaskId()) {
    oprot.writeString(struct.taskId);
  }
}
 
Example 12
Project: Cobweb   File: LocalWorkerCrawlerServiceBase.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, addToBlackList_args struct) throws TException {
    TTupleProtocol oprot = (TTupleProtocol) prot;
    BitSet optionals = new BitSet();
    if (struct.isSetTaskId()) {
        optionals.set(0);
    }
    oprot.writeBitSet(optionals, 1);
    if (struct.isSetTaskId()) {
        oprot.writeString(struct.taskId);
    }
}
 
Example 13
Project: Cobweb   File: LocalWorkerCrawlerService.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getFiltersStatus_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetSuccess()) {
    oprot.writeString(struct.success);
  }
}
 
Example 14
Project: Cobweb   File: LocalWorkerCrawlerServiceBase.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateTaskProgressRate_args struct) throws TException {
    TTupleProtocol oprot = (TTupleProtocol) prot;
    BitSet optionals = new BitSet();
    if (struct.isSetTaskId()) {
        optionals.set(0);
    }
    if (struct.isSetNewProgressRate()) {
        optionals.set(1);
    }
    if (struct.isSetMarkup()) {
        optionals.set(2);
    }
    if (struct.isSetStatus()) {
        optionals.set(3);
    }
    oprot.writeBitSet(optionals, 4);
    if (struct.isSetTaskId()) {
        oprot.writeString(struct.taskId);
    }
    if (struct.isSetNewProgressRate()) {
        oprot.writeI32(struct.newProgressRate);
    }
    if (struct.isSetMarkup()) {
        oprot.writeI32(struct.markup);
    }
    if (struct.isSetStatus()) {
        oprot.writeByte(struct.status);
    }
}
 
Example 15
Project: Cobweb   File: LocalWorkerCrawlerServiceBase.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getFiltersStatus_result struct) throws TException {
    TTupleProtocol oprot = (TTupleProtocol) prot;
    BitSet optionals = new BitSet();
    if (struct.isSetSuccess()) {
        optionals.set(0);
    }
    oprot.writeBitSet(optionals, 1);
    if (struct.isSetSuccess()) {
        oprot.writeString(struct.success);
    }
}
 
Example 16
Project: iTAP-controller   File: DeleteRequestMessage.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DeleteRequestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  oprot.writeString(struct.storeName);
  oprot.writeBinary(struct.key);
  BitSet optionals = new BitSet();
  if (struct.isSetVersion()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetVersion()) {
    struct.version.write(oprot);
  }
}
 
Example 17
Project: fresco_floodlight   File: DeleteRequestMessage.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, DeleteRequestMessage struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.header.write(oprot);
  oprot.writeString(struct.storeName);
  oprot.writeBinary(struct.key);
  BitSet optionals = new BitSet();
  if (struct.isSetVersion()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetVersion()) {
    struct.version.write(oprot);
  }
}
 
Example 18
Project: Cobweb   File: LocalWorkerCrawlerService.java   View Source Code Vote up 5 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getWorkersStatus_result struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  BitSet optionals = new BitSet();
  if (struct.isSetSuccess()) {
    optionals.set(0);
  }
  oprot.writeBitSet(optionals, 1);
  if (struct.isSetSuccess()) {
    oprot.writeString(struct.success);
  }
}
 
Example 19
Project: iotdb-jdbc   File: TSGetTimeZoneResp.java   View Source Code Vote up 4 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TSGetTimeZoneResp struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.status.write(oprot);
  oprot.writeString(struct.timeZone);
}
 
Example 20
Project: iotdb-jdbc   File: TSExecuteStatementReq.java   View Source Code Vote up 4 votes
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TSExecuteStatementReq struct) throws org.apache.thrift.TException {
  TTupleProtocol oprot = (TTupleProtocol) prot;
  struct.sessionHandle.write(oprot);
  oprot.writeString(struct.statement);
}