summaryrefslogtreecommitdiffstats
path: root/zkfacade
diff options
context:
space:
mode:
authorHarald Musum <musum@yahoo-inc.com>2017-05-02 16:13:44 +0200
committerHarald Musum <musum@yahoo-inc.com>2017-05-02 16:13:44 +0200
commit696abcb41b7db72055d5c9dffb8ae4f7b2833d16 (patch)
treec8eeac808d383ab8acdf78e2d53d7b3f1370f1a9 /zkfacade
parent13543852df608bee92e33befc1c45e490c67c1af (diff)
Make sure to always set data for a node when creating it
* Curator library by default sets the data for a node to the IP address of the client that creates the node
Diffstat (limited to 'zkfacade')
-rw-r--r--zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java
index 135154bba92..81d14701755 100644
--- a/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java
+++ b/zkfacade/src/main/java/com/yahoo/vespa/curator/Curator.java
@@ -191,7 +191,7 @@ public class Curator {
String absolutePath = path.getAbsolute();
try {
- framework().create().creatingParentsIfNeeded().forPath(absolutePath);
+ framework().create().creatingParentsIfNeeded().forPath(absolutePath, new byte[0]);
} catch (org.apache.zookeeper.KeeperException.NodeExistsException e) {
// Path created between exists() and create() call, do nothing
} catch (Exception e) {
@@ -207,7 +207,7 @@ public class Curator {
CuratorTransaction transaction = framework().inTransaction();
for (Path path : paths) {
if ( ! exists(path)) {
- transaction = transaction.create().forPath(path.getAbsolute()).and();
+ transaction = transaction.create().forPath(path.getAbsolute(), new byte[0]).and();
}
}
((CuratorTransactionFinal)transaction).commit();