Fixed BLUR-283

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

Branch: refs/heads/0.3.0-lucene-upgrade
Commit: e028145ad49702642b1c5052e13604fb6aac958e
Parents: 13a2f79
Author: Aaron McCurry <[email protected]>
Authored: Thu Oct 31 13:34:41 2013 -0400
Committer: Aaron McCurry <[email protected]>
Committed: Thu Oct 31 13:35:24 2013 -0400

----------------------------------------------------------------------
 .../blur/manager/clusterstatus/ZookeeperClusterStatus.java      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e028145a/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
----------------------------------------------------------------------
diff --git 
a/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
 
b/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
index 3cf948a..bf2592e 100644
--- 
a/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
+++ 
b/blur-core/src/main/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatus.java
@@ -179,6 +179,7 @@ public class ZookeeperClusterStatus extends ClusterStatus {
         if (watchNodeExistance != null) {
           watchNodeExistance.close();  
         }
+        _tableDescriptorCache.remove(table);
       }
       for (String table : newTables) {
         final String clusterTableKey = getClusterTableKey(cluster, table);
@@ -844,6 +845,7 @@ public class ZookeeperClusterStatus extends ClusterStatus {
     long s = System.nanoTime();
     try {
       checkIfOpen();
+      TableDescriptor tableDescriptor = getTableDescriptor(true, cluster, 
table);
       String blurTablePath = ZookeeperPathConstants.getTablePath(cluster, 
table);
       if (_zk.exists(blurTablePath, false) == null) {
         throw new IOException("Table [" + table + "] does not exist.");
@@ -851,8 +853,7 @@ public class ZookeeperClusterStatus extends ClusterStatus {
       if (_zk.exists(ZookeeperPathConstants.getTableEnabledPath(cluster, 
table), false) != null) {
         throw new IOException("Table [" + table + "] must be disabled before 
it can be removed.");
       }
-      byte[] data = getData(ZookeeperPathConstants.getTableUriPath(cluster, 
table));
-      String uri = new String(data);
+      String uri = tableDescriptor.getTableUri();
       BlurUtil.removeAll(_zk, blurTablePath);
       if (deleteIndexFiles) {
         BlurUtil.removeIndexFiles(uri);

Reply via email to