helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kisho...@apache.org
Subject git commit: [HELIX-85] [RB:13628] Removing mockservice module
Date Sat, 17 Aug 2013 19:36:37 GMT
Updated Branches:
  refs/heads/master bdc3b4405 -> f904a6883


[HELIX-85] [RB:13628] Removing mockservice module


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

Branch: refs/heads/master
Commit: f904a6883f6b615e05dd178e6498fa83a0df5bfa
Parents: bdc3b44
Author: Kishore Gopalakrishna <g.kishore@gmail.com>
Authored: Sat Aug 17 10:29:49 2013 -0700
Committer: Kishore Gopalakrishna <g.kishore@gmail.com>
Committed: Sat Aug 17 10:29:49 2013 -0700

----------------------------------------------------------------------
 mockservice/integration-test/mock.test          | 316 -------------------
 .../integration-test/nonexistent-get.test       |  28 --
 mockservice/integration-test/simple-get.test    |  28 --
 mockservice/integration-test/simple-post.test   |  29 --
 mockservice/integration-test/stop-service.test  |  24 --
 mockservice/pom.xml                             |  68 ----
 mockservice/src/main/config/log4j.properties    |  31 --
 .../main/java/org/apache/helix/CMConnector.java |  41 ---
 .../java/org/apache/helix/EspressoResource.java | 216 -------------
 .../apache/helix/EspressoStorageMockNode.java   | 195 ------------
 .../EspressoStorageMockStateModelFactory.java   | 101 ------
 .../java/org/apache/helix/FnvHashFunction.java  | 203 ------------
 .../java/org/apache/helix/HashFunction.java     |  65 ----
 .../org/apache/helix/MockEspressoService.java   | 271 ----------------
 .../main/java/org/apache/helix/MockNode.java    |  34 --
 .../java/org/apache/helix/MockNodeFactory.java  |  39 ---
 .../main/java/org/apache/helix/MockRunner.java  |  60 ----
 .../org/apache/helix/StopServiceResource.java   | 143 ---------
 mockservice/src/test/conf/testng.xml            |  27 --
 .../src/test/java/org/apache/helix/AppTest.java |  45 ---
 pom.xml                                         |   1 -
 21 files changed, 1965 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/integration-test/mock.test
----------------------------------------------------------------------
diff --git a/mockservice/integration-test/mock.test b/mockservice/integration-test/mock.test
deleted file mode 100755
index 6c7b18f..0000000
--- a/mockservice/integration-test/mock.test
+++ /dev/null
@@ -1,316 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-CLUSTER_NAME=TestCluster
-
-#change these when using a different zookeeper
-ZKUSER=express2
-ZKPORT=2181
-ZKADDRESS=$ZKUSER-md:$ZKPORT
-START_ZOOKEEPER=/home/$ZKUSER/workspace/zookeeper-3.3.3/bin/zkServer.sh
-
-BASE_DIR=/home/express1/workspace/cluster-manager-0.4.0/cluster-manager-core/target/cluster-manager-core-pkg/bin
-CLUSTER_ADMIN=$BASE_DIR/cluster-admin
-RUN_CLUSTER_MANAGER=$BASE_DIR/run-cluster-manager
-
-USERS=(express1 express2 express3 express4 express5)
-NODES=(express1-md express2-md express3-md express4-md express5-md)
-START_PORT=16918
-PORT_NR=20
-RESOURCE_GROUP=TestDB
-PARTITION_NR=128
-STATE_MODEL_DEF=MasterSlave
-REPLICA=3
-
-BASE_MOCK_DIR=/home/EXPRESS_USER/workspace/cluster-manager-0.4.0/mockservice/target/mockservice-pkg/bin
-RUN_MOCK_SERVICE_TEMPLATE=$BASE_MOCK_DIR/run-mock-espresso-service
-
-: <<'END'
-echo -e "zookeeper address:\t\t$ZKADDRESS"
-echo -e "cluster-admin command:\t\t$CLUSTER_ADMIN"
-echo -e "run-cluster-manager command:\t$RUN_CLUSTER_MANAGER"
-echo -e "run-mock-service template:\t$RUN_MOCK_SERVICE_TEMPLATE"
-echo -e "\v"
-END
-
-red='\e[00;31m'
-green='\e[00;32m'
-
-#colorful echo
-function cecho
-{
-  message="$1"
-  if [ -n "$message" ]; then
-    color="$2"
-    if [ -z "$color" ]; then
-      echo "$message"
-    else
-      echo -e "$color$message\e[00m"
-    fi
-  fi
-}
-
-#clean zookeeper data log and then start zookeeper server
-function startZookeeper
-{
-  cecho ">>Start zookeeper on $ZKUSER-md:$ZKPORT" $green
-  ZK_LOG_DIR=/home/$ZKUSER/workspace/zookeeper-log/$ZKPORT
-  ssh $ZKUSER@$ZKUSER-md rm -rf $ZK_LOG_DIR
-  ssh $ZKUSER@$ZKUSER-md mkdir -p $ZK_LOG_DIR/data
-  ssh $ZKUSER@$ZKUSER-md $START_ZOOKEEPER start > /dev/null 2>&1 &
-  sleep 1
-  ps aux | grep $START_ZOOKEEPER | grep -v "grep" | awk '{print$2}' | xargs kill
-}
-
-function stopZookeeper
-{
-  cecho ">>Stop zookeeper on $ZKUSER-md:$ZKPORT" $green
-  ssh $ZKUSER@$ZKUSER-md $START_ZOOKEEPER stop > /dev/null
-#  pid=`ssh $ZKUSER@$ZKUSER-md ps aux | grep QuorumPeerMain | awk '{print $2}'`
-#  if [ -z "$pid" ]; then
-#    cecho "FAIL to kill zookeeper server on $ZKUSER@$ZKUSER-md" $red
-#  else
-#    echo "Killing zookeeper server $pid on $ZKUSER@$ZKUSER-md"
-#    ssh $ZKUSER@$ZKUSER-md kill -9 $pid
-#  fi
-  sleep 1
-}
-
-#setup cluster
-function setupCluster
-{
-  #: <<'END'
-  cecho ">>Setup cluster" $green
-  echo -e "Adding cluster:\t\t$CLUSTER_NAME"
-  ssh express1@express1-md chmod +x $CLUSTER_ADMIN
-  ssh express1@express1-md $CLUSTER_ADMIN --zkSvr $ZKADDRESS --addCluster $CLUSTER_NAME
-  for node in ${NODES[*]}
-  do
-    for port in ${PORTS[*]}
-    do
-      echo -e "Adding node:\t\t$node:$port"
-      ssh express1@express1-md $CLUSTER_ADMIN --zkSvr $ZKADDRESS --addNode $CLUSTER_NAME $node:$port
-    done
-  done
-
-  echo -e "Adding resource:\t$RESOURCE_GROUP $PARTITION_NR $STATE_MODEL_DEF"
-  ssh express1@express1-md $CLUSTER_ADMIN --zkSvr $ZKADDRESS --addResourceGroup $CLUSTER_NAME $RESOURCE_GROUP $PARTITION_NR $STATE_MODEL_DEF
-
-  echo -e "Rebalancing resource:\t$RESOURCE_GROUP $REPLICA"
-  ssh express1@express1-md $CLUSTER_ADMIN --zkSvr $ZKADDRESS --rebalance $CLUSTER_NAME $RESOURCE_GROUP $REPLICA
-  #END
-}
-
-#start cluster controller and then start all participants
-function startNodes
-{
-  cecho ">>Start nodes" $green
-  #: <<'END'
-  ssh express1@express1-md chmod +x $RUN_CLUSTER_MANAGER
-  pid=`ssh express1@express1-md ps aux | grep ClusterManagerMain | grep $CLUSTER_NAME | awk '{print $2}'`
-  if [ -z "$pid" ]; then
-    echo "Starting controller on $CLUSTER_NAME"
-    ssh express1@express1-md $RUN_CLUSTER_MANAGER --zkSvr $ZKADDRESS --cluster $CLUSTER_NAME > /dev/null 2>&1 &
-    sleep 1
-    ps aux | grep $RUN_CLUSTER_MANAGER | grep $CLUSTER_NAME | grep -v "grep" | awk '{print$2}' | xargs kill
-  else
-    cecho "FAIL to start controller on $CLUSTER_NAME, since it's already running" $red
-  fi
-  #END
-
-  #start participants on all {node:port}'s
-  #: <<'END'
-  NODE_NR=${#NODES[@]}
-  for (( i=0; i<${NODE_NR}; i++ ))
-  do
-    node=${NODES[$i]}
-    user=${USERS[$i]}
-
-    RUN_MOCK_SERVICE=${RUN_MOCK_SERVICE_TEMPLATE/EXPRESS_USER/$user}
-    echo -e "run-mock-service command:\t$RUN_MOCK_SERVICE"
-    ssh $user@$node chmod +x $RUN_MOCK_SERVICE
-
-    for port in ${PORTS[*]}
-    do
-      pid=`ssh $user@$node ps aux | grep MockEspressoService | grep $CLUSTER_NAME | grep $node:$port | awk '{print $2}'`
-      if [ -z "$pid" ]; then
-        echo -e "Starting participant:\t$node:$port on $CLUSTER_NAME"
-        ssh $user@$node $RUN_MOCK_SERVICE --port $port -zkSvr $ZKADDRESS -clusterName $CLUSTER_NAME -instanceName $node:$port </dev/null >/dev/null 2>&1 &
-        sleep 1
-        pid=`ps aux | grep $RUN_MOCK_SERVICE | grep $CLUSTER_NAME | grep $node:$port | grep -v "grep" | awk '{print$2}'`
-        if [ -n "$pid" ]; then
-          kill $pid
-        fi
-
-        #check node is running
-#        pid=`ssh $user@$node ps aux | grep MockEspressoService | grep $CLUSTER_NAME | grep $node:$port | awk '{print $2}'`
-#        if [ -z "$pid" ]; then
-#          cecho "FAIL to start participant $node:$port on $CLUSTER_NAME" $red
-#        fi
-      else
-        cecho "FAIL to start participant $node:$port on $CLUSTER_NAME, since it's already running" $red
-      fi
-    done
-  done
-#  sleep 30
-  #END
-}
-
-#random pick N participant processes to kill
-#  wait for session timeout (~30s)
-#  and restart killed partitipants
-function killRandomAndRestart
-{
-  #: <<'END'
-  KILL_NR=1
-  NODE_NR=${#NODES[@]}
-  j=0
-  unset PROC_TAB
-  unset KILL_PROC_TAB
-  for (( i=0; i<${NODE_NR}; i++ ))
-  do
-    node=${NODES[$i]}
-    user=${USERS[$i]}
-    for port in ${PORTS[*]}
-    do
-      PROC_TAB["$j"]=$user:$node:$port
-      j=`expr $j + 1` 
-    done
-  done
-  echo -e "PROC_TAB:\t${PROC_TAB[@]}"
-
-  for i in `shuf --input-range=0-$(( ${#PROC_TAB[*]} - 1 )) | head -${KILL_NR}`
-  do
-    echo -e "Select partiticipant to kill:\t${PROC_TAB[$i]}"
-    KILL_PROC_TAB=("${KILL_PROC_TAB[@]}" "${PROC_TAB[$i]}")
-  done
-  echo -e "KILL_PROC_TAB(usr:node:port):\t${KILL_PROC_TAB[@]}"
-
-  for kill_proc in ${KILL_PROC_TAB[*]}
-  do
-    user=`echo ${kill_proc} | cut -f1 -d:`
-    node=`echo ${kill_proc} | cut -f2 -d:`
-    port=`echo ${kill_proc} | cut -f3 -d:`
-    pid=`ssh $user@$node ps aux | grep MockEspressoService | grep $CLUSTER_NAME | grep $node:$port | awk '{print $2}'`
-    if [ -z "$pid" ]; then
-      cecho "FAIL to kill participant $node:$port, since it's not running" $red
-    else
-      echo "Killing participant pid:$pid on $user@$node:$port"
-      ssh $user@$node kill -9 $pid
-    fi
-  done
-
-  sleep 30
-  echo "Session timeout for ${KILL_PROC_TAB[*]}"
-  #END
-
-  sleep 30  
-  
-  #restart killed participant process
-  #: <<'END'
-  for kill_proc in ${KILL_PROC_TAB[*]}
-  do
-    user=`echo ${kill_proc} | cut -f1 -d:`
-    node=`echo ${kill_proc} | cut -f2 -d:`
-    port=`echo ${kill_proc} | cut -f3 -d:`
-    pid=`ssh $user@$node ps aux | grep MockEspressoService | grep $CLUSTER_NAME | grep $node:$port  | awk '{print $2}'`
-    if [ -z "$pid" ]; then
-      echo "Restarting participant $node:$port on $CLUSTER_NAME"
-      RUN_MOCK_SERVICE=${RUN_MOCK_SERVICE_TEMPLATE/EXPRESS_USER/$user}
-      ssh $user@$node $RUN_MOCK_SERVICE --port $port -zkSvr $ZKADDRESS -clusterName $CLUSTER_NAME -instanceName $node:$port </dev/null >/dev/null 2>&1 & 
-      sleep 1
-      ps aux | grep $RUN_MOCK_SERVICE | grep $CLUSTER_NAME | grep $node:$port | grep -v "grep" | awk '{print$2}' | xargs kill
-    else
-      cecho "FAIL to restart participant $node:$port on $CLUSTER_NAME, since it's already running" $red
-    fi
-  done
-  #END
-}
-
-#kill controller and then kill all participants
-function cleanup
-{
-  cecho ">>Cleanup" $green
-  #kill cluster controller
-  #: <<'END'
-  pid=`ssh express1@express1-md ps aux | grep ClusterManagerMain | grep $CLUSTER_NAME | awk '{print $2}'`
-  if [ -z "$pid" ]; then
-    cecho "FAIL to kill controller on $CLUSTER_NAME" $red
-  else
-    echo "Killing controller process $pid on $CLUSTER_NAME"
-    ssh express1@express1-md kill -9 $pid
-    sleep 1
-  fi
-  #END
-
-  #kill all participant processes
-  #: <<'END'
-  for (( i=0; i<${NODE_NR}; i++ ))
-  do
-    node=${NODES[$i]}
-    user=${USERS[$i]}
-    for port in ${PORTS[*]}
-    do
-      pid=`ssh $user@$node ps aux | grep MockEspressoService | grep $CLUSTER_NAME | grep $node:$port | awk '{print $2}'`
-      if [ -z "$pid" ]; then
-      cecho "FAIL to kill participant $node:$port on $CLUSTER_NAME" $red
-    else
-      echo "Killing participant pid:$pid $node:$port on $CLUSTER_NAME"
-      ssh $user@$node kill -9 $pid
-      sleep 1
-    fi
-    done
-  done
-  #END
-}
-
-#########################
-# execution starts here
-#########################
-#: <<'END'
-
-#PORTS=(16918 16920)
-END_PORT=$START_PORT+$PORT_NR*2
-for (( k=$START_PORT; k<$END_PORT; k+=2 ))
-{
-  PORTS=("${PORTS[@]}" "$k")
-}
-echo -e "PORTS:\t${PORTS[@]}"
-
-startZookeeper
-setupCluster
-
-startNodes
-sleep 180
-
-#do test
-for (( k=0; k<60; k++ ))
-do
-  cecho ">>Test round_$k" $green
-  killRandomAndRestart
-  sleep 30
-done
-
-cleanup
-stopZookeeper
-#END
-
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/integration-test/nonexistent-get.test
----------------------------------------------------------------------
diff --git a/mockservice/integration-test/nonexistent-get.test b/mockservice/integration-test/nonexistent-get.test
deleted file mode 100755
index aad0bbe..0000000
--- a/mockservice/integration-test/nonexistent-get.test
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-PORT="8900"
-METHOD="get"
-DB_NAME="TestDB"
-TABLE_NAME="TestTable"
-RESOURCE="rec_nonexistent"
-SUBRESOURCE="subrec1"
-
-curl -v -s -H "Content-Type:avro/json" http://localhost:$PORT/$DB_NAME/$TABLE_NAME/$RESOURCE/

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/integration-test/simple-get.test
----------------------------------------------------------------------
diff --git a/mockservice/integration-test/simple-get.test b/mockservice/integration-test/simple-get.test
deleted file mode 100755
index af2248c..0000000
--- a/mockservice/integration-test/simple-get.test
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-PORT="8900"
-METHOD="get"
-DB_NAME="TestDB"
-TABLE_NAME="TestTable"
-RESOURCE="rec1"
-SUBRESOURCE="subrec1"
-
-curl -s -H "Content-Type:avro/json" http://localhost:$PORT/$DB_NAME/$TABLE_NAME/$RESOURCE/

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/integration-test/simple-post.test
----------------------------------------------------------------------
diff --git a/mockservice/integration-test/simple-post.test b/mockservice/integration-test/simple-post.test
deleted file mode 100755
index c015541..0000000
--- a/mockservice/integration-test/simple-post.test
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-PORT="8900"
-METHOD="post"
-DB_NAME="TestDB"
-TABLE_NAME="TestTable"
-RESOURCE="rec1"
-SUBRESOURCE="subrec1"
-SUBRESOURCE_VAL="val1"
-
-curl -s -H "Content-Type:application/json" -s -X PUT --data-binary '{"id":100, "name":"Jane Doe2"}' http://localhost:$PORT/$DB_NAME/$TABLE_NAME/$RESOURCE/

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/integration-test/stop-service.test
----------------------------------------------------------------------
diff --git a/mockservice/integration-test/stop-service.test b/mockservice/integration-test/stop-service.test
deleted file mode 100755
index 7a163f6..0000000
--- a/mockservice/integration-test/stop-service.test
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-PORT="12918"
-COMMAND="stopservice"
-
-curl -s -H "Content-Type:avro/json" http://localhost:$PORT/$COMMAND/

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/pom.xml
----------------------------------------------------------------------
diff --git a/mockservice/pom.xml b/mockservice/pom.xml
deleted file mode 100644
index fefed91..0000000
--- a/mockservice/pom.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.helix</groupId>
-    <artifactId>helix</artifactId>
-    <version>0.6.2-incubating-SNAPSHOT</version>
-  </parent>
-  <artifactId>mockservice</artifactId>
-  <name>Apache Helix :: Mockservice</name>
-
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.helix</groupId>
-      <artifactId>helix-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.noelios.restlet</groupId>
-      <artifactId>com.noelios.restlet</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.testng</groupId>
-      <artifactId>testng</artifactId>
-      <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>junit</groupId>
-          <artifactId>junit</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-  </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>appassembler-maven-plugin</artifactId>
-        <configuration>
-          <programs>
-            <program>
-              <mainClass>org.apache.helix.MockEspressoService</mainClass>
-              <name>run-mock-espresso-service</name>
-            </program>
-          </programs>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/config/log4j.properties
----------------------------------------------------------------------
diff --git a/mockservice/src/main/config/log4j.properties b/mockservice/src/main/config/log4j.properties
deleted file mode 100644
index 91fac03..0000000
--- a/mockservice/src/main/config/log4j.properties
+++ /dev/null
@@ -1,31 +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.
-##
-
-# Set root logger level to DEBUG and its only appender to A1.
-log4j.rootLogger=DEBUG,A1
-
-# A1 is set to be a ConsoleAppender.
-log4j.appender.A1=org.apache.log4j.ConsoleAppender
-
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
-
-log4j.logger.org.I0Itec=ERROR
-log4j.logger.org.apache=ERROR

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/java/org/apache/helix/CMConnector.java
----------------------------------------------------------------------
diff --git a/mockservice/src/main/java/org/apache/helix/CMConnector.java b/mockservice/src/main/java/org/apache/helix/CMConnector.java
deleted file mode 100644
index ccc75af..0000000
--- a/mockservice/src/main/java/org/apache/helix/CMConnector.java
+++ /dev/null
@@ -1,41 +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.
- */
-
-public class CMConnector {
-
-	HelixManager _manager;
-
-	public CMConnector(final String clusterName, final String instanceName, final String zkAddr) throws Exception //, final ZkClient zkClient) throws Exception
-	{
-		 _manager = null;
-		 _manager = HelixManagerFactory
-		            .getZKHelixManager(clusterName, instanceName, InstanceType.PARTICIPANT, zkAddr); //, zkClient);
-		 _manager.connect();
-	}
-
-	public HelixManager getManager() {
-		return _manager;
-	}
-
-	public void disconnect() {
-		_manager.disconnect();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/java/org/apache/helix/EspressoResource.java
----------------------------------------------------------------------
diff --git a/mockservice/src/main/java/org/apache/helix/EspressoResource.java b/mockservice/src/main/java/org/apache/helix/EspressoResource.java
deleted file mode 100644
index 64d725c..0000000
--- a/mockservice/src/main/java/org/apache/helix/EspressoResource.java
+++ /dev/null
@@ -1,216 +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.io.IOException;
-import java.io.Reader;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.channels.ReadableByteChannel;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.helix.tools.ClusterSetup;
-import org.apache.log4j.Logger;
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.restlet.Context;
-import org.restlet.data.Form;
-import org.restlet.data.MediaType;
-import org.restlet.data.Method;
-import org.restlet.data.Request;
-import org.restlet.data.Response;
-import org.restlet.data.Status;
-import org.restlet.resource.Representation;
-import org.restlet.resource.Resource;
-import org.restlet.resource.ResourceException;
-import org.restlet.resource.StringRepresentation;
-import org.restlet.resource.Variant;
-
-
-public class EspressoResource extends Resource {
-	
-	private static final int POST_BODY_BUFFER_SIZE = 1024*10;
-	
-	private static final Logger logger = Logger
-			.getLogger(EspressoResource.class);
-	
-	Context _context;
-	
-	 public EspressoResource(Context context,
-	            Request request,
-	            Response response) 
-	  {
-	    super(context, request, response);
-	    getVariants().add(new Variant(MediaType.TEXT_PLAIN));
-	    getVariants().add(new Variant(MediaType.APPLICATION_JSON));
-	    _context = context;
-	  }
-	 
-	 public boolean allowGet()
-	  {
-		 System.out.println("PutResource.allowGet()");
-	    return true;
-	  }
-	  
-	  public boolean allowPost()
-	  {
-		  System.out.println("PutResource.allowPost()");
-	    return true;
-	  }
-	  
-	  public boolean allowPut()
-	  {
-		  System.out.println("PutResource.allowPut()");
-	    return true;
-	  }
-	  
-	  public boolean allowDelete()
-	  {
-	    return false;
-	  }
-	  
-	  /*
-	   * Handle get requests
-	   * @see org.restlet.resource.Resource#represent(org.restlet.resource.Variant)
-	   */
-	  public Representation represent(Variant variant)
-	  {
-	    StringRepresentation presentation = null;
-	    try
-	    {
-	    	String databaseId = (String)getRequest().getAttributes().get(MockEspressoService.DATABASENAME);
-	    	String tableId = (String)getRequest().getAttributes().get(MockEspressoService.TABLENAME);
-	    	String resourceId = (String)getRequest().getAttributes().get(MockEspressoService.RESOURCENAME);
-	    	String subResourceId = (String)getRequest().getAttributes().get(MockEspressoService.SUBRESOURCENAME);
-	    	logger.debug("Done getting request components");
-	    	logger.debug("method: "+getRequest().getMethod());
-	    	String composedKey = databaseId + tableId + resourceId; // + subResourceId;
-	    	EspressoStorageMockNode mock = (EspressoStorageMockNode)_context.getAttributes().get(MockEspressoService.CONTEXT_MOCK_NODE_NAME);
-
-	    	
-	    	if (getRequest().getMethod() == Method.PUT) {
-	    		logger.debug("processing PUT");
-	    		Reader postBodyReader;
-	    		//TODO: get to no fixed size on buffer
-	    		char[] postBody = new char[POST_BODY_BUFFER_SIZE];	    		
-	    		postBodyReader = getRequest().getEntity().getReader();
-	    		postBodyReader.read(postBody);
-	    		logger.debug("postBody: "+new String(postBody));
-	    		mock.doPut(databaseId, composedKey, new String(postBody));
-	    		presentation = new StringRepresentation("Put succeeded", MediaType.APPLICATION_JSON);
-	    	}
-	    	else if (getRequest().getMethod() == Method.GET) {
-	    		logger.debug("processing GET");
-	    		String result = mock.doGet(databaseId, composedKey);
-			      logger.debug("result: "+result);
-			      if (result == null) {
-			    	  presentation = new StringRepresentation("Record not found", MediaType.APPLICATION_JSON);
-			    	  getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND,"Record not found");
-			      }
-			      else {
-			    	  getResponse().setStatus(Status.SUCCESS_OK,"Success");
-			    	  presentation = new StringRepresentation(result, MediaType.APPLICATION_JSON);
-			      }
-	    	}
-	    }
-
-	    catch (IOException e) {
-	    	presentation = new StringRepresentation(e.getMessage(), MediaType.APPLICATION_JSON);
-	    	e.printStackTrace();
-	    }
-
-	    catch(Exception e)
-	    {
-	    	String error = "Error with op"; //ClusterRepresentationUtil.getErrorAsJsonStringFromException(e);
-	    	presentation = new StringRepresentation(error, MediaType.APPLICATION_JSON);	      
-	    	e.printStackTrace();
-	    }  
-	    return presentation;
-	  }
-	  
-	  /*
-	   * Handle put requests (non-Javadoc)
-	   * @see org.restlet.resource.Resource#storeRepresentation(org.restlet.resource.Representation)
-	   */
-	 public void storeRepresentation(Representation entity) throws ResourceException {
-		 logger.debug("in storeRepresentation");
-		 StringRepresentation presentation = null;
-		// try {
-		 Form requestHeaders = (Form) getRequest().getAttributes().get("org.restlet.http.headers");
-		 Map<String, String> headerMap = requestHeaders.getValuesMap();
-		 logger.debug("HEADERS MAP");
-		 for (String key : headerMap.keySet()) {
-			 logger.debug(key+" : "+headerMap.get(key));
-		 }
-	//	} catch (IOException e1) {
-			// TODO Auto-generated catch block
-			//e1.printStackTrace();
-		//}   
-		 try
-		    {
-		    	logger.debug("in PutResource handle");
-		    	String databaseId = (String)getRequest().getAttributes().get(MockEspressoService.DATABASENAME);
-		    	String tableId = (String)getRequest().getAttributes().get(MockEspressoService.TABLENAME);
-		    	String resourceId = (String)getRequest().getAttributes().get(MockEspressoService.RESOURCENAME);
-		    	String subResourceId = (String)getRequest().getAttributes().get(MockEspressoService.SUBRESOURCENAME);
-		    	logger.debug("Done getting request components");
-		    	logger.debug("method: "+getRequest().getMethod());
-		    	String composedKey = databaseId + tableId + resourceId; // + subResourceId;
-		    	EspressoStorageMockNode mock = (EspressoStorageMockNode)_context.getAttributes().get(MockEspressoService.CONTEXT_MOCK_NODE_NAME);
-
-		    	if (getRequest().getMethod() == Method.PUT) {
-		    		logger.debug("processing PUT");
-		    		Reader postBodyReader;
-		    		//TODO: get to no fixed size on buffer
-		    		char[] postBody = new char[POST_BODY_BUFFER_SIZE];
-		    		postBodyReader = getRequest().getEntity().getReader();
-		    		postBodyReader.read(postBody);
-		    		logger.debug("postBody: "+new String(postBody));
-		    		mock.doPut(databaseId, composedKey, new String(postBody));
-		    		presentation = new StringRepresentation("Put succeeded", MediaType.APPLICATION_JSON);
-		    	}
-		    	else if (getRequest().getMethod() == Method.GET) {
-		    		logger.debug("Processing GET");
-		    		String result = mock.doGet(databaseId, composedKey);
-				      logger.debug("result: "+result);
-				      if (result == null) {
-				    	  presentation = new StringRepresentation("Record not found", MediaType.APPLICATION_JSON);
-				      }
-				      else {
-				    	  presentation = new StringRepresentation(result, MediaType.APPLICATION_JSON);
-				      }
-		    	}
-		    }
-
-		    catch (IOException e) {
-		    	presentation = new StringRepresentation(e.getMessage(), MediaType.APPLICATION_JSON);
-		    	e.printStackTrace();
-		    }
-
-		    catch(Exception e)
-		    {
-		    	String error = "Error with op";
-		    	presentation = new StringRepresentation(error, MediaType.APPLICATION_JSON);	      
-		    	e.printStackTrace();
-		    }  
-		    finally {
-		    	entity.release();
-		    }
-	 }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/java/org/apache/helix/EspressoStorageMockNode.java
----------------------------------------------------------------------
diff --git a/mockservice/src/main/java/org/apache/helix/EspressoStorageMockNode.java b/mockservice/src/main/java/org/apache/helix/EspressoStorageMockNode.java
deleted file mode 100644
index 777354f..0000000
--- a/mockservice/src/main/java/org/apache/helix/EspressoStorageMockNode.java
+++ /dev/null
@@ -1,195 +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.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-//import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-//import java.util.concurrent.ConcurrentMap;
-
-import org.apache.helix.EspressoStorageMockStateModelFactory;
-import org.apache.helix.HelixDataAccessor;
-import org.apache.helix.PropertyType;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.PropertyKey.Builder;
-import org.apache.helix.healthcheck.PerformanceHealthReportProvider;
-import org.apache.helix.healthcheck.StatHealthReportProvider;
-import org.apache.helix.model.IdealState;
-import org.apache.helix.model.Message.MessageType;
-import org.apache.helix.participant.StateMachineEngine;
-import org.apache.helix.participant.statemachine.StateModel;
-import org.apache.log4j.Logger;
-
-public class EspressoStorageMockNode extends MockNode {
-
-	private static final Logger logger = Logger
-			.getLogger(EspressoStorageMockNode.class);
-
-	private final String GET_STAT_NAME = "get";
-	private final String SET_STAT_NAME = "set";
-	private final String COUNT_STAT_TYPE = "count";
-	private final String REPORT_NAME = "ParticipantStats";
-
-	StatHealthReportProvider _healthProvider;
-	//PerformanceHealthReportProvider _healthProvider;
-	EspressoStorageMockStateModelFactory _stateModelFactory;
-
-	HashSet<String>_partitions;
-
-	ConcurrentHashMap<String, String> _keyValueMap;
-	FnvHashFunction _hashFunction;
-	int _numTotalEspressoPartitions = 0;
-
-	public EspressoStorageMockNode(CMConnector cm) {
-		super(cm);
-		_stateModelFactory = new EspressoStorageMockStateModelFactory(0);
-
-//		StateMachineEngine genericStateMachineHandler = new StateMachineEngine();
-		StateMachineEngine stateMach = _cmConnector.getManager().getStateMachineEngine();
-		stateMach.registerStateModelFactory("MasterSlave", _stateModelFactory);
-//		_cmConnector
-//				.getManager()
-//				.getMessagingService()
-//				.registerMessageHandlerFactory(
-//						MessageType.STATE_TRANSITION.toString(),
-//						genericStateMachineHandler);
-        /*
-		_healthProvider = new StatHealthReportProvider();
-		_healthProvider.setReportName(REPORT_NAME);
-       */
-
-		_healthProvider = new StatHealthReportProvider();
-		//_healthProvider.setReportName(REPORT_NAME);
-
-		_cmConnector.getManager().getHealthReportCollector()
-				.addHealthReportProvider(_healthProvider);
-		_partitions = new HashSet<String>();
-		_keyValueMap = new ConcurrentHashMap<String, String>();
-		_hashFunction = new FnvHashFunction();
-
-		//start thread to keep checking what partitions this node owns
-		//Thread partitionGetter = new Thread(new PartitionGetterThread());
-		//partitionGetter.start();
-		//logger.debug("set partition getter thread to run");
-	}
-
-	public String formStatName(String dbName, String partitionName, String metricName)
-	{
-		String statName;
-		statName = "db"+dbName+".partition"+partitionName+"."+metricName;
-		return statName;
-
-	}
-
-	public String doGet(String dbId, String key) {
-		String partition = getPartitionName(dbId, getKeyPartition(dbId, key));
-		if (!isPartitionOwnedByNode(partition)) {
-			logger.error("Key "+key+" hashed to partition "+partition +" but this node does not own it.");
-			return null;
-		}
-
-		//_healthProvider.submitIncrementPartitionRequestCount(partition);
-		//_healthProvider.incrementPartitionStat(GET_STAT_NAME, partition);
-		_healthProvider.incrementStat(formStatName(dbId, partition, "getCount"), String.valueOf(System.currentTimeMillis()));
-		return _keyValueMap.get(key);
-	}
-
-	public void doPut(String dbId, String key, String value) {
-		String partition = getPartitionName(dbId, getKeyPartition(dbId, key));
-		if (!isPartitionOwnedByNode(partition)) {
-			logger.error("Key "+key+" hashed to partition "+partition +" but this node does not own it.");
-			return;
-		}
-
-		//_healthProvider.submitIncrementPartitionRequestCount(partition);
-		//_healthProvider.incrementPartitionStat(SET_STAT_NAME, partition);
-		//_healthProvider.incrementStat(SET_STAT_NAME, COUNT_STAT_TYPE,
-		//		dbId, partition, "FIXMENODENAME", String.valueOf(System.currentTimeMillis()));
-		_healthProvider.incrementStat(formStatName(dbId, partition, "putCount"), String.valueOf(System.currentTimeMillis()));
-
-		_keyValueMap.put(key, value);
-	}
-
-	private String getPartitionName(String databaseName, int partitionNum) {
-		return databaseName+"_"+partitionNum;
-	}
-
-	private boolean isPartitionOwnedByNode(String partitionName) {
-		Set<String> stateModels = _stateModelFactory.getPartitionSet();
-		logger.debug("state model map size: "+stateModels.size());
-
-		return (stateModels.contains(partitionName));
-	}
-
-	private int getKeyPartition(String dbName, String key) {
-		int numPartitions = getNumPartitions(dbName);
-		logger.debug("numPartitions: "+numPartitions);
-		int part = Math.abs((int)_hashFunction.hash(key.getBytes(), numPartitions));
-		logger.debug("part: "+part);
-		return part;
-	}
-
-	private int getNumPartitions(String dbName) {
-		logger.debug("dbName: "+dbName);
-		HelixDataAccessor helixDataAccessor = _cmConnector.getManager().getHelixDataAccessor();
-		Builder keyBuilder = helixDataAccessor.keyBuilder();
-    ZNRecord rec = helixDataAccessor.getProperty(keyBuilder.idealStates(dbName)).getRecord();
-		if (rec == null) {
-			logger.debug("rec is null");
-		}
-		IdealState state = new IdealState(rec);
-		return state.getNumPartitions();
-	}
-
-	class PartitionGetterThread implements Runnable {
-
-		@Override
-		public void run() {
-			while (true) {
-				synchronized (_partitions) {
-					//logger.debug("Building partition map");
-					_partitions.clear();
-					Set<String> stateModels = _stateModelFactory.getPartitionSet();
-					for (String s: stateModels) {
-						logger.debug("adding key "+s);
-						_partitions.add(s);
-					}
-				}
-				//sleep for 60 seconds
-				try {
-					Thread.sleep(60000);
-				} catch (InterruptedException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
-			}
-		}
-	}
-
-	@Override
-	public void run() {
-
-	}
-
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/java/org/apache/helix/EspressoStorageMockStateModelFactory.java
----------------------------------------------------------------------
diff --git a/mockservice/src/main/java/org/apache/helix/EspressoStorageMockStateModelFactory.java b/mockservice/src/main/java/org/apache/helix/EspressoStorageMockStateModelFactory.java
deleted file mode 100644
index 69c5ab0..0000000
--- a/mockservice/src/main/java/org/apache/helix/EspressoStorageMockStateModelFactory.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 org.apache.helix.NotificationContext;
-import org.apache.helix.model.Message;
-import org.apache.helix.participant.statemachine.StateModel;
-import org.apache.helix.participant.statemachine.StateModelFactory;
-
-@SuppressWarnings("rawtypes")
-public class EspressoStorageMockStateModelFactory extends StateModelFactory<StateModel> {
-	int _delay;
-
-	public EspressoStorageMockStateModelFactory(int delay) {
-		_delay = delay;
-	}
-
-	@Override
-	public StateModel createNewStateModel(String stateUnitKey) {
-		EspressoStorageMockStateModel stateModel = new EspressoStorageMockStateModel();
-		stateModel.setDelay(_delay);
-		stateModel.setStateUnitKey(stateUnitKey);
-		return stateModel;
-	}
-
-	public static class EspressoStorageMockStateModel extends StateModel {
-		int _transDelay = 0;
-		String stateUnitKey;
-		
-		public String getStateUnitKey() {
-			return stateUnitKey;
-		}
-
-		public void setStateUnitKey(String stateUnitKey) {
-			this.stateUnitKey = stateUnitKey;
-		}
-
-		public void setDelay(int delay) {
-			_transDelay = delay > 0 ? delay : 0;
-		}
-
-		public void onBecomeSlaveFromOffline(Message message,
-				NotificationContext context) {
-
-			System.out.println("EspressoStorageMockStateModel.onBecomeSlaveFromOffline() for "+ stateUnitKey);
-			sleep();
-		}
-
-		private void sleep() {
-			try {
-				Thread.sleep(_transDelay);
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-		}
-
-		public void onBecomeSlaveFromMaster(Message message,
-				NotificationContext context) {
-			System.out.println("EspressoStorageMockStateModel.onBecomeSlaveFromMaster() for "+ stateUnitKey);
-			sleep();
-
-		}
-
-		public void onBecomeMasterFromSlave(Message message,
-				NotificationContext context) {
-			System.out.println("EspressoStorageMockStateModel.onBecomeMasterFromSlave() for "+ stateUnitKey);
-			sleep();
-
-		}
-
-		public void onBecomeOfflineFromSlave(Message message,
-				NotificationContext context) {
-			System.out.println("EspressoStorageMockStateModel.onBecomeOfflineFromSlave() for "+ stateUnitKey);
-			sleep();
-
-		}
-		
-		public void onBecomeDroppedFromOffline(Message message,
-        NotificationContext context) {
-      System.out.println("ObBecomeDroppedFromOffline() for "+ stateUnitKey);
-      sleep();
-
-    }
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/java/org/apache/helix/FnvHashFunction.java
----------------------------------------------------------------------
diff --git a/mockservice/src/main/java/org/apache/helix/FnvHashFunction.java b/mockservice/src/main/java/org/apache/helix/FnvHashFunction.java
deleted file mode 100644
index fcd3af7..0000000
--- a/mockservice/src/main/java/org/apache/helix/FnvHashFunction.java
+++ /dev/null
@@ -1,203 +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.nio.ByteBuffer;
-
-public class FnvHashFunction implements HashFunction
-{
-    private static final long FNV_BASIS = 0x811c9dc5;
-    private static final long FNV_PRIME = (1 << 24) + 0x193;
-
-    @Override
-    public long hash(ByteBuffer buf)
-    {
-    	int length = buf.position() + buf.remaining();
-        return hash(buf, 0, length);
-    }
-
-    @Override
-    public long hash(ByteBuffer buf, int off, int len)
-    {
-        long hash = FNV_BASIS;
-
-        int last = Math.min(off + len, buf.position() + buf.remaining());
-
-        for (int i=off;  i< last;  i++)
-        {
-            hash ^= 0xFF & buf.get(i);
-            hash *= FNV_PRIME;
-        }
-        return hash;
-    }
-
-	public long hash(byte[] key)
-	{
-        long hash = FNV_BASIS;
-        for(int i = 0; i < key.length; i++) {
-            hash ^= 0xFF & key[i];
-            hash *= FNV_PRIME;
-        }
-
-        return hash;
-	}
-
-	@Override
-	public long hash(byte[] key, int numBuckets)
-	{
-		return hash(key)%numBuckets;
-	}
-
-
-	private long hash(long val)
-	{
-	   long hashval = FNV_BASIS;
-
-	   for(int i = 0; i < 8; i++)
-	   {
-	     long octet = val & 0x00ff;
-	     val = val >> 8;
-
-	     hashval = hashval ^ octet;
-	     hashval = hashval * FNV_PRIME;
-	   }
-	   return (int)hashval;
-	}
-
-	@Override
-	public long hash(long val, int numBuckets)
-	{
-		return hash(val)%numBuckets;
-	}
-
-	/*
-	public static void main(String[] args)
-	{
-		byte[] b = new byte[1024*1024*100];
-		ByteBuffer buf = ByteBuffer.allocateDirect(1024*1024*100).order(DbusEvent.byteOrder);
-		Random r = new Random();
-		r.nextBytes(b);
-		buf.put(b);
-
-		FnvHashFunction fun = new FnvHashFunction();
-		CRC32 chksum = new CRC32();
-		JenkinsHashFunction jFun = new JenkinsHashFunction();
-
-		long start = 0;
-		long end = 0;
-		long hash = 0;
-		long diff = 0;
-		long delayMicro = 0;
-
-		chksum.reset();
-		chksum.update(b);
-		long prevhash = chksum.getValue();
-		for (int i = 0; i < 10; i++)
-		{
-			start = System.nanoTime();
-			chksum.reset();
-			chksum.update(b);
-			hash = chksum.getValue();
-			end = System.nanoTime();
-			assert(prevhash == hash);
-			diff += (end - start);
-		}
-
-		delayMicro = (diff/1000)/10;
-
-		System.out.println("Latency of System CRC32 (Micro Seconds) is: " + delayMicro);
-
-		prevhash = fun.hash(b);
-		for (int i = 0; i < 10; i++)
-		{
-			start = System.nanoTime();
-			hash = fun.hash(b);
-			end = System.nanoTime();
-			assert(prevhash == hash);
-			diff += (end - start);
-		}
-		delayMicro = (diff/1000)/10;
-		System.out.println("Latency of FNV (Micro Seconds)  is: " + delayMicro);
-
-		prevhash = jFun.hash(b);
-		for (int i = 0; i < 10; i++)
-		{
-			start = System.nanoTime();
-			hash = jFun.hash(b);
-			end = System.nanoTime();
-			assert(prevhash == hash);
-			diff += (end - start);
-		}
-		delayMicro = (diff/1000)/10;
-		System.out.println("Latency of Jenkins (Micro Seconds)  is: " + delayMicro);
-
-		prevhash = ByteBufferCRC32.getChecksum(b);
-		for (int i = 0; i < 10; i++)
-		{
-			start = System.nanoTime();
-			hash = ByteBufferCRC32.getChecksum(b);
-			end = System.nanoTime();
-			assert(prevhash == hash);
-			diff += (end - start);
-		}
-		delayMicro = (diff/1000)/10;
-		System.out.println("Latency of ByteBufferCRC32 (Micro Seconds)  is: " + delayMicro);
-
-		//System.out.println("Buffer position-Remaining :" + buf.position() + "-" + buf.remaining());
-
-		prevhash = fun.hash(buf);
-		for (int i = 0; i < 10; i++)
-		{
-			start = System.nanoTime();
-			hash = fun.hash(buf);
-			end = System.nanoTime();
-			assert(prevhash == hash);
-			diff += (end - start);
-		}
-		delayMicro = (diff/1000)/10;
-		System.out.println("Latency of FNV (Micro Seconds) for ByteBuffer is: " + delayMicro);
-		//System.out.println("Buffer position-Remaining :" + buf.position() + "-" + buf.remaining());
-
-		prevhash = fun.hash(buf);
-		for (int i = 0; i < 10; i++)
-		{
-			start = System.nanoTime();
-			hash = fun.hash(buf);
-			end = System.nanoTime();
-			assert(prevhash == hash);
-			diff += (end - start);
-		}
-		delayMicro = (diff/1000)/10;
-		System.out.println("Latency of Jenkins (Micro Seconds) for ByteBuffer is: " + delayMicro);
-		//System.out.println("Buffer position-Remaining :" + buf.position() + "-" + buf.remaining());
-		prevhash = ByteBufferCRC32.getChecksum(buf);
-		for (int i = 0; i < 10; i++)
-		{
-			start = System.nanoTime();
-			hash = ByteBufferCRC32.getChecksum(buf);
-			end = System.nanoTime();
-			assert(prevhash == hash);
-			diff += (end - start);
-		}
-		delayMicro = (diff/1000)/10;
-		System.out.println("Latency of ByteBufferCRC32 (Micro Seconds)  for ByteBuffer is: " + delayMicro);
-
-		//System.out.println("Buffer position-Remaining :" + buf.position() + "-" + buf.remaining());
-	}
-	*/
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/java/org/apache/helix/HashFunction.java
----------------------------------------------------------------------
diff --git a/mockservice/src/main/java/org/apache/helix/HashFunction.java b/mockservice/src/main/java/org/apache/helix/HashFunction.java
deleted file mode 100644
index e5a5432..0000000
--- a/mockservice/src/main/java/org/apache/helix/HashFunction.java
+++ /dev/null
@@ -1,65 +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.nio.ByteBuffer;
-
-public interface HashFunction {
-	
-
-	/*
-	 * Generates Hash for entire byte buffer
-	 * @param buf : ByteBuffer for which hash needs to be computed
-	 * @return hash value of buffer
-	 */
-	public long hash(ByteBuffer buf);
-	
-	/*
-	 * Generates Hash for a section of byte buffer denoted by its
-	 * endpoints
-	 * 
-	 * @param buf : ByteBuffer for which hash needs to be computed
-	 * @param off : Starting Offset
-	 * @param len : Length of the section for hash computation 
-	 * @return the hash value for the section of the buffer
-	 */
-	public long hash(ByteBuffer buf, int off, int len);
-	
-	/*
-	 * Generates hash for the byte array and bucketize the value to
-	 * 0.. (numBuckets - 1)
-	 * 
-	 * @param key : Array to apply hash and bucketize
-	 * @param numBuckets : Number of buckets for bucketization
-	 * 
-	 * @return Returns the bucket in the range 0..(numBuckets - 1)
-	 */
-	public long hash(byte[] key, int numBuckets);
-	
-	/*
-	 * Generates hash for the key and bucketize the value to
-	 * 0.. (numBuckets - 1)
-	 * 
-	 * @param key : Input key for which hash needs to be calculated
-	 * @param numBuckets : Number of buckets for bucketization
-	 * 
-	 * @return Returns the bucket in the range 0..(numBuckets - 1)
-	 */
-	public long hash(long key, int numBuckets);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/java/org/apache/helix/MockEspressoService.java
----------------------------------------------------------------------
diff --git a/mockservice/src/main/java/org/apache/helix/MockEspressoService.java b/mockservice/src/main/java/org/apache/helix/MockEspressoService.java
deleted file mode 100644
index 5507ee3..0000000
--- a/mockservice/src/main/java/org/apache/helix/MockEspressoService.java
+++ /dev/null
@@ -1,271 +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.net.InetAddress;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.GnuParser;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.ParseException;
-import org.apache.helix.tools.ClusterSetup;
-import org.apache.log4j.Logger;
-import org.restlet.Application;
-import org.restlet.Component;
-import org.restlet.Context;
-import org.restlet.data.Request;
-import org.restlet.Restlet;
-import org.restlet.data.MediaType;
-import org.restlet.data.Protocol;
-import org.restlet.resource.StringRepresentation;
-import org.restlet.Router;
-
-import org.restlet.data.Response;
-
-
-public class MockEspressoService extends Application
-{
-  private static final Logger logger = Logger.getLogger(MockEspressoService.class);
-	
-  public static final String HELP = "help";
-  public static final String CLUSTERNAME = "clusterName";
-  public static final String INSTANCENAME = "instanceName";
-  public static final String ZKSERVERADDRESS = "zkSvr";
-  public static final String PORT = "port";
-  public static final int DEFAULT_PORT = 8100;
-  protected static final String NODE_TYPE = "EspressoStorage";
-  //protected static final String INSTANCE_NAME = "localhost_1234";
-  
-  public static final String DATABASENAME = "database";
-  public static final String TABLENAME = "table";
-  public static final String RESOURCENAME = "resource";
-  public static final String SUBRESOURCENAME = "subresource";
-  public static final String STOPSERVICECOMMAND = "stopservice";
-  
-  public static final String CONTEXT_MOCK_NODE_NAME = "mocknode";
-  public static final String COMPONENT_NAME = "component";
-  
-  Context _applicationContext;
-  static int _serverPort;
-  static String _zkAddr = "localhost:9999";
-  static String _instanceName = "localhost";
-  static String _clusterName = "";
-  public CMConnector _connector;
-  public EspressoStorageMockNode _mockNode;
-  static Context _context;
-  static Component _component;
-
-  public MockEspressoService(Context context)
-  {
-	  super(_context);
-	  _connector = null;
-
-
-	  try {
-		  _connector = new CMConnector(_clusterName, _instanceName, _zkAddr); //, zkClient);
-	  }
-	  catch (Exception e) {
-		  logger.error("Unable to initialize CMConnector: "+e);
-		  e.printStackTrace();
-		  System.exit(-1);
-	  }
-	  _mockNode = (EspressoStorageMockNode)MockNodeFactory.createMockNode(NODE_TYPE, _connector);
-	  context.getAttributes().put(CONTEXT_MOCK_NODE_NAME, (Object)_mockNode);
-  }
- 
-  @Override
-  public Restlet createRoot()
-  {
-	Router router = new Router(_context);
-
-    Restlet mainpage = new Restlet()
-    {
-      @Override
-      public void handle(Request request, Response response)
-      {
-        StringBuilder stringBuilder = new StringBuilder();
-        stringBuilder.append("<html>");
-        stringBuilder
-            .append("<head><title>Restlet Cluster Management page</title></head>");
-        stringBuilder.append("<body bgcolor=white>");
-        stringBuilder.append("<table border=\"0\">");
-        stringBuilder.append("<tr>");
-        stringBuilder.append("<td>");
-        stringBuilder.append("<h1>Rest cluster management interface V1</h1>");
-        stringBuilder.append("</td>");
-        stringBuilder.append("</tr>");
-        stringBuilder.append("</table>");
-        stringBuilder.append("</body>");
-        stringBuilder.append("</html>");
-        response.setEntity(new StringRepresentation(stringBuilder.toString(),
-            MediaType.TEXT_HTML));
-      }
-    };
-    
-    if (_mockNode == null) {
-    	logger.debug("_mockNode in createRoot is null");
-    }
-    router.attach("", mainpage);
-    
-    //Espresso handlers
-    router.attach("/{"+DATABASENAME+"}/{"+TABLENAME+"}/{"+RESOURCENAME+"}", EspressoResource.class);
-    router.attach("/{"+DATABASENAME+"}/{"+TABLENAME+"}/{"+RESOURCENAME+"}/{"+SUBRESOURCENAME+"}", EspressoResource.class);
-    
-    //Admin handlers
-    router.attach("/{"+STOPSERVICECOMMAND+"}", StopServiceResource.class);
-    
-    return router;
-  }
-  
-  public static void printUsage(Options cliOptions)
-  {
-    HelpFormatter helpFormatter = new HelpFormatter();
-    helpFormatter.printHelp("java " + MockEspressoService.class.getName(), cliOptions);
-  }
-
-  @SuppressWarnings("static-access")
-  private static Options constructCommandLineOptions()
-  {
-    Option helpOption = OptionBuilder.withLongOpt(HELP)
-        .withDescription("Prints command-line options info").create();
-    helpOption.setArgs(0);
-    helpOption.setRequired(false);
-    helpOption.setArgName("print help message");
-    
-    Option zkServerOption = OptionBuilder.withLongOpt(ZKSERVERADDRESS)
-        .withDescription("Provide zookeeper address").create();
-    zkServerOption.setArgs(1);
-    zkServerOption.setRequired(true);
-    zkServerOption.setArgName("ZookeeperServerAddress(Required)");
-    
-    Option clusterOption = OptionBuilder.withLongOpt(CLUSTERNAME)
-    		.withDescription("Provide cluster name").create();
-    clusterOption.setArgs(1);
-    clusterOption.setRequired(true);
-    clusterOption.setArgName("Cluster name(Required)");
-
-    Option instanceOption = OptionBuilder.withLongOpt(INSTANCENAME)
-    		.withDescription("Provide name for this instance").create();
-    instanceOption.setArgs(1);
-    instanceOption.setRequired(false);
-    instanceOption.setArgName("Instance name(Optional, defaults to localhost)");
-
-    Option portOption = OptionBuilder.withLongOpt(PORT)
-    .withDescription("Provide web service port").create();
-    portOption.setArgs(1);
-    portOption.setRequired(false);
-    portOption.setArgName("web service port, default: "+ DEFAULT_PORT);
-        
-    Options options = new Options();
-    options.addOption(helpOption);
-    options.addOption(zkServerOption);
-    options.addOption(clusterOption);
-    options.addOption(instanceOption);
-    options.addOption(portOption);
-    
-    return options;
-  }
-  
-  public static void processCommandLineArgs(String[] cliArgs) throws Exception
-  {
-    CommandLineParser cliParser = new GnuParser();
-    Options cliOptions = constructCommandLineOptions();
-    CommandLine cmd = null;
-
-    try
-    {
-      cmd = cliParser.parse(cliOptions, cliArgs);
-    } 
-    catch (ParseException pe)
-    {
-      System.err.println("MockEspressoService: failed to parse command-line options: "
-          + pe.toString());
-      printUsage(cliOptions);
-      System.exit(1);
-    }
-    _serverPort = DEFAULT_PORT;
-    if(cmd.hasOption(HELP))
-    {
-      printUsage(cliOptions);
-      return;
-    }
-    else if(cmd.hasOption(PORT))
-    {
-      _serverPort = Integer.parseInt(cmd.getOptionValue(PORT));
-    }
-    if (cmd.hasOption(ZKSERVERADDRESS)) {
-    	_zkAddr = cmd.getOptionValue(ZKSERVERADDRESS);
-    }
-    if (cmd.hasOption(CLUSTERNAME)) {
-    	_clusterName = cmd.getOptionValue(CLUSTERNAME);
-    	logger.debug("_clusterName: "+_clusterName);
-    }
-    if (cmd.hasOption(INSTANCENAME)) {
-    	_instanceName = cmd.getOptionValue(INSTANCENAME);
-    	_instanceName = _instanceName.replace(':', '_');
-    	logger.debug("_instanceName: "+_instanceName);
-    }
-  }
-  
-  public void run() throws Exception {
-	 
-	  logger.debug("Start of mock service run");
-	  
-	
-	  if (_mockNode == null) {
-		  logger.debug("_mockNode null");
-	  }
-	  else {
-		  logger.debug("_mockNode not null");
-	  }
-	  if (_mockNode != null) {
-		  // start web server with the zkServer address
-		  _component = new Component();
-		  _component.getServers().add(Protocol.HTTP, _serverPort);
-		  // Attach the application to the component and start it
-		  _component.getDefaultHost().attach(this); //(application);
-		  _context.getAttributes().put(COMPONENT_NAME, (Object)_component);
-		 // _context.getParameters().set("maxTotalConnections", "16",true); 
-		  _component.start();
-		  //start mock espresso node
-		  //!!!_mockNode.run();
-	  }
-	  else {
-		  logger.error("Unknown MockNode type "+NODE_TYPE);
-		  System.exit(-1);
-	  }
-	  logger.debug("mock service done");
-  }
-  
-  /**
-   * @param args
-   * @throws Exception
-   */
-  public static void main(String[] args) throws Exception
-  {
-	  processCommandLineArgs(args);
-	  _context = new Context();
-	  MockEspressoService service = new MockEspressoService(_context);
-	  service.run();
-	  
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/java/org/apache/helix/MockNode.java
----------------------------------------------------------------------
diff --git a/mockservice/src/main/java/org/apache/helix/MockNode.java b/mockservice/src/main/java/org/apache/helix/MockNode.java
deleted file mode 100644
index 4490e77..0000000
--- a/mockservice/src/main/java/org/apache/helix/MockNode.java
+++ /dev/null
@@ -1,34 +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 org.apache.log4j.Logger;
-
-public abstract class MockNode {
-	CMConnector _cmConnector;
-	
-	public MockNode(CMConnector cm) {
-		_cmConnector = cm;
-	}
-
-	public abstract void run();
-	
-	public void disconnect() {
-		_cmConnector.disconnect();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/java/org/apache/helix/MockNodeFactory.java
----------------------------------------------------------------------
diff --git a/mockservice/src/main/java/org/apache/helix/MockNodeFactory.java b/mockservice/src/main/java/org/apache/helix/MockNodeFactory.java
deleted file mode 100644
index e468fe8..0000000
--- a/mockservice/src/main/java/org/apache/helix/MockNodeFactory.java
+++ /dev/null
@@ -1,39 +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 org.apache.log4j.Logger;
-
-public class MockNodeFactory {
-	
-	private static final Logger logger = Logger.getLogger(MockNodeFactory.class);
-	
-	public MockNodeFactory()
-	{
-	}
-	
-	public static MockNode createMockNode(String type, CMConnector cm) {
-		if (type.equals("EspressoStorage")) {
-			return new EspressoStorageMockNode(cm);
-		}
-		else {
-			logger.error("Unknown MockNode type "+type);
-			return null;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/java/org/apache/helix/MockRunner.java
----------------------------------------------------------------------
diff --git a/mockservice/src/main/java/org/apache/helix/MockRunner.java b/mockservice/src/main/java/org/apache/helix/MockRunner.java
deleted file mode 100644
index 3467ab7..0000000
--- a/mockservice/src/main/java/org/apache/helix/MockRunner.java
+++ /dev/null
@@ -1,60 +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 org.apache.helix.manager.zk.ZNRecordSerializer;
-import org.apache.helix.manager.zk.ZkClient;
-import org.apache.log4j.Logger;
-
-
-/**
- * Hello world!
- *
- */
-public class MockRunner 
-{
-	
-	private static final Logger logger = Logger.getLogger(MockRunner.class);
-	
-	protected static final String nodeType = "EspressoStorage";
-	protected static final String ZK_ADDR = "localhost:2184";
-	protected static final String INSTANCE_NAME = "localhost_1234";
-	protected static final String CLUSTER_NAME = "MockCluster";
-	
-    public static void main( String[] args )
-    {
-    	//ZkClient zkClient = new ZkClient(ZK_ADDR, 3000, 10000, new ZNRecordSerializer());
-    	CMConnector cm = null;
-    	try {
-    		cm = new CMConnector(CLUSTER_NAME, INSTANCE_NAME, ZK_ADDR); //, zkClient);
-    	}
-    	catch (Exception e) {
-    		logger.error("Unable to initialize CMConnector: "+e);
-    		e.printStackTrace();
-    		System.exit(-1);
-    	}
-        MockNode mock = MockNodeFactory.createMockNode(nodeType, cm);
-        if (mock != null) {
-        	mock.run();
-        }
-        else {
-        	logger.error("Unknown MockNode type "+nodeType);
-        	System.exit(-1);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/main/java/org/apache/helix/StopServiceResource.java
----------------------------------------------------------------------
diff --git a/mockservice/src/main/java/org/apache/helix/StopServiceResource.java b/mockservice/src/main/java/org/apache/helix/StopServiceResource.java
deleted file mode 100644
index e2c670b..0000000
--- a/mockservice/src/main/java/org/apache/helix/StopServiceResource.java
+++ /dev/null
@@ -1,143 +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.io.IOException;
-import java.io.Reader;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.channels.ReadableByteChannel;
-import java.util.List;
-
-import org.apache.helix.tools.ClusterSetup;
-import org.apache.log4j.Logger;
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.restlet.Component;
-import org.restlet.Context;
-import org.restlet.data.MediaType;
-import org.restlet.data.Method;
-import org.restlet.data.Request;
-import org.restlet.data.Response;
-import org.restlet.data.Status;
-import org.restlet.resource.Representation;
-import org.restlet.resource.Resource;
-import org.restlet.resource.ResourceException;
-import org.restlet.resource.StringRepresentation;
-import org.restlet.resource.Variant;
-
-
-public class StopServiceResource extends Resource {
-
-
-	private static final Logger logger = Logger
-			.getLogger(StopServiceResource.class);
-
-	Context _context;
-
-	public StopServiceResource(Context context,
-			Request request,
-			Response response) 
-	{
-		super(context, request, response);
-		getVariants().add(new Variant(MediaType.TEXT_PLAIN));
-		getVariants().add(new Variant(MediaType.APPLICATION_JSON));
-		_context = context;
-	}
-
-	public boolean allowGet()
-	{
-		System.out.println("PutResource.allowGet()");
-		return true;
-	}
-
-	public boolean allowPost()
-	{
-		System.out.println("PutResource.allowPost()");
-		return false;
-	}
-
-	public boolean allowPut()
-	{
-		System.out.println("PutResource.allowPut()");
-		return false;
-	}
-
-	public boolean allowDelete()
-	{
-		return false;
-	}
-
-
-	class StopThread implements Runnable {
-
-		Component _component;
-		MockNode _mockNode;
-		
-		StopThread(Component c, MockNode m) {
-			_component = c;
-			_mockNode = m;
-		}
-		
-		@Override
-		public void run() {
-			try {
-				//sleep for 1 second, then end service
-				Thread.sleep(1000);
-				_component.stop();
-				_mockNode.disconnect();
-				System.exit(0);
-			} catch (Exception e) {
-				logger.error("Unable to stop service: "+e);
-				e.printStackTrace();
-			}
-		}
-		
-	}
-	
-	//XXX: handling both gets and puts here for now
-	public Representation represent(Variant variant)
-	{
-		System.out.println("StopServiceResource.represent()");
-		StringRepresentation presentation = null;
-		try
-		{
-			logger.debug("in represent, stopping service");
-			Component component = (Component)_context.getAttributes().get(MockEspressoService.COMPONENT_NAME);
-			EspressoStorageMockNode mock = (EspressoStorageMockNode)_context.getAttributes().get(MockEspressoService.CONTEXT_MOCK_NODE_NAME);
-			presentation = new StringRepresentation("Stopping in 1 second", MediaType.APPLICATION_JSON);
-			Thread stopper = new Thread(new StopThread(component, mock));
-			stopper.start();
-		}
-
-		catch(Exception e)
-		{
-			String error = "Error shutting down";
-			presentation = new StringRepresentation(error, MediaType.APPLICATION_JSON);	      
-			e.printStackTrace();
-		}  
-		return presentation;
-	}
-
-	public void storeRepresentation(Representation entity) throws ResourceException {
-
-	}
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/test/conf/testng.xml
----------------------------------------------------------------------
diff --git a/mockservice/src/test/conf/testng.xml b/mockservice/src/test/conf/testng.xml
deleted file mode 100644
index 58f0803..0000000
--- a/mockservice/src/test/conf/testng.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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.
--->
-<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="Suite" parallel="none">
-  <test name="Test" preserve-order="false">
-    <packages>
-      <package name="org.apache.helix"/>
-    </packages>
-  </test>
-</suite>

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/mockservice/src/test/java/org/apache/helix/AppTest.java
----------------------------------------------------------------------
diff --git a/mockservice/src/test/java/org/apache/helix/AppTest.java b/mockservice/src/test/java/org/apache/helix/AppTest.java
deleted file mode 100644
index 25c53dd..0000000
--- a/mockservice/src/test/java/org/apache/helix/AppTest.java
+++ /dev/null
@@ -1,45 +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 org.testng.annotations.Test;
-import org.testng.AssertJUnit;
-
-/**
- * Unit test for simple App.
- */
-public class AppTest
-{
-    /**
-     * Create the test case
-     *
-     * @param testName name of the test case
-     */
-    public AppTest( String testName )
-    {
-    }
-
-    /**
-     * Rigourous Test :-)
-     */
-    @Test
-    public void testApp()
-    {
-        AssertJUnit.assertTrue( true );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f904a688/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e708034..76474fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -115,7 +115,6 @@ under the License.
   <modules>
     <module>helix-core</module>
     <module>helix-admin-webapp</module>
-    <module>mockservice</module>
     <module>helix-agent</module>
     <module>recipes</module>
   </modules>


Mime
View raw message