Exemplo n.º 1
0
Arquivo: Role.java Projeto: Leolh/hive
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, Role struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(3);
   if (incoming.get(0)) {
     struct.roleName = iprot.readString();
     struct.setRoleNameIsSet(true);
   }
   if (incoming.get(1)) {
     struct.createTime = iprot.readI32();
     struct.setCreateTimeIsSet(true);
   }
   if (incoming.get(2)) {
     struct.ownerName = iprot.readString();
     struct.setOwnerNameIsSet(true);
   }
 }
Exemplo n.º 2
0
Arquivo: Role.java Projeto: Leolh/hive
 public void read(org.apache.thrift.protocol.TProtocol iprot, Role 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: // ROLE_NAME
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.roleName = iprot.readString();
           struct.setRoleNameIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // CREATE_TIME
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.createTime = iprot.readI32();
           struct.setCreateTimeIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 3: // OWNER_NAME
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.ownerName = iprot.readString();
           struct.setOwnerNameIsSet(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();
   struct.validate();
 }