Examples of TStruct


Examples of org.apache.thrift.protocol.TStruct

    schema.setProperty(Constants.FIELD_DELIM, ",");
    prot.initialize(new Configuration(), schema);

    String testStr = "\"hello, world!\"";

    prot.writeStructBegin(new TStruct());

    prot.writeFieldBegin(new TField());
    prot.writeString(testStr);
    prot.writeFieldEnd();
View Full Code Here

Examples of org.apache.thrift.protocol.TStruct

  public void testNulls() throws Exception {
    TMemoryBuffer trans = new TMemoryBuffer(1024);
    TCTLSeparatedProtocol prot = new TCTLSeparatedProtocol(trans, 10);
    prot.initialize(new Configuration(), new Properties());

    prot.writeStructBegin(new TStruct());

    prot.writeFieldBegin(new TField());
    prot.writeString(null);
    prot.writeFieldEnd();
View Full Code Here

Examples of org.apache.thrift.protocol.TStruct

    }

    public void writeStructBegin(String name)
            throws TException
    {
        protocol.writeStructBegin(new TStruct(name));
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TStruct

        TProtocol protocol = newProtocol(channel.getUrl(), output);
        try {
            protocol.writeMessageBegin(new TMessage(
                invocation.getMethodName(), TMessageType.CALL,
                thriftSeq.getAndIncrement()));
            protocol.writeStructBegin(new TStruct(invocation.getMethodName() + "_args"));
            for(int i = 0; i < invocation.getParameterTypes().length; i++) {
                Class<?> type = invocation.getParameterTypes()[i];

            }
        } catch (TException e) {
View Full Code Here

Examples of org.apache.thrift.protocol.TStruct

        TProtocol protocol = newProtocol(channel.getUrl(), buffer);
        try {
            protocol.writeMessageBegin(new TMessage(
                invocation.getMethodName(), TMessageType.CALL,
                thriftSeq.getAndIncrement()));
            protocol.writeStructBegin(new TStruct(invocation.getMethodName() + "_args"));
            for(int i = 0; i < invocation.getParameterTypes().length; i++) {
                Class<?> type = invocation.getParameterTypes()[i];

            }
        } catch (TException e) {
View Full Code Here

Examples of org.apache.thrift.protocol.TStruct

            throws TException
    {
        for (int i = 0; i < count; i++) {
            protocol.writeMessageBegin(new TMessage("testmessage" + i, TMessageType.CALL, i));
            {
                protocol.writeStructBegin(new TStruct());
                {
                    protocol.writeFieldBegin(new TField("i32field", TType.I32, (short) 1));
                    protocol.writeI32(123);
                    protocol.writeFieldEnd();
                }
View Full Code Here

Examples of org.apache.thrift.protocol.TStruct

            throws TException
    {
        for (int i = 0; i < count; i++) {
            protocol.writeMessageBegin(new TMessage("testmessage" + i, TMessageType.CALL, i));
            {
                protocol.writeStructBegin(new TStruct());
                {
                    protocol.writeFieldBegin(new TField("i32field", TType.I32, (short) 1));
                    protocol.writeI32(123);
                    protocol.writeFieldEnd();
                }
View Full Code Here

Examples of org.apache.thrift.protocol.TStruct

    return new TApplicationException(type, message);
  }

  public void write(TProtocol oprot) throws TException {
    TStruct struct = new TStruct("TApplicationException");
    TField field = new TField();
    oprot.writeStructBegin(struct);
    if (getMessage() != null) {
      field.name = "message";
      field.type = TType.STRING;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.