Esempio n. 1
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, SettableBlobMeta 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: // ACL
         if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
           {
             org.apache.thrift.protocol.TList _list558 = iprot.readListBegin();
             struct.acl = new ArrayList<AccessControl>(_list558.size);
             AccessControl _elem559;
             for (int _i560 = 0; _i560 < _list558.size; ++_i560) {
               _elem559 = new AccessControl();
               _elem559.read(iprot);
               struct.acl.add(_elem559);
             }
             iprot.readListEnd();
           }
           struct.set_acl_isSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // REPLICATION_FACTOR
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.replication_factor = iprot.readI32();
           struct.set_replication_factor_isSet(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();
 }
Esempio n. 2
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, SettableBlobMeta struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   {
     org.apache.thrift.protocol.TList _list563 =
         new org.apache.thrift.protocol.TList(
             org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
     struct.acl = new ArrayList<AccessControl>(_list563.size);
     AccessControl _elem564;
     for (int _i565 = 0; _i565 < _list563.size; ++_i565) {
       _elem564 = new AccessControl();
       _elem564.read(iprot);
       struct.acl.add(_elem564);
     }
   }
   struct.set_acl_isSet(true);
   BitSet incoming = iprot.readBitSet(1);
   if (incoming.get(0)) {
     struct.replication_factor = iprot.readI32();
     struct.set_replication_factor_isSet(true);
   }
 }