Small bug when removing table that the field locks needed to be removed as 
well.  This will probably inrtoduce another problem with table that are dropped 
and then re-added, because their know field types will have been lost.  We 
might need to re-read the fields and their types from the index upon table 
creation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/4e63693e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/4e63693e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/4e63693e

Branch: refs/heads/0.2-dev
Commit: 4e63693e3581e1c616566c4e3c7fee812cb39db0
Parents: d73a6ee
Author: Aaron McCurry <[email protected]>
Authored: Mon Feb 18 20:45:49 2013 -0500
Committer: Aaron McCurry <[email protected]>
Committed: Mon Feb 18 20:45:49 2013 -0500

----------------------------------------------------------------------
 .../clusterstatus/ZookeeperClusterStatus.java      |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4e63693e/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
----------------------------------------------------------------------
diff --git 
a/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
 
b/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
index ad42efb..2afc9b1 100644
--- 
a/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
+++ 
b/src/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
@@ -162,7 +162,7 @@ public class ZookeeperClusterStatus extends ClusterStatus {
     long s = System.nanoTime();
     try {
       checkIfOpen();
-      
+
       return 
_zk.getChildren(ZookeeperPathConstants.getRegisteredServersPath(_cluster), 
false);
     } catch (KeeperException e) {
       throw new RuntimeException(e);
@@ -420,7 +420,7 @@ public class ZookeeperClusterStatus extends ClusterStatus {
       if (tableDescriptor.isEnabled()) {
         throw new IOException("Table [" + table + "] is NOT disabled.");
       }
-      _zk.delete(tablePath, -1);
+      rm(tablePath);
     } catch (IOException e) {
       throw new RuntimeException(e);
     } catch (InterruptedException e) {
@@ -433,6 +433,14 @@ public class ZookeeperClusterStatus extends ClusterStatus {
     }
   }
 
+  private void rm(String tablePath) throws KeeperException, 
InterruptedException {
+    List<String> children = _zk.getChildren(tablePath, false);
+    for (String child : children) {
+      _zk.delete(tablePath + "/" + child, -1);
+    }
+    _zk.delete(tablePath, -1);
+  }
+
   @Override
   public boolean isOpen() {
     return _running.get();

Reply via email to