public Object clone() throws CloneNotSupportedException { TableDesc desc = (TableDesc) super.clone(); desc.builder = TableDescProto.newBuilder(); desc.tableName = tableName; desc.schema = (Schema) schema.clone(); desc.meta = (TableMeta) meta.clone(); desc.uri = uri; desc.stats = stats != null ? (TableStats) stats.clone() : null; desc.partitionMethodDesc = partitionMethodDesc != null ? (PartitionMethodDesc) partitionMethodDesc.clone() : null; return desc; }
public TableDesc() { builder = TableDescProto.newBuilder(); }
public TableDescProto getProto() { if (builder == null) { builder = TableDescProto.newBuilder(); } if (this.tableName != null) { builder.setId(this.tableName); } if (this.schema != null) { builder.setSchema(schema.getProto()); } if (this.meta != null) { builder.setMeta(meta.getProto()); } if (this.uri != null) { builder.setPath(this.uri.toString()); } if (this.stats != null) { builder.setStats(this.stats.getProto()); } if (this.partitionMethodDesc != null) { builder.setPartition(this.partitionMethodDesc.getProto()); } return builder.build(); }