hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r916004 - in /hadoop/hbase/trunk: CHANGES.txt core/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
Date Wed, 24 Feb 2010 22:26:46 GMT
Author: jdcryans
Date: Wed Feb 24 22:26:45 2010
New Revision: 916004

URL: http://svn.apache.org/viewvc?rev=916004&view=rev
Log:
HBASE-2262  ZKW.ensureExists should check for existence

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=916004&r1=916003&r2=916004&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Wed Feb 24 22:26:45 2010
@@ -382,6 +382,7 @@
    HBASE-2241  Change balancer sloppyness from 0.1 to 0.3
    HBASE-2250  typo in the maven pom
    HBASE-2254  Improvements to the Maven POMs (Lars Francke via Stack)
+   HBASE-2262  ZKW.ensureExists should check for existence
 
   NEW FEATURES
    HBASE-1961  HBase EC2 scripts

Modified: hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java?rev=916004&r1=916003&r2=916004&view=diff
==============================================================================
--- hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
(original)
+++ hadoop/hbase/trunk/core/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperWrapper.java
Wed Feb 24 22:26:45 2010
@@ -398,6 +398,10 @@
 
   private boolean ensureExists(final String znode) {
     try {
+      Stat stat = zooKeeper.exists(znode, false);
+      if (stat != null) {
+        return true;
+      }
       zooKeeper.create(znode, new byte[0],
                        Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
       LOG.debug("Created ZNode " + znode);



Mime
View raw message