public Table( String tableName, String dbName, String owner, int createTime, int lastAccessTime, int retention, StorageDescriptor sd, List<FieldSchema> partitionKeys, Map<String, String> parameters, String viewOriginalText, String viewExpandedText, String tableType) { this(); this.tableName = tableName; this.dbName = dbName; this.owner = owner; this.createTime = createTime; setCreateTimeIsSet(true); this.lastAccessTime = lastAccessTime; setLastAccessTimeIsSet(true); this.retention = retention; setRetentionIsSet(true); this.sd = sd; this.partitionKeys = partitionKeys; this.parameters = parameters; this.viewOriginalText = viewOriginalText; this.viewExpandedText = viewExpandedText; this.tableType = tableType; }
@Override public void clear() { this.tableName = null; this.dbName = null; this.owner = null; setCreateTimeIsSet(false); this.createTime = 0; setLastAccessTimeIsSet(false); this.lastAccessTime = 0; setRetentionIsSet(false); this.retention = 0; this.sd = null; this.partitionKeys = null; this.parameters = null; this.viewOriginalText = null; this.viewExpandedText = null; this.tableType = null; this.privileges = null; }
public void setRetention(int retention) { this.retention = retention; setRetentionIsSet(true); }
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: // TABLE_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tableName = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // DB_NAME if (field.type == org.apache.thrift.protocol.TType.STRING) { this.dbName = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // OWNER if (field.type == org.apache.thrift.protocol.TType.STRING) { this.owner = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // CREATE_TIME if (field.type == org.apache.thrift.protocol.TType.I32) { this.createTime = iprot.readI32(); setCreateTimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // LAST_ACCESS_TIME if (field.type == org.apache.thrift.protocol.TType.I32) { this.lastAccessTime = iprot.readI32(); setLastAccessTimeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 6: // RETENTION if (field.type == org.apache.thrift.protocol.TType.I32) { this.retention = iprot.readI32(); setRetentionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 7: // SD if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.sd = new StorageDescriptor(); this.sd.read(iprot); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 8: // PARTITION_KEYS if (field.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list66 = iprot.readListBegin(); this.partitionKeys = new ArrayList<FieldSchema>(_list66.size); for (int _i67 = 0; _i67 < _list66.size; ++_i67) { FieldSchema _elem68; // required _elem68 = new FieldSchema(); _elem68.read(iprot); this.partitionKeys.add(_elem68); } iprot.readListEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 9: // PARAMETERS if (field.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map69 = iprot.readMapBegin(); this.parameters = new HashMap<String, String>(2 * _map69.size); for (int _i70 = 0; _i70 < _map69.size; ++_i70) { String _key71; // required String _val72; // required _key71 = iprot.readString(); _val72 = iprot.readString(); this.parameters.put(_key71, _val72); } iprot.readMapEnd(); } } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 10: // VIEW_ORIGINAL_TEXT if (field.type == org.apache.thrift.protocol.TType.STRING) { this.viewOriginalText = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 11: // VIEW_EXPANDED_TEXT if (field.type == org.apache.thrift.protocol.TType.STRING) { this.viewExpandedText = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 12: // TABLE_TYPE if (field.type == org.apache.thrift.protocol.TType.STRING) { this.tableType = iprot.readString(); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 13: // PRIVILEGES if (field.type == org.apache.thrift.protocol.TType.STRUCT) { this.privileges = new PrincipalPrivilegeSet(); this.privileges.read(iprot); } 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(); }