if (uncommittedPartitions != null) { for (JsonNode uncommittedPartition : uncommittedPartitions) { p.fromUncommittedPartitionNotifyJson(uncommittedPartition);
if (uncommittedPartitions != null) { for (JsonNode uncommittedPartition : uncommittedPartitions) { p.fromUncommittedPartitionNotifyJson(uncommittedPartition);
if (uncommittedPartitions != null) { for (JsonNode uncommittedPartition : uncommittedPartitions) { p.fromUncommittedPartitionNotifyJson(uncommittedPartition);
if (uncommittedPartitions != null) { for (JsonNode uncommittedPartition : uncommittedPartitions) { p.fromUncommittedPartitionNotifyJson(uncommittedPartition);
void fromNotifyJson(JsonNode partitionNode, boolean fire) { ArrayNode partitionsNode = (ArrayNode) partitionNode.get("partitions"); if (partitionsNode != null) { for (JsonNode jsonNode : partitionsNode) { Optional<Partition> optionalPartition = getPartition(jsonNode.get("name").asText()); Preconditions.checkState(optionalPartition.isPresent(), "committed partition %s on partition %s must be present", jsonNode.get("name").asText(), this.getName()); Partition committedPartition = optionalPartition.get(); committedPartition.fromNotifyJson(jsonNode, fire); } } ArrayNode uncommittedPartitionsNode = (ArrayNode) partitionNode.get("uncommittedPartitions"); if (uncommittedPartitionsNode != null) { for (JsonNode jsonNode : uncommittedPartitionsNode) { this.fromUncommittedPartitionNotifyJson(jsonNode); } } ArrayNode uncommittedRemovedPartitions = (ArrayNode) partitionNode.get("uncommittedRemovedPartitions"); if (uncommittedRemovedPartitions != null) { for (JsonNode jsonNode : uncommittedRemovedPartitions) { String pName = jsonNode.asText(); Partition old = this.partitions.remove(pName); if (fire && old != null) { this.getAbstractLabel().getSchema().getTopology().fire(old, "", TopologyChangeAction.DELETE); } } } }
void fromNotifyJson(JsonNode partitionNode, boolean fire) { ArrayNode partitionsNode = (ArrayNode) partitionNode.get("partitions"); if (partitionsNode != null) { for (JsonNode jsonNode : partitionsNode) { Optional<Partition> optionalPartition = getPartition(jsonNode.get("name").asText()); Preconditions.checkState(optionalPartition.isPresent(), "committed partition %s on partition %s must be present", jsonNode.get("name").asText(), this.getName()); Partition committedPartition = optionalPartition.get(); committedPartition.fromNotifyJson(jsonNode, fire); } } ArrayNode uncommittedPartitionsNode = (ArrayNode) partitionNode.get("uncommittedPartitions"); if (uncommittedPartitionsNode != null) { for (JsonNode jsonNode : uncommittedPartitionsNode) { this.fromUncommittedPartitionNotifyJson(jsonNode); } } ArrayNode uncommittedRemovedPartitions = (ArrayNode) partitionNode.get("uncommittedRemovedPartitions"); if (uncommittedRemovedPartitions != null) { for (JsonNode jsonNode : uncommittedRemovedPartitions) { String pName = jsonNode.asText(); Partition old = this.partitions.remove(pName); if (fire && old != null) { this.getAbstractLabel().getSchema().getTopology().fire(old, "", TopologyChangeAction.DELETE); } } } }
if (uncommittedPartitionsNode != null) { for (JsonNode partitionNode : uncommittedPartitionsNode) { Partition partitionColumn = Partition.fromUncommittedPartitionNotifyJson(this, partitionNode); Partition old = this.partitions.put(partitionColumn.getName(), partitionColumn); if (fire && old == null) {
if (uncommittedPartitionsNode != null) { for (JsonNode partitionNode : uncommittedPartitionsNode) { Partition partitionColumn = Partition.fromUncommittedPartitionNotifyJson(this, partitionNode); Partition old = this.partitions.put(partitionColumn.getName(), partitionColumn); if (fire && old == null) {