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/e7988bce Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/e7988bce Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/e7988bce Branch: refs/heads/apache-blur-0.2 Commit: e7988bce58cf5d6bbc9aa1c7514d626c1cd623f0 Parents: 802e203 Author: Aaron McCurry <[email protected]> Authored: Thu Oct 31 13:34:41 2013 -0400 Committer: Aaron McCurry <[email protected]> Committed: Thu Oct 31 13:34:41 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/e7988bce/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);
