You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/09/22 22:48:08 UTC
[08/16] git commit: Deleted the wrong ZooCache
Deleted the wrong ZooCache
git-svn-id: https://svn.apache.org/repos/asf/accumulo/branches/ACCUMULO-CURATOR@1496206 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/60395c11
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/60395c11
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/60395c11
Branch: refs/heads/ACCUMULO-CURATOR
Commit: 60395c114bcaaaaa7ab8321a7626d892d2fe6d12
Parents: 51ff32a
Author: John Vines <vi...@apache.org>
Authored: Mon Jun 24 20:38:17 2013 +0000
Committer: John Vines <vi...@apache.org>
Committed: Mon Jun 24 20:38:17 2013 +0000
----------------------------------------------------------------------
.../accumulo/core/zookeeper/ZooCache.java | 40 --------------------
.../accumulo/server/zookeeper/ZooCache.java | 31 +++++++++++++++
2 files changed, 31 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/60395c11/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooCache.java b/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooCache.java
deleted file mode 100644
index c1e30c6..0000000
--- a/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooCache.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.core.zookeeper;
-
-import org.apache.accumulo.fate.zookeeper.ZooReader;
-import org.apache.zookeeper.Watcher;
-
-/**
- * This class remains here for backwards compatibility.
- *
- * @deprecated since 1.5, replaced by {@link org.apache.accumulo.fate.zookeeper.ZooCache}
- */
-@Deprecated
-public class ZooCache extends org.apache.accumulo.fate.zookeeper.ZooCache {
- public ZooCache(String zooKeepers, int sessionTimeout) {
- super(zooKeepers, sessionTimeout);
- }
-
- public ZooCache(String zooKeepers, int sessionTimeout, Watcher watcher) {
- super(zooKeepers, sessionTimeout, watcher);
- }
-
- public ZooCache(ZooReader reader, Watcher watcher) {
- super(reader, watcher);
- }
-}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/60395c11/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooCache.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooCache.java b/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooCache.java
new file mode 100644
index 0000000..e9c4320
--- /dev/null
+++ b/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooCache.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.server.zookeeper;
+
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
+import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.server.curator.CuratorUtil;
+
+public class ZooCache extends org.apache.accumulo.fate.zookeeper.ZooCache {
+ public ZooCache() {
+ super(CuratorUtil.getInstance());
+ }
+
+ public ZooCache(AccumuloConfiguration conf) {
+ super(conf.get(Property.INSTANCE_ZK_HOST), (int) conf.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT));
+ }
+}