Updated Branches: refs/heads/0.2-dev 3bec1f2f8 -> 484edcdde
Log an already disabled table instead of exception, making consistent with enable Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/484edcdd Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/484edcdd Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/484edcdd Branch: refs/heads/0.2-dev Commit: 484edcddec8bb05a0f17f8f095e45eda50362ad6 Parents: 3bec1f2 Author: twilliams <[email protected]> Authored: Wed Feb 27 07:57:05 2013 -0800 Committer: twilliams <[email protected]> Committed: Wed Feb 27 07:57:05 2013 -0800 ---------------------------------------------------------------------- .../clusterstatus/ZookeeperClusterStatus.java | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/484edcdd/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 2afc9b1..b08d8fa 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 @@ -366,10 +366,11 @@ public class ZookeeperClusterStatus extends ClusterStatus { } TableDescriptor tableDescriptor = getTableDescriptor(false, table); if (!tableDescriptor.isEnabled()) { - throw new IOException("Table [" + table + "] is already disabled."); + LOG.info("Table [" + table + "] is already disabled."); + } else { + tableDescriptor.setEnabled(false); + _zk.setData(tablePath, BlurUtil.read(tableDescriptor), -1); } - tableDescriptor.setEnabled(false); - _zk.setData(tablePath, BlurUtil.read(tableDescriptor), -1); } catch (InterruptedException e) { throw new RuntimeException(e); } catch (KeeperException e) { @@ -392,9 +393,10 @@ public class ZookeeperClusterStatus extends ClusterStatus { TableDescriptor tableDescriptor = getTableDescriptor(false, table); if (tableDescriptor.isEnabled()) { LOG.info("Table [" + table + "] is already enabled."); + } else { + tableDescriptor.setEnabled(true); + _zk.setData(tablePath, BlurUtil.read(tableDescriptor), -1); } - tableDescriptor.setEnabled(true); - _zk.setData(tablePath, BlurUtil.read(tableDescriptor), -1); } catch (IOException e) { throw new RuntimeException(e); } catch (InterruptedException e) {
