@Test public void testPartitionDescriptor() { DatasetDescriptor dataset = new DatasetDescriptor("hdfs", "/data/tracking/PageViewEvent"); String partitionName = "hourly/2018/08/14/18"; PartitionDescriptor partition = new PartitionDescriptor(partitionName, dataset); DatasetDescriptor dataset2 = new DatasetDescriptor("hive", "/data/tracking/PageViewEvent"); Descriptor partition2 = partition.copyWithNewDataset(dataset2); Assert.assertEquals(partition2.getName(), partition.getName()); Assert.assertEquals(((PartitionDescriptor)partition2).getDataset(), dataset2); PartitionDescriptor partition3 = partition.copy(); Assert.assertEquals(partition3.getDataset(), dataset); Assert.assertEquals(partition3.getName(), partitionName); }
public Descriptor copy() { return new Descriptor(name); }
Descriptor { public Descriptor copy() { return new Descriptor(name); } }
Descriptor { public Descriptor copy() { return new Descriptor(name); }  }
Descriptor { public Descriptor copy() { return new Descriptor(name); }  @Override String toString(); Descriptor copy(); static String toJson(Descriptor descriptor); static Descriptor fromJson(String json); static T fromJson(String json, Class<T> clazz); static String toJson(List<Descriptor> descriptors); static List<Descriptor> fromJsonList(String jsonList); }
Descriptor { public Descriptor copy() { return new Descriptor(name); }  @Override String toString(); Descriptor copy(); static String toJson(Descriptor descriptor); static Descriptor fromJson(String json); static T fromJson(String json, Class<T> clazz); static String toJson(List<Descriptor> descriptors); static List<Descriptor> fromJsonList(String jsonList); static final Gson GSON; }