public StorageDescriptor( List<FieldSchema> cols, String location, String inputFormat, String outputFormat, boolean compressed, int numBuckets, SerDeInfo serdeInfo, List<String> bucketCols, List<Order> sortCols, Map<String, String> parameters) { this(); this.cols = cols; this.location = location; this.inputFormat = inputFormat; this.outputFormat = outputFormat; this.compressed = compressed; setCompressedIsSet(true); this.numBuckets = numBuckets; setNumBucketsIsSet(true); this.serdeInfo = serdeInfo; this.bucketCols = bucketCols; this.sortCols = sortCols; this.parameters = parameters; }
@Override public void clear() { this.cols = null; this.location = null; this.inputFormat = null; this.outputFormat = null; setCompressedIsSet(false); this.compressed = false; setNumBucketsIsSet(false); this.numBuckets = 0; this.serdeInfo = null; this.bucketCols = null; this.sortCols = null; this.parameters = null; }
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField field; iprot.readStructBegin(); while (true) { field = iprot.readFieldBegin(); if (field.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (field.id) { case 1: // COLS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list49 = iprot.readListBegin(); this.cols = new ArrayList<FieldSchema>(_list49.size); for (int _i50 = 0; _i50 < _list49.size; ++_i50) { FieldSchema _elem51; // required _elem51 = new FieldSchema(); _elem51.read(iprot); this.cols.add(_elem51); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // LOCATION if (field.type == org.apache.thrift.protocol.TType.STRING) { this.location = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // INPUT_FORMAT if (field.type == org.apache.thrift.protocol.TType.STRING) { this.inputFormat = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // OUTPUT_FORMAT if (field.type == org.apache.thrift.protocol.TType.STRING) { this.outputFormat = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // COMPRESSED if (field.type == org.apache.thrift.protocol.TType.BOOL) { this.compressed = iprot.readBool(); setCompressedIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // NUM_BUCKETS if (field.type == org.apache.thrift.protocol.TType.I32) { this.numBuckets = iprot.readI32(); setNumBucketsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 7: // SERDE_INFO if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.serdeInfo = new SerDeInfo(); this.serdeInfo.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 8: // BUCKET_COLS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list52 = iprot.readListBegin(); this.bucketCols = new ArrayList<String>(_list52.size); for (int _i53 = 0; _i53 < _list52.size; ++_i53) { String _elem54; // required _elem54 = iprot.readString(); this.bucketCols.add(_elem54); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 9: // SORT_COLS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list55 = iprot.readListBegin(); this.sortCols = new ArrayList<Order>(_list55.size); for (int _i56 = 0; _i56 < _list55.size; ++_i56) { Order _elem57; // required _elem57 = new Order(); _elem57.read(iprot); this.sortCols.add(_elem57); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 10: // PARAMETERS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map58 = iprot.readMapBegin(); this.parameters = new HashMap<String, String>(2 * _map58.size); for (int _i59 = 0; _i59 < _map58.size; ++_i59) { String _key60; // required String _val61; // required _key60 = iprot.readString(); _val61 = iprot.readString(); this.parameters.put(_key60, _val61); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); validate(); }
public void setCompressed(boolean compressed) { this.compressed = compressed; setCompressedIsSet(true); }