helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kisho...@apache.org
Subject [1/2] git commit: [Helix-5] Removing deprecated apis
Date Wed, 14 Nov 2012 10:02:31 GMT
Updated Branches:
  refs/heads/master 6f7b782cb -> a243018a1


[Helix-5] Removing deprecated apis


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

Branch: refs/heads/master
Commit: a243018a1874d6ae64be10614c9e518f883e6605
Parents: 6f7b782
Author: Kishore Gopalakrishna <g.kishore@gmail.com>
Authored: Wed Nov 14 02:01:49 2012 -0800
Committer: Kishore Gopalakrishna <g.kishore@gmail.com>
Committed: Wed Nov 14 02:01:49 2012 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/helix/DataAccessor.java   |  101 --
 .../main/java/org/apache/helix/HelixManager.java   |   21 -
 .../helix/controller/stages/HealthDataCache.java   |   26 -
 .../apache/helix/manager/zk/ZKDataAccessor.java    |  333 -------
 .../apache/helix/manager/zk/ZKHelixManager.java    |   38 -
 .../apache/helix/messaging/CriteriaEvaluator.java  |   11 -
 .../helix/monitoring/mbeans/ResourceMonitor.java   |    1 -
 .../java/org/apache/helix/store/PropertyStore.java |  215 -----
 .../apache/helix/store/PropertyStoreFactory.java   |   49 -
 .../org/apache/helix/store/zk/ZKPropertyStore.java |  739 ---------------
 .../apache/helix/store/zk/ZkCallbackHandler.java   |  101 --
 .../helix/tools/IdealStateCalculatorByRush.java    |    2 +-
 .../java/org/apache/helix/tools/RUSHrHash.java     |    3 +-
 .../src/test/java/org/apache/helix/Mocks.java      |   13 -
 .../src/test/java/org/apache/helix/TestHelper.java |   12 +-
 .../controller/stages/DummyClusterManager.java     |   15 -
 .../apache/helix/integration/TestAddClusterV2.java |    6 -
 .../helix/integration/TestAutoRebalance.java       |    4 -
 .../helix/manager/zk/TestZKDataAccessor.java       |  178 ----
 .../helix/manager/zk/TestZKDataAccessorCache.java  |  156 ---
 .../helix/manager/zk/TestZkClusterManager.java     |   11 +-
 .../messaging/TestDefaultMessagingService.java     |    9 +-
 .../mbeans/TestClusterStatusMonitor.java           |    5 -
 .../monitoring/mbeans/TestResourceMonitor.java     |    1 -
 .../helix/participant/MockZKHelixManager.java      |   16 -
 .../helix/store/TestZNRecordJsonSerializer.java    |   80 --
 .../apache/helix/store/zk/TestZKPropertyStore.java |  541 -----------
 .../store/zk/TestZKPropertyStoreMultiThread.java   |  161 ----
 .../store/zk/TestZkPropertyStoreSessionExpiry.java |  111 ---
 li_checkstyle.xml                                  |  124 ---
 recipes/rabbitmq-consumer-group/pom.xml            |    1 -
 31 files changed, 12 insertions(+), 3072 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/DataAccessor.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/DataAccessor.java b/helix-core/src/main/java/org/apache/helix/DataAccessor.java
deleted file mode 100644
index 04bd764..0000000
--- a/helix-core/src/main/java/org/apache/helix/DataAccessor.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.apache.helix;
-
-/*
- * 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.
- */
-
-import java.util.List;
-import java.util.Map;
-/**
- * use {@link HelixDataAccessor}.
- */
-@Deprecated
-public interface DataAccessor
-{
-
-  /**
-   * Set a property, overwrite if it exists and creates if not exists
-   * 
-   * @param type
-   * @param value
-   * @param keys
-   * @true if the operation was successful
-   */
-  boolean setProperty(PropertyType type, ZNRecord value, String... keys);
-
-  boolean setProperty(PropertyType type, HelixProperty value, String... keys);
-
-  /**
-   * Updates a property, either overwrite or merge based on the
-   * propertyType.mergeOnUpdate, fails to update if
-   * propertyType.updateOnlyOnExists and does not exist
-   * 
-   * @param type
-   * @param value
-   * @param keys
-   * @return true if the update was successful
-   */
-  boolean updateProperty(PropertyType type, ZNRecord value, String... keys);
-
-  boolean updateProperty(PropertyType type, HelixProperty value, String... keys);
-
-  /**
-   * Return the property value, it must be a leaf
-   * 
-   * @param type
-   * @param keys
-   *          one or more keys used to get the path of znode
-   * @return value, Null if absent or on error
-   */
-  ZNRecord getProperty(PropertyType type, String... keys);
-
-  <T extends HelixProperty> T getProperty(Class<T> clazz, PropertyType type, String... keys);
-
-  /**
-   * Removes the property
-   * 
-   * @param type
-   * @param keys
-   * @return
-   */
-  boolean removeProperty(PropertyType type, String... keys);
-
-  /**
-   * Return the child names of the property
-   * 
-   * @param type
-   * @param keys
-   * @return SubPropertyNames
-   */
-  List<String> getChildNames(PropertyType type, String... keys);
-
-  /**
-   * 
-   * @param type
-   * @param keys
-   *          must point to parent of leaf znodes
-   * @return subPropertyValues
-   */
-  List<ZNRecord> getChildValues(PropertyType type, String... keys);
-
-  <T extends HelixProperty> List<T> getChildValues(Class<T> clazz, PropertyType type,
-      String... keys);
-
-  <T extends HelixProperty> Map<String, T> getChildValuesMap(Class<T> clazz, PropertyType type,
-      String... keys);
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/HelixManager.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/HelixManager.java b/helix-core/src/main/java/org/apache/helix/HelixManager.java
index 745fa28..65aa3cb 100644
--- a/helix-core/src/main/java/org/apache/helix/HelixManager.java
+++ b/helix-core/src/main/java/org/apache/helix/HelixManager.java
@@ -26,7 +26,6 @@ import org.apache.helix.healthcheck.ParticipantHealthReportCollector;
 import org.apache.helix.participant.HelixStateMachineEngine;
 import org.apache.helix.participant.StateMachineEngine;
 import org.apache.helix.spectator.RoutingTableProvider;
-import org.apache.helix.store.PropertyStore;
 import org.apache.helix.store.zk.ZkHelixPropertyStore;
 
 
@@ -161,16 +160,6 @@ public interface HelixManager
    * @return
    */
   boolean removeListener(Object listener);
-
-  /**
-   * Return the client to perform read/write operations on the cluster data
-   * store {@link getHelixDataAccessor() }
-   * 
-   * @return DataAccessor
-   */
-  @Deprecated
-  DataAccessor getDataAccessor();
-
   /**
    * Return the client to perform read/write operations on the cluster data
    * store
@@ -222,16 +211,6 @@ public interface HelixManager
   HelixAdmin getClusterManagmentTool();
 
   /**
-   * Provide get property store for a cluster
-   * 
-   * @param rootNamespace
-   * @param serializer
-   * @return
-   */
-  @Deprecated
-  PropertyStore<ZNRecord> getPropertyStore();
-  
-  /**
    * Get property store
    * 
    * @return

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/controller/stages/HealthDataCache.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/controller/stages/HealthDataCache.java b/helix-core/src/main/java/org/apache/helix/controller/stages/HealthDataCache.java
index 6caa14e..11addfc 100644
--- a/helix-core/src/main/java/org/apache/helix/controller/stages/HealthDataCache.java
+++ b/helix-core/src/main/java/org/apache/helix/controller/stages/HealthDataCache.java
@@ -23,7 +23,6 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.helix.DataAccessor;
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.HelixProperty;
 import org.apache.helix.PropertyType;
@@ -45,31 +44,6 @@ public class HealthDataCache
   Alerts _alerts;
   AlertStatus _alertStatus;
 
-  public boolean refresh(DataAccessor accessor)
-  {
-    _liveInstanceMap = accessor.getChildValuesMap(LiveInstance.class,
-        PropertyType.LIVEINSTANCES);
-
-    Map<String, Map<String, HealthStat>> hsMap = new HashMap<String, Map<String, HealthStat>>();
-
-    for (String instanceName : _liveInstanceMap.keySet())
-    {
-      // xxx clearly getting znodes for the instance here...so get the
-      // timestamp!
-
-      hsMap.put(instanceName, accessor.getChildValuesMap(HealthStat.class,
-          PropertyType.HEALTHREPORT, instanceName));
-    }
-    _healthStatMap = Collections.unmodifiableMap(hsMap);
-    _persistentStats = accessor.getProperty(PersistentStats.class,
-        PropertyType.PERSISTENTSTATS);
-    _alerts = accessor.getProperty(Alerts.class, PropertyType.ALERTS);
-    _alertStatus = accessor.getProperty(AlertStatus.class,
-        PropertyType.ALERT_STATUS);
-
-    return true;
-  }
-
   public HealthStat getGlobalStats()
   {
     return _globalStats;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKDataAccessor.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKDataAccessor.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKDataAccessor.java
deleted file mode 100644
index d5ac7c9..0000000
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKDataAccessor.java
+++ /dev/null
@@ -1,333 +0,0 @@
-package org.apache.helix.manager.zk;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.helix.DataAccessor;
-import org.apache.helix.HelixException;
-import org.apache.helix.HelixProperty;
-import org.apache.helix.PropertyPathConfig;
-import org.apache.helix.PropertyType;
-import org.apache.helix.ZNRecord;
-import org.apache.log4j.Logger;
-import org.apache.zookeeper.data.Stat;
-
-
-@Deprecated
-public class ZKDataAccessor implements DataAccessor
-{
-  private static Logger logger = Logger.getLogger(ZKDataAccessor.class);
-
-  protected final String _clusterName;
-  protected final ZkClient _zkClient;
-
-  /**
-   * If a PropertyType has children (e.g. CONFIGS), then the parent path is the
-   * first key and child path is the second key; If a PropertyType has no child
-   * (e.g. LEADER), then no cache
-   */
-  private final Map<String, Map<String, ZNRecord>> _cache = new ConcurrentHashMap<String, Map<String, ZNRecord>>();
-
-  public ZKDataAccessor(String clusterName, ZkClient zkClient)
-  {
-    _clusterName = clusterName;
-    _zkClient = zkClient;
-  }
-
-  @Override
-  public boolean setProperty(PropertyType type, HelixProperty value, String... keys)
-  {
-    if (!value.isValid())
-    {
-      throw new HelixException("The ZNRecord for " + type + " is not valid.");
-    }
-    return setProperty(type, value.getRecord(), keys);
-  }
-
-  @Override
-  public boolean setProperty(PropertyType type, ZNRecord value, String... keys)
-  {
-    String path = PropertyPathConfig.getPath(type, _clusterName, keys);
-
-    String parent = new File(path).getParent();
-    if (!_zkClient.exists(parent))
-    {
-      _zkClient.createPersistent(parent, true);
-    }
-
-    if (_zkClient.exists(path))
-    {
-      if (type.isCreateOnlyIfAbsent())
-      {
-        return false;
-      } else
-      {
-        ZKUtil.createOrUpdate(_zkClient, path, value, type.isPersistent(), false);
-      }
-    } else
-    {
-      try
-      {
-        if (type.isPersistent())
-        {
-          _zkClient.createPersistent(path, value);
-        } else
-        {
-          _zkClient.createEphemeral(path, value);
-        }
-      } catch (Exception e)
-      {
-        logger.warn("Exception while creating path:" + path
-            + " Most likely due to race condition(Ignorable).", e);
-        return false;
-      }
-    }
-    return true;
-  }
-
-  @Override
-  public boolean updateProperty(PropertyType type, HelixProperty value, String... keys)
-  {
-    return updateProperty(type, value.getRecord(), keys);
-  }
-
-  @Override
-  public boolean updateProperty(PropertyType type, ZNRecord value, String... keys)
-  {
-    String path = PropertyPathConfig.getPath(type, _clusterName, keys);
-    if (type.isUpdateOnlyOnExists())
-    {
-      ZKUtil.updateIfExists(_zkClient, path, value, type.isMergeOnUpdate());
-    } else
-    {
-      String parent = new File(path).getParent();
-
-      if (!_zkClient.exists(parent))
-      {
-        _zkClient.createPersistent(parent, true);
-      }
-
-      if (!type.usePropertyTransferServer())
-      {
-        ZKUtil.createOrUpdate(_zkClient, path, value, type.isPersistent(), type.isMergeOnUpdate());
-      } else
-      {
-        ZKUtil.asyncCreateOrUpdate(_zkClient, path, value, type.isPersistent(), type.isMergeOnUpdate());
-      }
-    }
-
-    return true;
-  }
-
-  @Override
-  public <T extends HelixProperty>
-    T getProperty(Class<T> clazz, PropertyType type, String... keys)
-  {
-    return HelixProperty.convertToTypedInstance(clazz, getProperty(type, keys));
-  }
-
-  @Override
-  public ZNRecord getProperty(PropertyType type, String... keys)
-  {
-    String path = PropertyPathConfig.getPath(type, _clusterName, keys);
-
-    if (!type.isCached())
-    {
-      return _zkClient.readData(path, true);
-    } else
-    {
-      int len = keys.length;
-      if (len == 0)
-      {
-        return _zkClient.readData(path, true);
-      } else
-      {
-        String[] subkeys = Arrays.copyOfRange(keys, 0, len - 1);
-        Map<String, ZNRecord> newChilds = refreshChildValuesCache(type, subkeys);
-        return newChilds.get(keys[len - 1]);
-      }
-    }
-
-  }
-
-  @Override
-  public boolean removeProperty(PropertyType type, String... keys)
-  {
-    String path = PropertyPathConfig.getPath(type, _clusterName, keys);
-    return _zkClient.delete(path);
-  }
-
-  @Override
-  public List<String> getChildNames(PropertyType type, String... keys)
-  {
-    String path = PropertyPathConfig.getPath(type, _clusterName, keys);
-    if (_zkClient.exists(path))
-    {
-      return _zkClient.getChildren(path);
-    } else
-    {
-      return Collections.emptyList();
-    }
-  }
-
-  @Override
-  public <T extends HelixProperty>
-    List<T> getChildValues(Class<T> clazz, PropertyType type, String... keys)
-  {
-    List<ZNRecord> newChilds = getChildValues(type, keys);
-    if (newChilds.size() > 0)
-    {
-      return HelixProperty.convertToTypedList(clazz, newChilds);
-    }
-    return Collections.emptyList();
-  }
-
-  @Override
-  public List<ZNRecord> getChildValues(PropertyType type, String... keys)
-
-  {
-    String path = PropertyPathConfig.getPath(type, _clusterName, keys);
-    // if (path == null)
-    // {
-    // System.err.println("path is null");
-    // }
-
-    if (_zkClient.exists(path))
-    {
-      if (!type.isCached())
-      {
-        return ZKUtil.getChildren(_zkClient, path);
-      } else
-      {
-        Map<String, ZNRecord> newChilds = refreshChildValuesCache(type, keys);
-        return new ArrayList<ZNRecord>(newChilds.values());
-      }
-    }
-
-    return Collections.emptyList();
-  }
-
-  public void reset()
-  {
-    _cache.clear();
-  }
-
-  private Map<String, ZNRecord> refreshChildValuesCache(PropertyType type, String... keys)
-  {
-    if (!type.isCached())
-    {
-      throw new IllegalArgumentException("Type:" + type + " is NOT cached");
-    }
-
-    String path = PropertyPathConfig.getPath(type, _clusterName, keys);
-
-    Map<String, ZNRecord> newChilds = refreshChildValues(path, _cache.get(path));
-    if (newChilds != null && newChilds.size() > 0)
-    {
-      _cache.put(path, newChilds);
-      return newChilds;
-    } else
-    {
-      _cache.remove(path);
-      return Collections.emptyMap();
-    }
-  }
-
-  /**
-   * Read a zookeeper node only if it's data has been changed since last read
-   *
-   * @param parentPath
-   * @param oldChildRecords
-   * @return newChildRecords
-   */
-  private Map<String, ZNRecord> refreshChildValues(String parentPath,
-      Map<String, ZNRecord> oldChildRecords)
-  {
-    List<String> childs = _zkClient.getChildren(parentPath);
-    if (childs == null || childs.size() == 0)
-    {
-      return Collections.emptyMap();
-    }
-
-    Stat newStat = new Stat();
-    Map<String, ZNRecord> newChildRecords = new HashMap<String, ZNRecord>();
-    for (String child : childs)
-    {
-      String childPath = parentPath + "/" + child;
-
-      // assume record.id should be the last part of zookeeper path
-      if (oldChildRecords == null || !oldChildRecords.containsKey(child))
-      {
-        ZNRecord record = _zkClient.readDataAndStat(childPath, newStat, true);
-        if (record != null)
-        {
-          record.setVersion(newStat.getVersion());
-          newChildRecords.put(child, record);
-        }
-      } else
-      {
-        ZNRecord oldChild = oldChildRecords.get(child);
-
-        int oldVersion = oldChild.getVersion();
-        long oldCtime = oldChild.getCreationTime();
-        newStat = _zkClient.getStat(childPath);
-        if (newStat != null)
-        {
-          // System.out.print(child + " oldStat:" + oldStat);
-          // System.out.print(child + " newStat:" + newStat);
-
-          if (oldCtime < newStat.getCtime() ||
-              oldVersion < newStat.getVersion())
-          {
-            ZNRecord record = _zkClient.readDataAndStat(childPath, newStat, true);
-            if (record != null)
-            {
-              record.setVersion(newStat.getVersion());
-              record.setCreationTime(newStat.getCtime());
-              record.setModifiedTime(newStat.getMtime());
-              newChildRecords.put(child, record);
-            }
-          } else
-          {
-            newChildRecords.put(child, oldChild);
-          }
-        }
-      }
-    }
-
-    return Collections.unmodifiableMap(newChildRecords);
-  }
-
-  @Override
-  public <T extends HelixProperty>
-    Map<String, T> getChildValuesMap(Class<T> clazz, PropertyType type, String... keys)
-  {
-    List<T> list = getChildValues(clazz, type, keys);
-    return Collections.unmodifiableMap(HelixProperty.convertListToMap(list));
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
index 8ae785b..7d51897 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
@@ -47,7 +47,6 @@ import org.apache.helix.ConfigChangeListener;
 import org.apache.helix.ConfigScope.ConfigScopeProperty;
 import org.apache.helix.ControllerChangeListener;
 import org.apache.helix.CurrentStateChangeListener;
-import org.apache.helix.DataAccessor;
 import org.apache.helix.ExternalViewChangeListener;
 import org.apache.helix.HealthStateChangeListener;
 import org.apache.helix.HelixAdmin;
@@ -79,9 +78,7 @@ import org.apache.helix.monitoring.ZKPathDataDumpTask;
 import org.apache.helix.participant.DistClusterControllerElection;
 import org.apache.helix.participant.HelixStateMachineEngine;
 import org.apache.helix.participant.StateMachineEngine;
-import org.apache.helix.store.PropertyStore;
 import org.apache.helix.store.ZNRecordJsonSerializer;
-import org.apache.helix.store.zk.ZKPropertyStore;
 import org.apache.helix.store.zk.ZkHelixPropertyStore;
 import org.apache.helix.tools.PropertiesReader;
 import org.apache.log4j.Logger;
@@ -99,7 +96,6 @@ public class ZKHelixManager implements HelixManager
   private final String                         _instanceName;
   private final String                         _zkConnectString;
   private static final int                     DEFAULT_SESSION_TIMEOUT = 30 * 1000;
-  private ZKDataAccessor                       _accessor;
   private ZKHelixDataAccessor                  _helixAccessor;
   private ConfigAccessor                       _configAccessor;
   protected ZkClient                           _zkClient;
@@ -115,7 +111,6 @@ public class ZKHelixManager implements HelixManager
   private final String                         _version;
   private final StateMachineEngine             _stateMachEngine;
   private int                                  _sessionTimeout;
-  private PropertyStore<ZNRecord>              _propertyStore;
   private ZkHelixPropertyStore<ZNRecord>       _helixPropertyStore;
   private final List<HelixTimerTask>           _controllerTimerTasks;
   private BaseDataAccessor<ZNRecord>           _baseDataAccessor;
@@ -356,13 +351,6 @@ public class ZKHelixManager implements HelixManager
   }
 
   @Override
-  public DataAccessor getDataAccessor()
-  {
-    checkConnected();
-    return _accessor;
-  }
-
-  @Override
   public HelixDataAccessor getHelixDataAccessor()
   {
     checkConnected();
@@ -455,11 +443,6 @@ public class ZKHelixManager implements HelixManager
       stopTimerTasks();
     }
 
-    if (_propertyStore != null)
-    {
-      _propertyStore.stop();
-    }
-
     // unsubscribe accessor from controllerChange
     _zkClient.unsubscribeAll();
 
@@ -594,7 +577,6 @@ public class ZKHelixManager implements HelixManager
                                .build();
 
     _zkClient = new ZkClient(zkServers, _sessionTimeout, CONNECTIONTIMEOUT, zkSerializer);
-    _accessor = new ZKDataAccessor(_clusterName, _zkClient);
 
     ZkBaseDataAccessor<ZNRecord> baseDataAccessor =
         new ZkBaseDataAccessor<ZNRecord>(_zkClient);
@@ -698,7 +680,6 @@ public class ZKHelixManager implements HelixManager
     {
       _sessionId = Long.toHexString(zkConnection.getZookeeper().getSessionId());
     }
-    _accessor.reset();
     _baseDataAccessor.reset();
 
     resetHandlers();
@@ -978,25 +959,6 @@ public class ZKHelixManager implements HelixManager
     }
   }
 
-  @Deprecated
-  @Override
-  public synchronized PropertyStore<ZNRecord> getPropertyStore()
-  {
-    checkConnected();
-
-    if (_propertyStore == null)
-    {
-      String path = PropertyPathConfig.getPath(PropertyType.PROPERTYSTORE, _clusterName);
-
-      // reuse the existing zkClient because its serializer will use raw serialization
-      // for paths of the property store.
-      _propertyStore =
-          new ZKPropertyStore<ZNRecord>(_zkClient, new ZNRecordJsonSerializer(), path);
-    }
-
-    return _propertyStore;
-  }
-
   @Override
   public synchronized ZkHelixPropertyStore<ZNRecord> getHelixPropertyStore()
   {

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/messaging/CriteriaEvaluator.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/messaging/CriteriaEvaluator.java b/helix-core/src/main/java/org/apache/helix/messaging/CriteriaEvaluator.java
index cf826b0..b2d7b4d 100644
--- a/helix-core/src/main/java/org/apache/helix/messaging/CriteriaEvaluator.java
+++ b/helix-core/src/main/java/org/apache/helix/messaging/CriteriaEvaluator.java
@@ -20,26 +20,15 @@ package org.apache.helix.messaging;
  */
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.apache.helix.Criteria;
-import org.apache.helix.DataAccessor;
 import org.apache.helix.HelixManager;
-import org.apache.helix.PropertyType;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.Criteria.DataSource;
 import org.apache.helix.josql.ClusterJosqlQueryProcessor;
 import org.apache.helix.josql.ZNRecordRow;
 import org.apache.log4j.Logger;
-import org.josql.Query;
-import org.josql.QueryExecutionException;
-import org.josql.QueryParseException;
-import org.josql.QueryResults;
 
 
 public class CriteriaEvaluator

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ResourceMonitor.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ResourceMonitor.java b/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ResourceMonitor.java
index 8b46220..ba5fa00 100644
--- a/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ResourceMonitor.java
+++ b/helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ResourceMonitor.java
@@ -21,7 +21,6 @@ package org.apache.helix.monitoring.mbeans;
 
 import java.util.Map;
 
-import org.apache.helix.DataAccessor;
 import org.apache.helix.HelixManager;
 import org.apache.helix.PropertyType;
 import org.apache.helix.model.ExternalView;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/store/PropertyStore.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/store/PropertyStore.java b/helix-core/src/main/java/org/apache/helix/store/PropertyStore.java
deleted file mode 100644
index aef95c4..0000000
--- a/helix-core/src/main/java/org/apache/helix/store/PropertyStore.java
+++ /dev/null
@@ -1,215 +0,0 @@
-package org.apache.helix.store;
-
-/*
- * 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.
- */
-
-import java.util.Comparator;
-import java.util.List;
-
-import org.I0Itec.zkclient.DataUpdater;
-
-/**
- * This property store is similar to a key value store but supports hierarchical
- * structure. It also provides notifications when there is a change in child or
- * parent. Data can be stored child only. Property name cannot end with a "/". 
- * Only the root "/" is an exception. 
- * Property key name is split based on delimiter "/".
- * Suppose we do setProperty("/foo/bar1",val1) and setProperty("/foo/bar2",val2)
- * getProperty("/foo) will return null since no data is stored at /foo
- * getPropertyNames("/foo") will return "bar1" and "bar2" 
- * removeProperty("/foo/bar1") will simply remove the property stored at /foo/bar1
- * 
- * @param <T>
- */
-public interface PropertyStore<T>
-{
-  /**
-   * Set property on key. Override if the property already exists
-   * @param key
-   * @param value
-   * @throws PropertyStoreException
-   */
-  void setProperty(String key, T value) throws PropertyStoreException;
-
-  /**
-   * Get the property on key
-   * @param key
-   * @return value of the property
-   * @throws PropertyStoreException
-   */
-  T getProperty(String key) throws PropertyStoreException;
-  
-  /**
-   * Get the property and its statistics information
-   * @param key
-   * @param stat
-   * @return value of the property
-   * @throws PropertyStoreException
-   */
-  T getProperty(String key, PropertyStat propertyStat) throws PropertyStoreException;
-
-  /**
-   * Removes the property on key
-   * @param key
-   * @throws PropertyStoreException
-   */
-  void removeProperty(String key) throws PropertyStoreException;
-
-  /**
-   * Get all the child property keys under prefix
-   * @param prefix
-   * @return
-   * @throws PropertyStoreException
-   */
-  List<String> getPropertyNames(String prefix) throws PropertyStoreException;
-
-  /**
-   * Delimiter to split the propertyName
-   * @param delimiter
-   * @throws PropertyStoreException
-   */
-  void setPropertyDelimiter(String delimiter) throws PropertyStoreException;
-
-  /**
-   * Subscribe for changes in the property property. Key can be a prefix,
-   * Multiple callbacks can be invoked. One callback per change is not guaranteed.
-   * Some changes might be missed. That's why one has to read the data on every
-   * callback.
-   * @param prefix
-   * @param listener
-   * @throws PropertyStoreException
-   */
-  void subscribeForPropertyChange(String prefix,
-      PropertyChangeListener<T> listener) throws PropertyStoreException;
-
-  /**
-   * Removes the subscription for the prefix
-   * @param prefix
-   * @param listener
-   * @throws PropertyStoreException
-   */
-  void unsubscribeForPropertyChange(String prefix,
-      PropertyChangeListener<T> listener) throws PropertyStoreException;
-
-  /**
-   * Indicates if the implementation supports the feature of storing data in
-   * parent
-   * @return
-   */
-  boolean canParentStoreData();
-
-  /**
-   * Set property serializer
-   * @param serializer
-   */
-  void setPropertySerializer(PropertySerializer<T> serializer);
-
-  /**
-   * create a sub namespace in the property store
-   * @return root property path
-   */ 
-  public void createPropertyNamespace(String prefix) throws PropertyStoreException;
-    
-  /**
-   * Get the root namespace of the property store
-   * @return root property path
-   */ 
-  public String getPropertyRootNamespace();
-  
-  /**
-   * Atomically update property until succeed, updater updates old value to new value
-   * Will create key if doesn't exist
-   * @param key
-   * @param updater
-   */
-  public void updatePropertyUntilSucceed(String key, DataUpdater<T> updater) 
-    throws PropertyStoreException;
-  
-  /**
-   * Atomically update property until succeed, updater updates old value to new value
-   * If createIfAbsent is true, will create key if doesn't exist
-   * If createIfAbsent is false, will not create key and throw exception
-   * @param key
-   * @param updater
-   * @param createIfAbsent
-   * @throws PropertyStoreException
-   */
-  public void updatePropertyUntilSucceed(String key, DataUpdater<T> updater, boolean createIfAbsent) 
-    throws PropertyStoreException;
-  
-  /**
-   * Check if a property exists
-   * @param key
-   * @return
-   */
-  public boolean exists(String key);
-  
-  /**
-   * Remove a parent and all its descendants
-   * @param prefix
-   * @throws PropertyStoreException
-   */
-  public void removeNamespace(String prefix) throws PropertyStoreException;
-  
-  /**
-   * Update property return true if succeed, false otherwise
-   * @param key
-   * @param updater
-   */
-  // public boolean updateProperty(String key, DataUpdater<T> updater);
-  
-  /**
-   * Atomically compare and set property
-   * Return true if succeed, false otherwise
-   * Create if doesn't exist
-   * @param key
-   * @param expected value
-   * @param updated value
-   * @param comparator
-   * @param create if absent
-   */
-  public boolean compareAndSet(String key, T expected, T update, Comparator<T> comparator);
-  
-  /**
-   * Atomically compare and set property
-   * Return true if succeed, false otherwise
-   * If createIfAbsent is true, create key if doesn't exist
-   * If createIfAbsent is false, will not create key and throw exception
-   * @param key
-   * @param expected
-   * @param update
-   * @param comparator
-   * @param createIfAbsent
-   * @return
-   */
-  public boolean compareAndSet(String key, T expected, T update, Comparator<T> comparator, boolean createIfAbsent);
-
-  /**
-   * Start property store
-   * @return
-   */
-  public boolean start();
-
-  /**
-   * Stop property store and do clean up
-   * @return true
-   */
-  public boolean stop();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/store/PropertyStoreFactory.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/store/PropertyStoreFactory.java b/helix-core/src/main/java/org/apache/helix/store/PropertyStoreFactory.java
deleted file mode 100644
index 8a4d187..0000000
--- a/helix-core/src/main/java/org/apache/helix/store/PropertyStoreFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.apache.helix.store;
-
-/*
- * 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.
- */
-
-import org.apache.helix.manager.zk.ByteArraySerializer;
-import org.apache.helix.manager.zk.ZkClient;
-import org.apache.helix.store.zk.ZKPropertyStore;
-import org.apache.log4j.Logger;
-
-
-public class PropertyStoreFactory
-{
-  private static Logger LOG = Logger.getLogger(PropertyStoreFactory.class);
-
-  public static <T extends Object> PropertyStore<T> getZKPropertyStore(String zkAddress,
-                                                                       PropertySerializer<T> serializer,
-                                                                       String rootNamespace)
-  {
-    if (zkAddress == null || serializer == null || rootNamespace == null)
-    {
-      throw new IllegalArgumentException("zkAddress|serializer|rootNamespace can't be null");
-    }
-
-    LOG.info("Get a zk property store. zkAddr: " + zkAddress + ", root: " + rootNamespace);
-    ZkClient zkClient =
-        new ZkClient(zkAddress,
-                     ZkClient.DEFAULT_SESSION_TIMEOUT,
-                     ZkClient.DEFAULT_CONNECTION_TIMEOUT,
-                     new ByteArraySerializer());
-    return new ZKPropertyStore<T>(zkClient, serializer, rootNamespace);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/store/zk/ZKPropertyStore.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/store/zk/ZKPropertyStore.java b/helix-core/src/main/java/org/apache/helix/store/zk/ZKPropertyStore.java
deleted file mode 100644
index 13cecb3..0000000
--- a/helix-core/src/main/java/org/apache/helix/store/zk/ZKPropertyStore.java
+++ /dev/null
@@ -1,739 +0,0 @@
-package org.apache.helix.store.zk;
-
-/*
- * 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.
- */
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.I0Itec.zkclient.DataUpdater;
-import org.I0Itec.zkclient.IZkDataListener;
-import org.I0Itec.zkclient.IZkStateListener;
-import org.I0Itec.zkclient.ZkConnection;
-import org.I0Itec.zkclient.exception.ZkBadVersionException;
-import org.I0Itec.zkclient.exception.ZkNoNodeException;
-import org.apache.helix.manager.zk.ZkClient;
-import org.apache.helix.store.PropertyChangeListener;
-import org.apache.helix.store.PropertySerializer;
-import org.apache.helix.store.PropertyStat;
-import org.apache.helix.store.PropertyStore;
-import org.apache.helix.store.PropertyStoreException;
-import org.apache.log4j.Logger;
-import org.apache.zookeeper.Watcher.Event.KeeperState;
-import org.apache.zookeeper.ZooKeeper;
-import org.apache.zookeeper.data.Stat;
-
-
-@Deprecated
-public class ZKPropertyStore<T> implements
-    PropertyStore<T>,
-    IZkStateListener,
-    IZkDataListener // , IZkChildListener,
-{
-  private static Logger LOG = Logger.getLogger(ZKPropertyStore.class);
-
-  class ByteArrayUpdater implements DataUpdater<byte[]>
-  {
-    final DataUpdater<T> _updater;
-    final PropertySerializer<T> _serializer;
-
-    ByteArrayUpdater(DataUpdater<T> updater, PropertySerializer<T> serializer)
-    {
-      _updater = updater;
-      _serializer = serializer;
-    }
-
-    @Override
-    public byte[] update(byte[] current)
-    {
-      try
-      {
-        T currentValue = null;
-        if (current != null)
-        {
-          currentValue = _serializer.deserialize(current);
-        }
-        T updateValue = _updater.update(currentValue);
-        return _serializer.serialize(updateValue);
-      }
-      catch (PropertyStoreException e)
-      {
-        LOG.error("Exception in update. Updater: " + _updater, e);
-      }
-      return null;
-    }
-  }
-
-  private volatile boolean _isConnected = false;
-  private volatile boolean _hasSessionExpired = false;
-
-  protected final ZkClient _zkClient;
-  protected PropertySerializer<T> _serializer;
-  protected final String _root;
-
-  // zookeeperPath->userCallbak->zkCallback
-  private final Map<String, Map<PropertyChangeListener<T>, ZkCallbackHandler<T>>> _callbackMap =
-      new HashMap<String, Map<PropertyChangeListener<T>, ZkCallbackHandler<T>>>();
-
-  // TODO cache capacity should be bounded
-  private final Map<String, PropertyItem> _cache =
-      new ConcurrentHashMap<String, PropertyItem>();
-
-  /**
-   * The given zkClient is assumed to serialize and deserialize raw byte[]
-   * for the given root and its descendants.
-   */
-  public ZKPropertyStore(ZkClient zkClient, final PropertySerializer<T> serializer,
-                         String root)
-  {
-    if (zkClient == null || serializer == null || root == null)
-    {
-      throw new IllegalArgumentException("zkClient|serializer|root can't be null");
-    }
-
-    _root = normalizeKey(root);
-    _zkClient = zkClient;
-
-    setPropertySerializer(serializer);
-
-    _zkClient.createPersistent(_root, true);
-    _zkClient.subscribeStateChanges(this);
-  }
-
-  // key is normalized if it has exactly 1 leading slash
-  private String normalizeKey(String key)
-  {
-    if (key == null)
-    {
-      LOG.error("Key can't be null");
-      throw new IllegalArgumentException("Key can't be null");
-    }
-
-    // strip off leading slash
-    while (key.startsWith("/"))
-    {
-      key = key.substring(1);
-    }
-
-    return "/" + key;
-  }
-
-  private String getAbsolutePath(String key)
-  {
-    key = normalizeKey(key);
-    if (key.equals("/"))
-    {
-      return _root;
-    }
-    else
-    {
-      return _root + key;
-    }
-  }
-
-  // always a return normalized key
-  String getRelativePath(String path)
-  {
-    if (!path.startsWith(_root))
-    {
-      String errMsg = path + "does NOT start with property store's root: " + _root;
-      LOG.error(errMsg);
-      throw new IllegalArgumentException(errMsg);
-    }
-
-    if (path.equals(_root))
-    {
-      return "/";
-    }
-    else
-    {
-      return path.substring(_root.length());
-    }
-  }
-
-  @Override
-  public void createPropertyNamespace(String prefix) throws PropertyStoreException
-  {
-    String path = getAbsolutePath(prefix);
-    try
-    {
-      if (!_zkClient.exists(path))
-      {
-        _zkClient.createPersistent(path, true);
-      }
-    }
-    catch (Exception e)
-    {
-      LOG.error("Exception in creatPropertyNamespace(" + prefix + ")", e);
-      throw new PropertyStoreException(e.toString());
-    }
-  }
-
-  @Override
-  public void setProperty(String key, final T value) throws PropertyStoreException
-  {
-    String path = getAbsolutePath(key);
-
-    try
-    {
-      if (!_zkClient.exists(path))
-      {
-        _zkClient.createPersistent(path, true);
-      }
-
-      // serializer should handle value == null
-      byte[] valueBytes = _serializer.serialize(value);
-      _zkClient.writeData(path, valueBytes);
-
-      // update cache
-      // getProperty(key);
-
-    }
-    catch (Exception e)
-    {
-      LOG.error("Exception when setProperty(" + key + ", " + value + ")", e);
-      throw new PropertyStoreException(e.toString());
-    }
-  }
-
-  @Override
-  public T getProperty(String key) throws PropertyStoreException
-  {
-    return getProperty(key, null);
-  }
-
-  // bytes and stat are not null
-  private T getValueAndStat(byte[] bytes, Stat stat, PropertyStat propertyStat) throws PropertyStoreException
-  {
-    T value = _serializer.deserialize(bytes);
-
-    if (propertyStat != null)
-    {
-      propertyStat.setLastModifiedTime(stat.getMtime());
-      propertyStat.setVersion(stat.getVersion());
-    }
-    return value;
-  }
-
-  @Override
-  public T getProperty(String key, PropertyStat propertyStat) throws PropertyStoreException
-  {
-    String normalizedKey = normalizeKey(key);
-    String path = getAbsolutePath(normalizedKey);
-    Stat stat = new Stat();
-
-    T value = null;
-    try
-    {
-      synchronized (_cache)
-      {
-        PropertyItem item = _cache.get(normalizedKey);
-        _zkClient.subscribeDataChanges(path, this);
-        if (item != null)
-        {
-          // cache hit
-          stat = _zkClient.getStat(path);
-          if (stat != null)
-          {
-            if (item._stat.getCzxid() != stat.getCzxid()
-                || item.getVersion() < stat.getVersion())
-            {
-              // stale data in cache
-              byte[] bytes = _zkClient.readDataAndStat(path, stat, true);
-              if (bytes != null)
-              {
-                value = getValueAndStat(bytes, stat, propertyStat);
-                _cache.put(normalizedKey, new PropertyItem(bytes, stat));
-              }
-            }
-            else
-            {
-              // valid data in cache
-              // item.getBytes() should not be null
-              value = getValueAndStat(item.getBytes(), stat, propertyStat);
-            }
-          }
-        }
-        else
-        {
-          // cache miss
-          byte[] bytes = _zkClient.readDataAndStat(path, stat, true);
-          if (bytes != null)
-          {
-            value = getValueAndStat(bytes, stat, propertyStat);
-            _cache.put(normalizedKey, new PropertyItem(bytes, stat));
-          }
-        }
-      }
-      return value;
-    }
-    catch (Exception e)
-    {
-      LOG.error("Exception in getProperty(" + key + ")", e);
-      throw (new PropertyStoreException(e.toString()));
-    }
-  }
-
-  @Override
-  public void removeProperty(String key) throws PropertyStoreException
-  {
-    String normalizedKey = normalizeKey(key);
-    String path = getAbsolutePath(normalizedKey);
-
-    try
-    {
-      // if (_zkClient.exists(path))
-      // {
-      _zkClient.delete(path);
-      // }
-      // _cache.remove(normalizedKey);
-
-    }
-    catch (ZkNoNodeException e)
-    {
-      // OK
-    }
-    catch (Exception e)
-    {
-      LOG.error("Exception in removeProperty(" + key + ")", e);
-      throw (new PropertyStoreException(e.toString()));
-    }
-  }
-
-  @Override
-  public String getPropertyRootNamespace()
-  {
-    return _root;
-  }
-
-  @Override
-  public void removeNamespace(String prefix) throws PropertyStoreException
-  {
-    String path = getAbsolutePath(prefix);
-
-    try
-    {
-      // if (_zkClient.exists(path))
-      // {
-      _zkClient.deleteRecursive(path);
-      // }
-
-      // update cache
-      // childs are all normalized keys
-      // List<String> childs = getPropertyNames(prefix);
-      // for (String child : childs)
-      // {
-      // _cache.remove(child);
-      // }
-    }
-    catch (ZkNoNodeException e)
-    {
-      // OK
-    }
-    catch (Exception e)
-    {
-      LOG.error("Exception in removeProperty(" + prefix + ")", e);
-      throw (new PropertyStoreException(e.toString()));
-    }
-  }
-
-  // prefix is always normalized
-  private void doGetPropertyNames(String prefix, List<String> leafNodes) throws PropertyStoreException
-  {
-    String path = getAbsolutePath(prefix);
-
-    if (!_zkClient.exists(path))
-    {
-      return;
-    }
-
-    List<String> childs = _zkClient.getChildren(path);
-    if (childs == null)
-    {
-      return;
-    }
-
-    if (childs.size() == 0)
-    {
-      // add leaf node to cache
-      // getProperty(prefix);
-      leafNodes.add(prefix);
-      return;
-    }
-
-    for (String child : childs)
-    {
-      String childPath = prefix.equals("/") ? prefix + child : prefix + "/" + child;
-      doGetPropertyNames(childPath, leafNodes);
-    }
-  }
-
-  @Override
-  public List<String> getPropertyNames(String prefix) throws PropertyStoreException
-  {
-    String normalizedKey = normalizeKey(prefix);
-    List<String> propertyNames = new ArrayList<String>();
-    doGetPropertyNames(normalizedKey, propertyNames);
-
-    // sort it to get deterministic order
-    if (propertyNames.size() > 1)
-    {
-      Collections.sort(propertyNames);
-    }
-
-    return propertyNames;
-  }
-
-  @Override
-  public void setPropertyDelimiter(String delimiter) throws PropertyStoreException
-  {
-    throw new PropertyStoreException("setPropertyDelimiter() not implemented for ZKPropertyStore");
-  }
-
-  // put data/child listeners on prefix and all childs
-  @Override
-  public void subscribeForPropertyChange(String prefix,
-                                         final PropertyChangeListener<T> listener) throws PropertyStoreException
-  {
-    if (listener == null)
-    {
-      throw new IllegalArgumentException("listener can't be null. Prefix: " + prefix);
-    }
-
-    String path = getAbsolutePath(prefix);
-
-    ZkCallbackHandler<T> callback = null;
-    synchronized (_callbackMap)
-    {
-      Map<PropertyChangeListener<T>, ZkCallbackHandler<T>> callbacks;
-      if (!_callbackMap.containsKey(path))
-      {
-        _callbackMap.put(path,
-                         new HashMap<PropertyChangeListener<T>, ZkCallbackHandler<T>>());
-      }
-      callbacks = _callbackMap.get(path);
-
-      if (!callbacks.containsKey(listener))
-      {
-        callback = new ZkCallbackHandler<T>(_zkClient, this, prefix, listener);
-        callbacks.put(listener, callback);
-      }
-    }
-
-    try
-    {
-      if (callback != null)
-      {
-        // a newly added callback
-        _zkClient.subscribeDataChanges(path, callback);
-        _zkClient.subscribeChildChanges(path, callback);
-
-        // do initial invocation
-        callback.handleChildChange(path, _zkClient.getChildren(path));
-
-        LOG.debug("Subscribed changes for " + path);
-      }
-    }
-    catch (Exception e)
-    {
-      LOG.error("Exception in subscribeForPropertyChange(" + prefix + ")", e);
-      throw (new PropertyStoreException(e.toString()));
-    }
-  }
-
-  // prefix is always a normalized key
-  private void doUnsubscribeForPropertyChange(String prefix, ZkCallbackHandler<T> callback)
-  {
-    String path = getAbsolutePath(prefix);
-
-    _zkClient.unsubscribeDataChanges(path, callback);
-    _zkClient.unsubscribeChildChanges(path, callback);
-
-    List<String> childs = _zkClient.getChildren(path);
-    if (childs == null || childs.size() == 0)
-    {
-      return;
-    }
-
-    for (String child : childs)
-    {
-      doUnsubscribeForPropertyChange(prefix + "/" + child, callback);
-    }
-  }
-
-  @Override
-  public void unsubscribeForPropertyChange(String prefix,
-                                           PropertyChangeListener<T> listener) throws PropertyStoreException
-  {
-    if (listener == null)
-    {
-      throw new IllegalArgumentException("listener can't be null. Prefix: " + prefix);
-    }
-
-    String path = getAbsolutePath(prefix);
-    ZkCallbackHandler<T> callback = null;
-
-    synchronized (_callbackMap)
-    {
-      if (_callbackMap.containsKey(path))
-      {
-        Map<PropertyChangeListener<T>, ZkCallbackHandler<T>> callbacks =
-            _callbackMap.get(path);
-        callback = callbacks.remove(listener);
-
-        if (callbacks == null || callbacks.isEmpty())
-        {
-          _callbackMap.remove(path);
-        }
-      }
-    }
-
-    if (callback != null)
-    {
-      doUnsubscribeForPropertyChange(prefix, callback);
-      LOG.debug("Unsubscribed changes for " + path);
-    }
-  }
-
-  @Override
-  public boolean canParentStoreData()
-  {
-    return false;
-  }
-
-  @Override
-  public void setPropertySerializer(final PropertySerializer<T> serializer)
-  {
-    if (serializer == null)
-    {
-      throw new IllegalArgumentException("serializer can't be null");
-    }
-
-    _serializer = serializer;
-  }
-
-  @Override
-  public void updatePropertyUntilSucceed(String key, DataUpdater<T> updater) throws PropertyStoreException
-  {
-    updatePropertyUntilSucceed(key, updater, true);
-  }
-
-  @Override
-  public void updatePropertyUntilSucceed(String key,
-                                         DataUpdater<T> updater,
-                                         boolean createIfAbsent) throws PropertyStoreException
-  {
-    String path = getAbsolutePath(key);
-    try
-    {
-      if (!_zkClient.exists(path))
-      {
-        if (!createIfAbsent)
-        {
-          throw new PropertyStoreException("Can't update " + key
-              + " since no node exists");
-        }
-        else
-        {
-          _zkClient.createPersistent(path, true);
-        }
-      }
-
-      _zkClient.updateDataSerialized(path, new ByteArrayUpdater(updater, _serializer));
-    }
-    catch (Exception e)
-    {
-      LOG.error("Exception in updatePropertyUntilSucceed(" + key + ", " + createIfAbsent
-          + ")", e);
-      throw (new PropertyStoreException(e.toString()));
-    }
-
-    // update cache
-    // getProperty(key);
-  }
-
-  @Override
-  public boolean compareAndSet(String key, T expected, T update, Comparator<T> comparator)
-  {
-    return compareAndSet(key, expected, update, comparator, true);
-  }
-
-  @Override
-  public boolean compareAndSet(String key,
-                               T expected,
-                               T update,
-                               Comparator<T> comparator,
-                               boolean createIfAbsent)
-  {
-    String path = getAbsolutePath(key);
-
-    // if two threads call with createIfAbsent=true
-    // one thread creates the node, the other just goes through
-    // when wirteData() one thread writes the other gets ZkBadVersionException
-    if (!_zkClient.exists(path))
-    {
-      if (createIfAbsent)
-      {
-        _zkClient.createPersistent(path, true);
-      }
-      else
-      {
-        return false;
-      }
-    }
-
-    try
-    {
-      Stat stat = new Stat();
-      byte[] currentBytes = _zkClient.readDataAndStat(path, stat, true);
-      T current = null;
-      if (currentBytes != null)
-      {
-        current = _serializer.deserialize(currentBytes);
-      }
-
-      if (comparator.compare(current, expected) == 0)
-      {
-        byte[] valueBytes = _serializer.serialize(update);
-        _zkClient.writeData(path, valueBytes, stat.getVersion());
-
-        // update cache
-        // getProperty(key);
-
-        return true;
-      }
-    }
-    catch (ZkBadVersionException e)
-    {
-      LOG.warn("Get BadVersion when writing to zookeeper. Mostly Ignorable due to contention");
-    }
-    catch (Exception e)
-    {
-      LOG.error("Exception when compareAndSet(" + key + ")", e);
-    }
-
-    return false;
-  }
-
-  @Override
-  public boolean exists(String key)
-  {
-    String path = getAbsolutePath(key);
-    return _zkClient.exists(path);
-  }
-
-  @Override
-  public void handleStateChanged(KeeperState state) throws Exception
-  {
-    LOG.info("KeeperState:" + state);
-    switch (state)
-    {
-    case SyncConnected:
-      _isConnected = true;
-      break;
-    case Disconnected:
-      _isConnected = false;
-      break;
-    case Expired:
-      _isConnected = false;
-      _hasSessionExpired = true;
-      break;
-    }
-  }
-
-  @Override
-  public void handleNewSession() throws Exception
-  {
-    ZkConnection connection = ((ZkConnection) _zkClient.getConnection());
-    ZooKeeper zookeeper = connection.getZookeeper();
-    LOG.info("handleNewSession: " + zookeeper.getSessionId());
-
-    synchronized (_callbackMap)
-    {
-      for (String path : _callbackMap.keySet())
-      {
-        Map<PropertyChangeListener<T>, ZkCallbackHandler<T>> callbacks =
-            _callbackMap.get(path);
-        if (callbacks == null || callbacks.size() == 0)
-        {
-          LOG.error("Get a null callback map. Remove it. Path: " + path);
-          _callbackMap.remove(path);
-          continue;
-        }
-
-        for (PropertyChangeListener<T> listener : callbacks.keySet())
-        {
-          ZkCallbackHandler<T> callback = callbacks.get(listener);
-
-          if (callback == null)
-          {
-            LOG.error("Get a null callback. Remove it. Path: " + path + ", listener: "
-                + listener);
-            callbacks.remove(listener);
-            continue;
-          }
-          _zkClient.subscribeDataChanges(path, callback);
-          _zkClient.subscribeChildChanges(path, callback);
-
-          // do initial invocation
-          callback.handleChildChange(path, _zkClient.getChildren(path));
-        }
-      }
-    }
-  }
-
-  @Override
-  public boolean start()
-  {
-    // TODO Auto-generated method stub
-    return false;
-  }
-
-  @Override
-  public boolean stop()
-  {
-    _zkClient.close();
-    return true;
-  }
-
-  @Override
-  public void handleDataChange(String dataPath, Object data) throws Exception
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void handleDataDeleted(String dataPath) throws Exception
-  {
-    // TODO Auto-generated method stub
-    String key = getRelativePath(dataPath);
-    synchronized (_cache)
-    {
-      _zkClient.unsubscribeDataChanges(dataPath, this);
-      _cache.remove(key);
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/store/zk/ZkCallbackHandler.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/store/zk/ZkCallbackHandler.java b/helix-core/src/main/java/org/apache/helix/store/zk/ZkCallbackHandler.java
deleted file mode 100644
index f9121aa..0000000
--- a/helix-core/src/main/java/org/apache/helix/store/zk/ZkCallbackHandler.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.apache.helix.store.zk;
-
-/*
- * 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.
- */
-
-import java.util.List;
-
-import org.I0Itec.zkclient.IZkChildListener;
-import org.I0Itec.zkclient.IZkDataListener;
-import org.apache.helix.manager.zk.ZkClient;
-import org.apache.helix.store.PropertyChangeListener;
-import org.apache.log4j.Logger;
-
-
-class ZkCallbackHandler<T> implements IZkChildListener, IZkDataListener
-{
-  private static Logger LOG = Logger.getLogger(ZkCallbackHandler.class);
-
-  private final ZkClient _zkClient;
-  private final ZKPropertyStore<T> _store;
-
-  // listen on prefix and all its childs
-  private final String _prefix;
-  private final PropertyChangeListener<T> _listener;
-
-  public ZkCallbackHandler(ZkClient client, ZKPropertyStore<T> store, String prefix,
-                           PropertyChangeListener<T> listener)
-  {
-    _zkClient = client;
-    _store = store;
-    _prefix = prefix;
-    _listener = listener;
-  }
-
-  @Override
-  public void handleDataChange(String path, Object data) throws Exception
-  {
-    LOG.debug("Data changed @ " + path + " to " + data);
-    String key = _store.getRelativePath(path);
-    _listener.onPropertyChange(key);
-  }
-
-  @Override
-  public void handleDataDeleted(String dataPath) throws Exception
-  {
-    LOG.debug("Data deleted @ " + dataPath);
-  }
-
-  @Override
-  public void handleChildChange(String path, List<String> currentChilds) throws Exception
-  {
-    LOG.debug("childs changed @ " + path + " to " + currentChilds);
-    // System.out.println("childs changed @ " + path + " to " + currentChilds);
-
-
-    if (currentChilds == null)
-    {
-      /**
-       * When a node with a child change watcher is deleted
-       * a child change is triggered on the deleted node
-       * and in this case, the currentChilds is null
-       */
-      return;
-//    } else if (currentChilds.size() == 0)
-//    {
-//      String key = _store.getRelativePath(path);
-//      _listener.onPropertyChange(key);
-    }
-    else
-    {
-      String key = _store.getRelativePath(path);
-      _listener.onPropertyChange(key);
-
-      for (String child : currentChilds)
-      {
-        String childPath = path.endsWith("/") ? path + child : path + "/" + child;
-        _zkClient.subscribeDataChanges(childPath, this);
-        _zkClient.subscribeChildChanges(childPath, this);
-
-        // recursive call
-        handleChildChange(childPath, _zkClient.getChildren(childPath));
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/tools/IdealStateCalculatorByRush.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/tools/IdealStateCalculatorByRush.java b/helix-core/src/main/java/org/apache/helix/tools/IdealStateCalculatorByRush.java
index a1e02e2..3e6ee2c 100644
--- a/helix-core/src/main/java/org/apache/helix/tools/IdealStateCalculatorByRush.java
+++ b/helix-core/src/main/java/org/apache/helix/tools/IdealStateCalculatorByRush.java
@@ -119,7 +119,7 @@ public class IdealStateCalculatorByRush
       ArrayList<HashMap> partitionAssignmentResult = rushHash
           .findNode(i);
       List<String> nodeNames = new ArrayList<String>();
-      for (HashMap p : partitionAssignmentResult)
+      for (HashMap<?, ?> p : partitionAssignmentResult)
       {
         for (Object key : p.keySet())
         {

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/main/java/org/apache/helix/tools/RUSHrHash.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/tools/RUSHrHash.java b/helix-core/src/main/java/org/apache/helix/tools/RUSHrHash.java
index 8b303f8..da3dd74 100644
--- a/helix-core/src/main/java/org/apache/helix/tools/RUSHrHash.java
+++ b/helix-core/src/main/java/org/apache/helix/tools/RUSHrHash.java
@@ -20,7 +20,6 @@ package org.apache.helix.tools;
  */
 
 import java.util.*;
-import java.util.ArrayList;
 import java.util.zip.CRC32;
 
 public class RUSHrHash
@@ -130,7 +129,7 @@ public class RUSHrHash
     int nodeCt = 0;
     HashMap[] nodeData = null;
     ArrayList<HashMap> tempNodes = new ArrayList<HashMap>();
-    HashMap subCluster = null, clusterData = null;
+    HashMap<String, Object> subCluster = null, clusterData = null;
     Integer clusterDataList[] = null;
     for (int i = 0; i < totalClusters; i++)
     {

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/test/java/org/apache/helix/Mocks.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/Mocks.java b/helix-core/src/test/java/org/apache/helix/Mocks.java
index 330554a..e961ef6 100644
--- a/helix-core/src/test/java/org/apache/helix/Mocks.java
+++ b/helix-core/src/test/java/org/apache/helix/Mocks.java
@@ -37,7 +37,6 @@ import org.apache.helix.ConfigChangeListener;
 import org.apache.helix.ControllerChangeListener;
 import org.apache.helix.Criteria;
 import org.apache.helix.CurrentStateChangeListener;
-import org.apache.helix.DataAccessor;
 import org.apache.helix.ExternalViewChangeListener;
 import org.apache.helix.HealthStateChangeListener;
 import org.apache.helix.HelixAdmin;
@@ -65,7 +64,6 @@ import org.apache.helix.participant.StateMachineEngine;
 import org.apache.helix.participant.statemachine.StateModel;
 import org.apache.helix.participant.statemachine.StateModelInfo;
 import org.apache.helix.participant.statemachine.Transition;
-import org.apache.helix.store.PropertyStore;
 import org.apache.helix.store.zk.ZkHelixPropertyStore;
 import org.apache.zookeeper.data.Stat;
 
@@ -346,11 +344,6 @@ public class Mocks {
 		}
 
 		@Override
-		public DataAccessor getDataAccessor() {
-			return null;
-		}
-
-		@Override
 		public String getClusterName() {
 			return _clusterName;
 		}
@@ -419,12 +412,6 @@ public class Mocks {
 		}
 
 		@Override
-		public PropertyStore<ZNRecord> getPropertyStore() {
-			// TODO Auto-generated method stub
-			return null;
-		}
-
-		@Override
 		public String getVersion() {
 			return _version;
 		}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/test/java/org/apache/helix/TestHelper.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/TestHelper.java b/helix-core/src/test/java/org/apache/helix/TestHelper.java
index 6ae7375..9670072 100644
--- a/helix-core/src/test/java/org/apache/helix/TestHelper.java
+++ b/helix-core/src/test/java/org/apache/helix/TestHelper.java
@@ -44,14 +44,6 @@ import org.I0Itec.zkclient.IDefaultNameSpace;
 import org.I0Itec.zkclient.ZkServer;
 import org.I0Itec.zkclient.exception.ZkNoNodeException;
 import org.apache.commons.io.FileUtils;
-import org.apache.helix.BaseDataAccessor;
-import org.apache.helix.DataAccessor;
-import org.apache.helix.HelixManager;
-import org.apache.helix.HelixManagerFactory;
-import org.apache.helix.InstanceType;
-import org.apache.helix.PropertyPathConfig;
-import org.apache.helix.PropertyType;
-import org.apache.helix.ZNRecord;
 import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.manager.zk.ZKHelixAdmin;
@@ -61,10 +53,10 @@ import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.manager.zk.ZkClient;
 import org.apache.helix.model.CurrentState;
 import org.apache.helix.model.ExternalView;
-import org.apache.helix.model.Message;
-import org.apache.helix.model.StateModelDefinition;
 import org.apache.helix.model.IdealState.IdealStateModeProperty;
+import org.apache.helix.model.Message;
 import org.apache.helix.model.Message.MessageType;
+import org.apache.helix.model.StateModelDefinition;
 import org.apache.helix.model.StateModelDefinition.StateModelDefinitionProperty;
 import org.apache.helix.store.zk.ZNode;
 import org.apache.helix.tools.ClusterSetup;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/test/java/org/apache/helix/controller/stages/DummyClusterManager.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/controller/stages/DummyClusterManager.java b/helix-core/src/test/java/org/apache/helix/controller/stages/DummyClusterManager.java
index e0c9b74..9d035fb 100644
--- a/helix-core/src/test/java/org/apache/helix/controller/stages/DummyClusterManager.java
+++ b/helix-core/src/test/java/org/apache/helix/controller/stages/DummyClusterManager.java
@@ -24,7 +24,6 @@ import org.apache.helix.ConfigAccessor;
 import org.apache.helix.ConfigChangeListener;
 import org.apache.helix.ControllerChangeListener;
 import org.apache.helix.CurrentStateChangeListener;
-import org.apache.helix.DataAccessor;
 import org.apache.helix.ExternalViewChangeListener;
 import org.apache.helix.HealthStateChangeListener;
 import org.apache.helix.HelixAdmin;
@@ -38,7 +37,6 @@ import org.apache.helix.PreConnectCallback;
 import org.apache.helix.ZNRecord;
 import org.apache.helix.healthcheck.ParticipantHealthReportCollector;
 import org.apache.helix.participant.StateMachineEngine;
-import org.apache.helix.store.PropertyStore;
 import org.apache.helix.store.zk.ZkHelixPropertyStore;
 
 public class DummyClusterManager implements HelixManager
@@ -127,12 +125,6 @@ public class DummyClusterManager implements HelixManager
   }
 
   @Override
-  public DataAccessor getDataAccessor()
-  {
-    return null;
-  }
-
-  @Override
   public String getClusterName()
   {
     return _clusterName;
@@ -173,13 +165,6 @@ public class DummyClusterManager implements HelixManager
   }
 
   @Override
-  public PropertyStore<ZNRecord> getPropertyStore()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
   public ClusterMessagingService getMessagingService()
   {
     // TODO Auto-generated method stub

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/test/java/org/apache/helix/integration/TestAddClusterV2.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestAddClusterV2.java b/helix-core/src/test/java/org/apache/helix/integration/TestAddClusterV2.java
index 4a10e78..0a79337 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestAddClusterV2.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestAddClusterV2.java
@@ -25,7 +25,6 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
 
-import org.apache.helix.DataAccessor;
 import org.apache.helix.PropertyType;
 import org.apache.helix.TestHelper;
 import org.apache.helix.TestHelper.StartCMResult;
@@ -209,11 +208,6 @@ public class TestAddClusterV2 extends ZkIntegrationTestBase
     Assert.assertTrue(result);
   }
 
-  protected void pauseController(DataAccessor clusterDataAccessor)
-  {
-    clusterDataAccessor.setProperty(PropertyType.PAUSE, new PauseSignal("pause"));
-  }
-
   protected void setupStorageCluster(ClusterSetup setupTool, String clusterName,
        String dbName, int partitionNr, String prefix, int startPort, String stateModel, int replica, boolean rebalance)
   {

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/test/java/org/apache/helix/integration/TestAutoRebalance.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestAutoRebalance.java b/helix-core/src/test/java/org/apache/helix/integration/TestAutoRebalance.java
index 2b31d1b..53a9f98 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestAutoRebalance.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestAutoRebalance.java
@@ -23,21 +23,17 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.helix.DataAccessor;
 import org.apache.helix.HelixDataAccessor;
-import org.apache.helix.PropertyType;
 import org.apache.helix.TestHelper;
 import org.apache.helix.ZNRecord;
 import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.TestHelper.StartCMResult;
 import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.controller.stages.ClusterDataCache;
-import org.apache.helix.manager.zk.ZKDataAccessor;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZNRecordSerializer;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.manager.zk.ZkClient;
-import org.apache.helix.model.IdealState;
 import org.apache.helix.model.IdealState.IdealStateModeProperty;
 import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterStateVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKDataAccessor.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKDataAccessor.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKDataAccessor.java
deleted file mode 100644
index 38c62a9..0000000
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKDataAccessor.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package org.apache.helix.manager.zk;
-
-/*
- * 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.
- */
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.helix.DataAccessor;
-import org.apache.helix.PropertyPathConfig;
-import org.apache.helix.PropertyType;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.ZkUnitTestBase;
-import org.apache.helix.manager.zk.ZKDataAccessor;
-import org.apache.helix.manager.zk.ZNRecordSerializer;
-import org.apache.helix.manager.zk.ZkClient;
-import org.apache.helix.model.ExternalView;
-import org.apache.helix.model.IdealState;
-import org.apache.helix.model.IdealState.IdealStateModeProperty;
-import org.apache.zookeeper.data.Stat;
-import org.testng.Assert;
-import org.testng.AssertJUnit;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-
-
-public class TestZKDataAccessor extends ZkUnitTestBase
-{
-  private DataAccessor _accessor;
-  private String _clusterName;
-  private final String resource = "resource";
-	private ZkClient _zkClient;
-
-  @Test ()
-  public void testSet()
-  {
-    IdealState idealState = new IdealState(resource);
-    idealState.setNumPartitions(20);
-    idealState.setReplicas(Integer.toString(2));
-    idealState.setStateModelDefRef("StateModel1");
-    idealState.setIdealStateMode(IdealStateModeProperty.AUTO.toString());
-    boolean success = _accessor.setProperty(PropertyType.IDEALSTATES, idealState, resource);
-    AssertJUnit.assertTrue(success);
-    String path = PropertyPathConfig.getPath(PropertyType.IDEALSTATES, _clusterName, resource);
-    AssertJUnit.assertTrue(_zkClient.exists(path));
-    AssertJUnit.assertEquals(idealState.getRecord(), _zkClient.readData(path));
-
-    idealState.setNumPartitions(20);
-    success = _accessor.setProperty(PropertyType.IDEALSTATES, idealState, resource);
-    AssertJUnit.assertTrue(success);
-    AssertJUnit.assertTrue(_zkClient.exists(path));
-    AssertJUnit.assertEquals(idealState.getRecord(), _zkClient.readData(path));
-  }
-
-  @Test ()
-  public void testGet()
-  {
-    String path = PropertyPathConfig.getPath(PropertyType.IDEALSTATES, _clusterName, resource);
-    IdealState idealState = new IdealState(resource);
-    idealState.setIdealStateMode(IdealStateModeProperty.AUTO.toString());
-
-    _zkClient.delete(path);
-    _zkClient.createPersistent(new File(path).getParent(), true);
-    _zkClient.createPersistent(path, idealState.getRecord());
-    IdealState idealStateRead = _accessor.getProperty(IdealState.class, PropertyType.IDEALSTATES, resource);
-    AssertJUnit.assertEquals(idealState.getRecord(), idealStateRead.getRecord());
-  }
-
-  @Test ()
-  public void testRemove()
-  {
-    String path = PropertyPathConfig.getPath(PropertyType.IDEALSTATES, _clusterName, resource);
-    IdealState idealState = new IdealState(resource);
-    idealState.setIdealStateMode(IdealStateModeProperty.AUTO.toString());
-
-    _zkClient.delete(path);
-    _zkClient.createPersistent(new File(path).getParent(), true);
-    _zkClient.createPersistent(path, idealState.getRecord());
-    boolean success = _accessor.removeProperty(PropertyType.IDEALSTATES, resource);
-    AssertJUnit.assertTrue(success);
-    AssertJUnit.assertFalse(_zkClient.exists(path));
-    IdealState idealStateRead = _accessor.getProperty(IdealState.class, PropertyType.IDEALSTATES, resource);
-    AssertJUnit.assertNull(idealStateRead);
-
-  }
-
-  @Test ()
-  public void testUpdate()
-  {
-    String path = PropertyPathConfig.getPath(PropertyType.IDEALSTATES, _clusterName, resource);
-    IdealState idealState = new IdealState(resource);
-    idealState.setIdealStateMode(IdealStateModeProperty.AUTO.toString());
-
-    _zkClient.delete(path);
-    _zkClient.createPersistent(new File(path).getParent(), true);
-    _zkClient.createPersistent(path, idealState.getRecord());
-    Stat stat = _zkClient.getStat(path);
-
-    idealState.setIdealStateMode(IdealStateModeProperty.CUSTOMIZED.toString());
-
-    boolean success = _accessor.updateProperty(PropertyType.IDEALSTATES, idealState, resource);
-    AssertJUnit.assertTrue(success);
-    AssertJUnit.assertTrue(_zkClient.exists(path));
-    ZNRecord value = _zkClient.readData(path);
-    AssertJUnit.assertEquals(idealState.getRecord(), value);
-    Stat newstat = _zkClient.getStat(path);
-
-    AssertJUnit.assertEquals(stat.getCtime(), newstat.getCtime());
-    AssertJUnit.assertNotSame(stat.getMtime(), newstat.getMtime());
-    AssertJUnit.assertTrue(stat.getMtime() < newstat.getMtime());
-  }
-
-  @Test ()
-  public void testGetChildValues()
-  {
-    List<ExternalView> list = _accessor.getChildValues(ExternalView.class, PropertyType.EXTERNALVIEW, _clusterName);
-    AssertJUnit.assertEquals(0, list.size());
-  }
-
-  @Test
-  public void testBackToBackRemoveAndSet()
-  {
-    // CONFIG is cached
-    _accessor.setProperty(PropertyType.CONFIGS, new ZNRecord("id1"), "config1");
-    ZNRecord record = _accessor.getProperty(PropertyType.CONFIGS, "config1");
-    // System.out.println(record.getId());
-    Assert.assertEquals(record.getId(), "id1");
-    String path = PropertyPathConfig.getPath(PropertyType.CONFIGS, _clusterName, "config1");
-    _zkClient.delete(path);
-    _zkClient.createPersistent(path, new ZNRecord("id1-new"));
-    record = _accessor.getProperty(PropertyType.CONFIGS, "config1");
-    // System.out.println(record.getId());
-    Assert.assertEquals(record.getId(), "id1-new", "Should update cache since creation time is changed.");
-  }
-
-  @BeforeClass
-  public void beforeClass() throws IOException, Exception
-  {
-    _clusterName = CLUSTER_PREFIX + "_" + getShortClassName();
-
-		System.out.println("START TestZKDataAccessor at " + new Date(System.currentTimeMillis()));
-		_zkClient = new ZkClient(ZK_ADDR);
-		_zkClient.setZkSerializer(new ZNRecordSerializer());
-
-    if (_zkClient.exists("/" + _clusterName))
-    {
-      _zkClient.deleteRecursive("/" + _clusterName);
-    }
-    _accessor = new ZKDataAccessor(_clusterName, _zkClient);
-  }
-
-  @AfterClass
-  public void afterClass()
-  {
-		_zkClient.close();
-		System.out.println("END TestZKDataAccessor at " + new Date(System.currentTimeMillis()));
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKDataAccessorCache.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKDataAccessorCache.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKDataAccessorCache.java
deleted file mode 100644
index 7a819a0..0000000
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKDataAccessorCache.java
+++ /dev/null
@@ -1,156 +0,0 @@
-package org.apache.helix.manager.zk;
-
-/*
- * 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.
- */
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.helix.PropertyPathConfig;
-import org.apache.helix.PropertyType;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.ZkUnitTestBase;
-import org.apache.helix.ConfigScope.ConfigScopeProperty;
-import org.apache.helix.manager.zk.ZKDataAccessor;
-import org.apache.helix.manager.zk.ZNRecordSerializer;
-import org.apache.helix.manager.zk.ZkClient;
-import org.apache.log4j.Logger;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-
-public class TestZKDataAccessorCache extends ZkUnitTestBase
-{
-  private static Logger LOG = Logger.getLogger(TestZKDataAccessorCache.class);
-  private ZKDataAccessor _accessor;
-  private String _clusterName;
-  private ZkClient _zkClient;
-
-  @BeforeClass
-  public void beforeClass() throws IOException, Exception
-  {
-    _clusterName = CLUSTER_PREFIX + "_" + getShortClassName();
-
-    System.out.println("START TestZKCacheDataAccessor at " + new Date(System.currentTimeMillis()));
-    _zkClient = new ZkClient(ZK_ADDR);
-    _zkClient.setZkSerializer(new ZNRecordSerializer());
-
-    if (_zkClient.exists("/" + _clusterName))
-    {
-      _zkClient.deleteRecursive("/" + _clusterName);
-    }
-    _zkClient.createPersistent(
-        PropertyPathConfig.getPath(PropertyType.CONFIGS, _clusterName,
-            ConfigScopeProperty.CLUSTER.toString(), _clusterName), true);
-    _zkClient.createPersistent(
-        PropertyPathConfig.getPath(PropertyType.CONFIGS, _clusterName,
-        ConfigScopeProperty.PARTICIPANT.toString()), true);
-    _zkClient.createPersistent(
-        PropertyPathConfig.getPath(PropertyType.CONFIGS, _clusterName,
-            ConfigScopeProperty.RESOURCE.toString()), true);
-    _zkClient.createPersistent(PropertyPathConfig.getPath(PropertyType.IDEALSTATES, _clusterName),
-        true);
-    _zkClient.createPersistent(PropertyPathConfig.getPath(PropertyType.EXTERNALVIEW, _clusterName),
-        true);
-    _zkClient.createPersistent(
-        PropertyPathConfig.getPath(PropertyType.LIVEINSTANCES, _clusterName), true);
-    _zkClient.createPersistent(
-        PropertyPathConfig.getPath(PropertyType.STATEMODELDEFS, _clusterName), true);
-    _zkClient.createPersistent(PropertyPathConfig.getPath(PropertyType.CURRENTSTATES, _clusterName,
-        "localhost_12918", "123456"), true);
-
-    _accessor = new ZKDataAccessor(_clusterName, _zkClient);
-  }
-
-  @AfterClass
-  public void afterClass()
-  {
-    _zkClient.close();
-    System.out.println("END TestZKCacheDataAccessor at " + new Date(System.currentTimeMillis()));
-  }
-
-  @Test
-  public void testAccessorCache()
-  {
-    testAccessorCache(PropertyType.IDEALSTATES);
-    testAccessorCache(PropertyType.STATEMODELDEFS);
-    testAccessorCache(PropertyType.LIVEINSTANCES);
-    testAccessorCache(PropertyType.CONFIGS, ConfigScopeProperty.PARTICIPANT.toString());
-    testAccessorCache(PropertyType.EXTERNALVIEW);
-    testAccessorCache(PropertyType.CURRENTSTATES, "localhost_12918", "123456");
-  }
-
-  private void testAccessorCache(PropertyType type, String... keys)
-  {
-    String parentPath = PropertyPathConfig.getPath(type, _clusterName, keys);
-    _zkClient.createPersistent(parentPath + "/child1", new ZNRecord("child1"));
-    ZNRecord record2 = new ZNRecord("child2");
-    _zkClient.createPersistent(parentPath + "/child2", record2);
-
-    List<ZNRecord> records = _accessor.getChildValues(type, keys);
-    LOG.debug("records:" + records);
-    Assert.assertNotNull(getRecord(records, "child1"));
-    Assert.assertNotNull(getRecord(records, "child2"));
-
-    // no data change
-    List<ZNRecord> newRecords = _accessor.getChildValues(type, keys);
-    LOG.debug("new records:" + newRecords);
-    Assert.assertEquals(getRecord(newRecords, "child1"), getRecord(records, "child1"));
-
-    // change value of an existing znode
-    record2.setSimpleField("key1", "value1");
-    _zkClient.writeData(parentPath + "/child2", record2);
-    newRecords = _accessor.getChildValues(type, keys);
-    LOG.debug("new records:" + newRecords);
-    Assert.assertEquals(getRecord(newRecords, "child2").getSimpleField("key1"), "value1");
-    Assert.assertNotSame(getRecord(newRecords, "child2"), getRecord(records, "child2"));
-
-    // add a new child
-    _zkClient.createPersistent(parentPath + "/child3", new ZNRecord("child3"));
-    records = newRecords;
-    newRecords = _accessor.getChildValues(type, keys);
-    LOG.debug("new records:" + newRecords);
-    Assert.assertNull(getRecord(records, "child3"));
-    Assert.assertNotNull(getRecord(newRecords, "child3"));
-
-    // delete a child
-    _zkClient.delete(parentPath + "/child2");
-    records = newRecords;
-    newRecords = _accessor.getChildValues(type, keys);
-    LOG.debug("new records:" + newRecords);
-    Assert.assertNotNull(getRecord(records, "child2"));
-    Assert.assertNull(getRecord(newRecords, "child2"),
-        "Should be null, since child2 has been deleted");
-  }
-
-  private ZNRecord getRecord(List<ZNRecord> list, String id)
-  {
-    for (ZNRecord record : list)
-    {
-      if (record.getId().equals(id))
-      {
-        return record;
-      }
-    }
-    return null;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkClusterManager.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkClusterManager.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkClusterManager.java
index b00d5f4..ca5e6cf 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkClusterManager.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkClusterManager.java
@@ -33,7 +33,8 @@ import org.apache.helix.ZNRecord;
 import org.apache.helix.ZkUnitTestBase;
 import org.apache.helix.manager.MockListener;
 import org.apache.helix.manager.zk.ZKHelixManager;
-import org.apache.helix.store.PropertyStore;
+import org.apache.helix.store.zk.ZkHelixPropertyStore;
+import org.apache.zookeeper.data.Stat;
 import org.testng.Assert;
 import org.testng.AssertJUnit;
 import org.testng.annotations.Test;
@@ -90,10 +91,12 @@ public class TestZkClusterManager extends ZkUnitTestBase
     AssertJUnit.assertTrue(listener.isControllerChangeListenerInvoked);
     controller.removeListener(listener);
 
-    PropertyStore<ZNRecord> store = controller.getPropertyStore();
+    ZkHelixPropertyStore<ZNRecord> store = controller.getHelixPropertyStore();
     ZNRecord record = new ZNRecord("node_1");
-    store.setProperty("node_1", record);
-    record = store.getProperty("node_1");
+    int options = 0;
+    store.set("node_1", record, options);
+    Stat stat = new Stat();
+    record = store.get("node_1",stat, options);
     AssertJUnit.assertEquals("node_1", record.getId());
 
     controller.getMessagingService();

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/a243018a/helix-core/src/test/java/org/apache/helix/messaging/TestDefaultMessagingService.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/messaging/TestDefaultMessagingService.java b/helix-core/src/test/java/org/apache/helix/messaging/TestDefaultMessagingService.java
index e2c5593..a2a609f 100644
--- a/helix-core/src/test/java/org/apache/helix/messaging/TestDefaultMessagingService.java
+++ b/helix-core/src/test/java/org/apache/helix/messaging/TestDefaultMessagingService.java
@@ -21,11 +21,9 @@ package org.apache.helix.messaging;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Map;
 import java.util.UUID;
 
 import org.apache.helix.Criteria;
-import org.apache.helix.DataAccessor;
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.HelixManager;
 import org.apache.helix.HelixProperty;
@@ -33,19 +31,14 @@ import org.apache.helix.InstanceType;
 import org.apache.helix.Mocks;
 import org.apache.helix.NotificationContext;
 import org.apache.helix.PropertyKey;
-import org.apache.helix.PropertyPathConfig;
 import org.apache.helix.PropertyType;
 import org.apache.helix.ZNRecord;
-import org.apache.helix.messaging.DefaultMessagingService;
 import org.apache.helix.messaging.handling.HelixTaskResult;
 import org.apache.helix.messaging.handling.MessageHandler;
 import org.apache.helix.messaging.handling.MessageHandlerFactory;
-import org.apache.helix.messaging.handling.MessageHandler.ErrorCode;
-import org.apache.helix.messaging.handling.MessageHandler.ErrorType;
 import org.apache.helix.model.ExternalView;
-import org.apache.helix.model.LiveInstance;
-import org.apache.helix.model.Message;
 import org.apache.helix.model.LiveInstance.LiveInstanceProperty;
+import org.apache.helix.model.Message;
 import org.apache.helix.tools.IdealStateCalculatorForStorageNode;
 import org.testng.AssertJUnit;
 import org.testng.annotations.Test;


Mime
View raw message