use of com.netflix.metacat.common.dto.StorageDto in project metacat by Netflix.
the class MViewServiceImpl method mergePartition.
private PartitionDto mergePartition(final PartitionDto partitionDto, @Nullable final PartitionDto existingPartition) {
if (existingPartition != null) {
final StorageDto existingSerde = existingPartition.getSerde();
if (existingSerde != null) {
StorageDto serde = partitionDto.getSerde();
if (serde == null) {
serde = new StorageDto();
partitionDto.setSerde(serde);
}
if (serde.getUri() == null || serde.getUri().equals(existingSerde.getUri())) {
serde.setUri(existingSerde.getUri());
if (serde.getInputFormat() == null) {
serde.setInputFormat(existingSerde.getInputFormat());
}
if (serde.getOutputFormat() == null) {
serde.setOutputFormat(existingSerde.getOutputFormat());
}
if (serde.getSerializationLib() == null) {
serde.setSerializationLib(existingSerde.getSerializationLib());
}
}
}
}
return partitionDto;
}
Aggregations