From 3686a4232ac76fb2e421cef355a87c78e0da3b45 Mon Sep 17 00:00:00 2001 From: Jacob Deker Date: Wed, 11 Dec 2024 07:16:25 +0100 Subject: [PATCH] #2965 Atomic ZNode creation on node registration Reformatted changed file according to the "helix format" --- .../apache/helix/manager/zk/ZKHelixAdmin.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java index 0dbb6863fa..5ade7d3755 100644 --- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java +++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java @@ -244,16 +244,17 @@ public void addInstance(String clusterName, InstanceConfig instanceConfig) { // existing instance with matching logical ID (see // InstanceUtil.findInstancesWithMatchingLogicalId call above, where finding an incomplete // "INSTANCE" node is a killer) - final List ops = Arrays.asList( - createPersistentNodeOp(PropertyPathBuilder.instance(clusterName, nodeId)), - createPersistentNodeOp(PropertyPathBuilder.instanceMessage(clusterName, nodeId)), - createPersistentNodeOp(PropertyPathBuilder.instanceCurrentState(clusterName, nodeId)), - createPersistentNodeOp(PropertyPathBuilder.instanceTaskCurrentState(clusterName, nodeId)), - createPersistentNodeOp(PropertyPathBuilder.instanceCustomizedState(clusterName, nodeId)), - createPersistentNodeOp(PropertyPathBuilder.instanceError(clusterName, nodeId)), - createPersistentNodeOp(PropertyPathBuilder.instanceStatusUpdate(clusterName, nodeId)), - createPersistentNodeOp(PropertyPathBuilder.instanceHistory(clusterName, nodeId)) - ); + final List ops = + Arrays.asList(createPersistentNodeOp(PropertyPathBuilder.instance(clusterName, nodeId)), + createPersistentNodeOp(PropertyPathBuilder.instanceMessage(clusterName, nodeId)), + createPersistentNodeOp(PropertyPathBuilder.instanceCurrentState(clusterName, nodeId)), + createPersistentNodeOp( + PropertyPathBuilder.instanceTaskCurrentState(clusterName, nodeId)), + createPersistentNodeOp( + PropertyPathBuilder.instanceCustomizedState(clusterName, nodeId)), + createPersistentNodeOp(PropertyPathBuilder.instanceError(clusterName, nodeId)), + createPersistentNodeOp(PropertyPathBuilder.instanceStatusUpdate(clusterName, nodeId)), + createPersistentNodeOp(PropertyPathBuilder.instanceHistory(clusterName, nodeId))); _zkClient.multi(ops); HelixDataAccessor accessor = new ZKHelixDataAccessor(clusterName, _baseDataAccessor);