Updated Branches: refs/heads/master 430c6ac3b -> 2ff3c3124
Code cleanup. Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/4a971356 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/4a971356 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/4a971356 Branch: refs/heads/master Commit: 4a97135697ccd24e3f8bdb5f0936b104224d8d98 Parents: 430c6ac Author: Aaron McCurry <[email protected]> Authored: Mon Aug 12 12:48:34 2013 -0400 Committer: Aaron McCurry <[email protected]> Committed: Mon Aug 12 12:48:34 2013 -0400 ---------------------------------------------------------------------- .../clusterstatus/ZookeeperClusterStatus.java | 16 ---------------- .../java/org/apache/blur/thrift/TableAdmin.java | 4 ++-- .../main/java/org/apache/blur/utils/BlurUtil.java | 5 ----- 3 files changed, 2 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4a971356/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 6df4d81..7fecccf 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 @@ -73,10 +73,7 @@ public class ZookeeperClusterStatus extends ClusterStatus { private WatchChildren _clusterWatcher; private ConcurrentMap<String, WatchChildren> _onlineShardsNodesWatchers = new ConcurrentHashMap<String, WatchChildren>(); private ConcurrentMap<String, WatchChildren> _tableWatchers = new ConcurrentHashMap<String, WatchChildren>(); - // private ConcurrentMap<String, WatchNodeExistance> _safeModeWatchers = new - // ConcurrentHashMap<String, WatchNodeExistance>(); private Map<String, SafeModeCacheEntry> _clusterToSafeMode = new ConcurrentHashMap<String, ZookeeperClusterStatus.SafeModeCacheEntry>(); -// private ConcurrentMap<String, WatchNodeData> _safeModeDataWatchers = new ConcurrentHashMap<String, WatchNodeData>(); private ConcurrentMap<String, WatchNodeExistance> _enabledWatchNodeExistance = new ConcurrentHashMap<String, WatchNodeExistance>(); private ConcurrentMap<String, WatchNodeExistance> _readOnlyWatchNodeExistance = new ConcurrentHashMap<String, WatchNodeExistance>(); @@ -101,13 +98,6 @@ public class ZookeeperClusterStatus extends ClusterStatus { ZkUtils.waitUntilExists(_zk, tablesPath); WatchChildren clusterWatcher = new WatchChildren(_zk, tablesPath).watch(new Tables(cluster)); _tableWatchers.put(cluster, clusterWatcher); - // String safemodePath = - // ZookeeperPathConstants.getSafemodePath(cluster); - // ZkUtils.waitUntilExists(_zk, safemodePath); - // WatchNodeExistance watchNodeExistance = new WatchNodeExistance(_zk, - // safemodePath).watch(new SafeExistance( - // cluster)); - // _safeModeWatchers.put(cluster, watchNodeExistance); } } @@ -149,10 +139,6 @@ public class ZookeeperClusterStatus extends ClusterStatus { } } }); -// WatchNodeData nodeData = _safeModeDataWatchers.put(cluster, watchNodeData); -// if (nodeData != null) { -// nodeData.close(); -// } } } } @@ -509,8 +495,6 @@ public class ZookeeperClusterStatus extends ClusterStatus { close(_clusterWatcher); close(_onlineShardsNodesWatchers); close(_tableWatchers); - // close(_safeModeWatchers); -// close(_safeModeDataWatchers); close(_enabledWatchNodeExistance); close(_readOnlyWatchNodeExistance); } http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4a971356/blur-core/src/main/java/org/apache/blur/thrift/TableAdmin.java ---------------------------------------------------------------------- diff --git a/blur-core/src/main/java/org/apache/blur/thrift/TableAdmin.java b/blur-core/src/main/java/org/apache/blur/thrift/TableAdmin.java index 90bc68f..5fbedd8 100644 --- a/blur-core/src/main/java/org/apache/blur/thrift/TableAdmin.java +++ b/blur-core/src/main/java/org/apache/blur/thrift/TableAdmin.java @@ -103,7 +103,7 @@ public abstract class TableAdmin implements Iface { public final void createTable(TableDescriptor tableDescriptor) throws BlurException, TException { try { TableContext.clear(); - BlurUtil.validateTableName(tableDescriptor.name); + BlurUtil.validateTableName(tableDescriptor.getName()); _clusterStatus.createTable(tableDescriptor); } catch (Exception e) { LOG.error("Unknown error during create of [table={0}, tableDescriptor={1}]", e, tableDescriptor.name, @@ -111,7 +111,7 @@ public abstract class TableAdmin implements Iface { throw new BException(e.getMessage(), e); } if (tableDescriptor.isEnabled) { - enableTable(tableDescriptor.name); + enableTable(tableDescriptor.getName()); } } http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4a971356/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java ---------------------------------------------------------------------- diff --git a/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java b/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java index 7919bc5..1781383 100644 --- a/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java +++ b/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java @@ -838,11 +838,6 @@ public class BlurUtil { return ManagementFactory.getRuntimeMXBean().getName(); } - // public static <T> BlurIterator<T, BlurException> convert(final Iterator<T> - // iterator) { - // return convert(iterator, BlurException.class); - // } - public static <T, E extends Exception> BlurIterator<T, E> convert(final Iterator<T> iterator) { return new BlurIterator<T, E>() {
