incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [4/4] git commit: Fixed BLUR-100.
Date Mon, 27 May 2013 12:25:16 GMT
Fixed BLUR-100.


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

Branch: refs/heads/0.1.5
Commit: c31fac17df6e696d90527e6948d805d0f56560f1
Parents: bb42f19
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Mon May 27 08:24:58 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Mon May 27 08:24:58 2013 -0400

----------------------------------------------------------------------
 .../java/org/apache/blur/manager/IndexManager.java |    2 +-
 .../main/java/org/apache/blur/utils/BlurUtil.java  |   90 -
 .../src/test/java/org/apache/blur/MiniCluster.java |    3 +-
 .../org/apache/blur/manager/IndexManagerTest.java  |   12 +-
 .../org/apache/blur/thrift/BlurClusterTest.java    |    6 +-
 .../java/org/apache/blur/utils/BlurUtilsTest.java  |   42 -
 src/blur-testsuite/bin/blur-vm                     |   76 -
 src/blur-testsuite/bin/env-blur.sh                 |   17 -
 src/blur-testsuite/conf/blur-env.sh                |   41 -
 src/blur-testsuite/conf/blur-site.properties       |    3 -
 src/blur-testsuite/pom.xml                         |  109 -
 .../blur/testsuite/CreateInsertQueryRepeating.java |  241 -
 .../org/apache/blur/testsuite/CreateTable.java     |   50 -
 .../org/apache/blur/testsuite/DisableTable.java    |   36 -
 .../org/apache/blur/testsuite/EnableTable.java     |   36 -
 .../java/org/apache/blur/testsuite/ListTables.java |   35 -
 .../java/org/apache/blur/testsuite/LoadData.java   |  129 -
 .../org/apache/blur/testsuite/LoadDataAsync.java   |  146 -
 .../blur/testsuite/LoadDataAsyncContinuously.java  |  154 -
 .../blur/testsuite/LoadDataContinuously.java       |  174 -
 .../org/apache/blur/testsuite/OptimizeTable.java   |   35 -
 .../apache/blur/testsuite/RandomSearchTable.java   |  120 -
 .../testsuite/RandomSearchTableContinuously.java   |  161 -
 .../testsuite/RapidlyCreateAndDeleteTables.java    |   93 -
 .../org/apache/blur/testsuite/RemoveTable.java     |   36 -
 .../testsuite/ShardServerLayoutStateTables.java    |   51 -
 .../apache/blur/testsuite/SimpleQueryExample.java  |   50 -
 .../java/org/apache/blur/testsuite/StatsTable.java |   38 -
 .../resources/org/apache/blur/testsuite/words.txt  | 7851 ---------------
 .../apache/blur/thrift/util/BlurThriftHelper.java  |  105 +
 .../thrift/util/CreateInsertQueryRepeating.java    |  241 +
 .../org/apache/blur/thrift/util/CreateTable.java   |   50 +
 .../org/apache/blur/thrift/util/DisableTable.java  |   36 +
 .../org/apache/blur/thrift/util/EnableTable.java   |   36 +
 .../org/apache/blur/thrift/util/ListTables.java    |   35 +
 .../java/org/apache/blur/thrift/util/LoadData.java |  129 +
 .../org/apache/blur/thrift/util/LoadDataAsync.java |  146 +
 .../thrift/util/LoadDataAsyncContinuously.java     |  154 +
 .../blur/thrift/util/LoadDataContinuously.java     |  174 +
 .../org/apache/blur/thrift/util/OptimizeTable.java |   35 +
 .../apache/blur/thrift/util/RandomSearchTable.java |  120 +
 .../thrift/util/RandomSearchTableContinuously.java |  161 +
 .../thrift/util/RapidlyCreateAndDeleteTables.java  |   91 +
 .../org/apache/blur/thrift/util/RemoveTable.java   |   36 +
 .../thrift/util/ShardServerLayoutStateTables.java  |   51 +
 .../blur/thrift/util/SimpleQueryExample.java       |   50 +
 .../org/apache/blur/thrift/util/StatsTable.java    |   38 +
 src/blur-thrift/src/main/resources/words.txt       | 7851 +++++++++++++++
 .../blur/thrift/util/BlurThriftHelperTest.java     |   52 +
 src/pom.xml                                        |    1 -
 50 files changed, 9603 insertions(+), 9826 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java b/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
index 457e261..78dcf1f 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
@@ -18,10 +18,10 @@ package org.apache.blur.manager;
  */
 import static org.apache.blur.metrics.MetricsConstants.BLUR;
 import static org.apache.blur.metrics.MetricsConstants.ORG_APACHE_BLUR;
+import static org.apache.blur.thrift.util.BlurThriftHelper.findRecordMutation;
 import static org.apache.blur.utils.BlurConstants.PRIME_DOC;
 import static org.apache.blur.utils.BlurConstants.RECORD_ID;
 import static org.apache.blur.utils.BlurConstants.ROW_ID;
-import static org.apache.blur.utils.BlurUtil.findRecordMutation;
 import static org.apache.blur.utils.RowDocumentUtil.getColumns;
 import static org.apache.blur.utils.RowDocumentUtil.getRow;
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java b/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
index afea788..913a1a0 100644
--- a/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
+++ b/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
@@ -33,7 +33,6 @@ import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
@@ -59,7 +58,6 @@ import org.apache.blur.thrift.generated.Blur.Iface;
 import org.apache.blur.thrift.generated.BlurQuery;
 import org.apache.blur.thrift.generated.BlurResult;
 import org.apache.blur.thrift.generated.BlurResults;
-import org.apache.blur.thrift.generated.Column;
 import org.apache.blur.thrift.generated.FetchResult;
 import org.apache.blur.thrift.generated.Record;
 import org.apache.blur.thrift.generated.RecordMutation;
@@ -68,7 +66,6 @@ import org.apache.blur.thrift.generated.Row;
 import org.apache.blur.thrift.generated.RowMutation;
 import org.apache.blur.thrift.generated.RowMutationType;
 import org.apache.blur.thrift.generated.Selector;
-import org.apache.blur.thrift.generated.SimpleQuery;
 import org.apache.hadoop.conf.Configurable;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
@@ -147,15 +144,6 @@ public class BlurUtil {
     }
   }
 
-  public static BlurQuery newSimpleQuery(String query) {
-    BlurQuery blurQuery = new BlurQuery();
-    SimpleQuery simpleQuery = new SimpleQuery();
-    simpleQuery.setQueryStr(query);
-    blurQuery.setSimpleQuery(simpleQuery);
-    blurQuery.setSelector(new Selector());
-    return blurQuery;
-  }
-
   public static void createIfMissing(ZooKeeper zookeeper, String path) throws KeeperException, InterruptedException {
     if (zookeeper.exists(path, false) == null) {
       try {
@@ -208,84 +196,6 @@ public class BlurUtil {
     }
   }
 
-  public static Selector newSelector(String locationId) {
-    Selector selector = new Selector();
-    selector.locationId = locationId;
-    return selector;
-  }
-
-  public static RecordMutation newRecordMutation(String family, String recordId, Column... columns) {
-    return newRecordMutation(RecordMutationType.REPLACE_ENTIRE_RECORD, family, recordId, columns);
-  }
-
-  public static RecordMutation newRecordMutation(RecordMutationType type, String family, String recordId,
-      Column... columns) {
-    Record record = new Record();
-    record.setRecordId(recordId);
-    record.setFamily(family);
-    for (Column column : columns) {
-      record.addToColumns(column);
-    }
-
-    RecordMutation mutation = new RecordMutation();
-    mutation.setRecordMutationType(type);
-    mutation.setRecord(record);
-    return mutation;
-  }
-
-  public static RecordMutation findRecordMutation(RowMutation mutation, Record record) {
-    for (RecordMutation recordMutation : mutation.recordMutations) {
-      if (match(recordMutation, record)) {
-        return recordMutation;
-      }
-    }
-    return null;
-  }
-
-  public static boolean match(RecordMutation mutation, Record record) {
-    return match(mutation.record, record);
-  }
-
-  public static boolean match(Record left, Record right) {
-    return left.recordId.equals(right.recordId) && left.family.equals(right.family);
-  }
-
-  public static RowMutation newRowMutation(String table, String rowId, RecordMutation... mutations) {
-    return newRowMutation(RowMutationType.REPLACE_ROW, table, rowId, mutations);
-  }
-
-  public static RowMutation newRowMutation(RowMutationType type, String table, String rowId,
-      RecordMutation... mutations) {
-    RowMutation mutation = new RowMutation();
-    mutation.setRowId(rowId);
-    mutation.setTable(table);
-    mutation.setRowMutationType(type);
-    for (RecordMutation recordMutation : mutations) {
-      mutation.addToRecordMutations(recordMutation);
-    }
-    return mutation;
-  }
-
-  public static Record newRecord(String family, String recordId, Column... columns) {
-    Record record = new Record();
-    record.setRecordId(recordId);
-    record.setFamily(family);
-    record.setColumns(Arrays.asList(columns));
-    return record;
-  }
-
-  public static Row newRow(String rowId, Record... records) {
-    Row row = new Row().setId(rowId);
-    for (Record record : records) {
-      row.addToRecords(record);
-    }
-    return row;
-  }
-
-  public static Column newColumn(String name, String value) {
-    return new Column().setName(name).setValue(value);
-  }
-
   public static byte[] toBytes(Serializable serializable) {
     try {
       ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-core/src/test/java/org/apache/blur/MiniCluster.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/MiniCluster.java b/src/blur-core/src/test/java/org/apache/blur/MiniCluster.java
index da118b3..275b261 100644
--- a/src/blur-core/src/test/java/org/apache/blur/MiniCluster.java
+++ b/src/blur-core/src/test/java/org/apache/blur/MiniCluster.java
@@ -64,6 +64,7 @@ import org.apache.blur.thrift.generated.Record;
 import org.apache.blur.thrift.generated.Row;
 import org.apache.blur.thrift.generated.RowMutation;
 import org.apache.blur.thrift.generated.TableDescriptor;
+import org.apache.blur.thrift.util.BlurThriftHelper;
 import org.apache.blur.utils.BlurUtil;
 import org.apache.blur.zookeeper.ZooKeeperClient;
 import org.apache.hadoop.conf.Configuration;
@@ -177,7 +178,7 @@ public abstract class MiniCluster {
   }
 
   private static void searchRow(String table, int i, Iface client) throws BlurException, TException {
-    BlurQuery blurQuery = BlurUtil.newSimpleQuery("test.test:" + i);
+    BlurQuery blurQuery = BlurThriftHelper.newSimpleQuery("test.test:" + i);
     System.out.println("Running [" + blurQuery + "]");
     BlurResults results = client.query(table, blurQuery);
     if (results.getTotalResults() != 1L) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java b/src/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
index 7b803c7..2ce6376 100644
--- a/src/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
+++ b/src/blur-core/src/test/java/org/apache/blur/manager/IndexManagerTest.java
@@ -23,12 +23,12 @@ import static org.apache.blur.thrift.generated.RecordMutationType.REPLACE_COLUMN
 import static org.apache.blur.thrift.generated.RecordMutationType.REPLACE_ENTIRE_RECORD;
 import static org.apache.blur.thrift.generated.RowMutationType.DELETE_ROW;
 import static org.apache.blur.thrift.generated.RowMutationType.UPDATE_ROW;
-import static org.apache.blur.utils.BlurUtil.match;
-import static org.apache.blur.utils.BlurUtil.newColumn;
-import static org.apache.blur.utils.BlurUtil.newRecord;
-import static org.apache.blur.utils.BlurUtil.newRecordMutation;
-import static org.apache.blur.utils.BlurUtil.newRow;
-import static org.apache.blur.utils.BlurUtil.newRowMutation;
+import static org.apache.blur.thrift.util.BlurThriftHelper.match;
+import static org.apache.blur.thrift.util.BlurThriftHelper.newColumn;
+import static org.apache.blur.thrift.util.BlurThriftHelper.newRecord;
+import static org.apache.blur.thrift.util.BlurThriftHelper.newRecordMutation;
+import static org.apache.blur.thrift.util.BlurThriftHelper.newRow;
+import static org.apache.blur.thrift.util.BlurThriftHelper.newRowMutation;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java b/src/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java
index 2a02489..5ae4911 100644
--- a/src/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java
+++ b/src/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java
@@ -39,7 +39,7 @@ import org.apache.blur.thrift.generated.RecordMutation;
 import org.apache.blur.thrift.generated.RowMutation;
 import org.apache.blur.thrift.generated.SimpleQuery;
 import org.apache.blur.thrift.generated.TableDescriptor;
-import org.apache.blur.utils.BlurUtil;
+import org.apache.blur.thrift.util.BlurThriftHelper;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.LocalFileSystem;
@@ -106,8 +106,8 @@ public class BlurClusterTest {
     List<RowMutation> mutations = new ArrayList<RowMutation>();
     for (int i = 0; i < length; i++) {
       String rowId = UUID.randomUUID().toString();
-      RecordMutation mutation = BlurUtil.newRecordMutation("test", rowId, BlurUtil.newColumn("test", "value"));
-      RowMutation rowMutation = BlurUtil.newRowMutation("test", rowId, mutation);
+      RecordMutation mutation = BlurThriftHelper.newRecordMutation("test", rowId, BlurThriftHelper.newColumn("test", "value"));
+      RowMutation rowMutation = BlurThriftHelper.newRowMutation("test", rowId, mutation);
       rowMutation.setWaitToBeVisible(true);
       mutations.add(rowMutation);
     }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-core/src/test/java/org/apache/blur/utils/BlurUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/utils/BlurUtilsTest.java b/src/blur-core/src/test/java/org/apache/blur/utils/BlurUtilsTest.java
index df937da..bd40b6e 100644
--- a/src/blur-core/src/test/java/org/apache/blur/utils/BlurUtilsTest.java
+++ b/src/blur-core/src/test/java/org/apache/blur/utils/BlurUtilsTest.java
@@ -19,8 +19,6 @@ package org.apache.blur.utils;
 
 import static org.apache.blur.lucene.LuceneVersionConstant.LUCENE_VERSION;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -28,9 +26,6 @@ import java.io.File;
 import java.io.IOException;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.blur.thrift.generated.Record;
-import org.apache.blur.thrift.generated.RecordMutation;
-import org.apache.blur.thrift.generated.RowMutation;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -100,43 +95,6 @@ public class BlurUtilsTest {
   }
 
   @Test
-  public void testRecordMatch() {
-    Record r1 = BlurUtil.newRecord("test-family", "record-1", BlurUtil.newColumn("a", "b"));
-    Record r2 = BlurUtil.newRecord("test-family", "record-1", BlurUtil.newColumn("c", "d"));
-    Record r3 = BlurUtil.newRecord("test-family", "record-2", BlurUtil.newColumn("e", "f"));
-    Record r4 = BlurUtil.newRecord("test-family-2", "record-1", BlurUtil.newColumn("g", "h"));
-
-    assertTrue("should match with same family and record-id", BlurUtil.match(r1, r2));
-    assertFalse("should not match with different record-id", BlurUtil.match(r1, r3));
-    assertFalse("should not match with different family", BlurUtil.match(r1, r4));
-  }
-
-  @Test
-  public void testRecordMutationMatch() {
-    RecordMutation rm1 = BlurUtil.newRecordMutation("test-family", "record-1", BlurUtil.newColumn("a", "b"));
-    RecordMutation rm2 = BlurUtil.newRecordMutation("test-family", "record-2", BlurUtil.newColumn("c", "d"));
-    RecordMutation rm3 = BlurUtil.newRecordMutation("test-family-2", "record-1", BlurUtil.newColumn("e", "f"));
-    Record r = BlurUtil.newRecord("test-family", "record-1", BlurUtil.newColumn("g", "h"));
-
-    assertTrue("should match with same family and record-id", BlurUtil.match(rm1, r));
-    assertFalse("should not match with different record-id", BlurUtil.match(rm2, r));
-    assertFalse("should not match with different family", BlurUtil.match(rm3, r));
-  }
-
-  @Test
-  public void testFindRecordMutation() {
-    RecordMutation rm1 = BlurUtil.newRecordMutation("test-family", "record-1", BlurUtil.newColumn("a", "b"));
-    RecordMutation rm2 = BlurUtil.newRecordMutation("test-family", "record-2", BlurUtil.newColumn("c", "d"));
-    RecordMutation rm3 = BlurUtil.newRecordMutation("test-family-2", "record-1", BlurUtil.newColumn("e", "f"));
-    RowMutation row = BlurUtil.newRowMutation("test-table", "row-123", rm1, rm2, rm3);
-    Record r = BlurUtil.newRecord("test-family", "record-2", BlurUtil.newColumn("g", "h"));
-    Record r2 = BlurUtil.newRecord("test-family", "record-99", BlurUtil.newColumn("g", "h"));
-
-    assertEquals("should find record-2", rm2, BlurUtil.findRecordMutation(row, r));
-    assertNull("should not find record-99", BlurUtil.findRecordMutation(row, r2));
-  }
-
-  @Test
   public void testValidateShardCount() throws IOException {
     File file = new File(TMPDIR, "ValidateShardCount-test");
     rm(file);

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/bin/blur-vm
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/bin/blur-vm b/src/blur-testsuite/bin/blur-vm
deleted file mode 100755
index 2099b77..0000000
--- a/src/blur-testsuite/bin/blur-vm
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (C) 2011 Near Infinity Corporation
-#
-# Licensed 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.
-
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
-
-. "$bin"/env-blur.sh
-
-case $1 in
-start)
-  ssh blur@$BLUR_VM_IP /home/blur/zookeeper-3.3.5-cdh3u5/bin/zkServer.sh start
-  ssh blur@$BLUR_VM_IP /home/blur/hadoop-0.20.2-cdh3u5/bin/start-dfs.sh
-  echo "Waiting for safemode to exit"
-  ssh blur@$BLUR_VM_IP /home/blur/hadoop-0.20.2-cdh3u5/bin/hadoop dfsadmin -safemode wait
-  ssh blur@$BLUR_VM_IP /home/blur/blur/bin/start-all.sh
- ;;
-stop)
-  ssh blur@$BLUR_VM_IP /home/blur/blur/bin/stop-all.sh
- ;;
-ssh)
-  ssh -X blur@$BLUR_VM_IP
- ;;
-compile)
-  cd $bin/../../
-  mvn clean install -DskipTests
-  cd $bin
- ;;
-deploy)
-  "$0" stop ${@}
-   ROOT_DIR=$bin/../../../
-   ssh blur@$BLUR_VM_IP rm -r /home/blur/blur/bin /home/blur/blur/conf /home/blur/blur/lib /home/blur/blur/interface
-   scp -r $ROOT_DIR/README.md $ROOT_DIR/bin $ROOT_DIR/conf $ROOT_DIR/interface $ROOT_DIR/lib $bin/../conf blur@$BLUR_VM_IP:/home/blur/blur/
-  "$0" start ${@}
- ;;
-install)
-  shift
-  "$0" compile ${@}
-  "$0" deploy ${@}
- ;;
-clean-data)
-  "$0" stop ${@}
-  ssh blur@$BLUR_VM_IP /home/blur/zookeeper-3.3.5-cdh3u5/bin/zkServer.sh stop
-  ssh blur@$BLUR_VM_IP /home/blur/hadoop-0.20.2-cdh3u5/bin/stop-dfs.sh
-  # Removing zookeeper data
-  ssh blur@$BLUR_VM_IP rm -r "/home/blur/zookeeper-3.3.5-cdh3u5/data/*"
-  # Removing hadoop data
-  ssh blur@$BLUR_VM_IP rm -r "/home/blur/hadoop-0.20.2-cdh3u5/dfs/*"
-  ssh blur@$BLUR_VM_IP /home/blur/hadoop-0.20.2-cdh3u5/bin/hadoop namenode -format
-  "$0" start ${@}
- ;;
-install-pub-key)
-  if [ -f ~/.ssh/id_dsa.pub ]; then
-    scp ~/.ssh/id_dsa.pub blur@$BLUR_VM_IP:host_key.pub
-    ssh blur@$BLUR_VM_IP "cat host_key.pub >> ~/.ssh/authorized_keys"
-  fi
-  if [ -f ~/.ssh/id_rsa.pub ]; then
-    scp ~/.ssh/id_rsa.pub blur@$BLUR_VM_IP:host_key.pub
-    ssh blur@$BLUR_VM_IP "cat host_key.pub >> ~/.ssh/authorized_keys"
-  fi
- ;;
-*)
- echo "Usage: $0 { start | stop | compile | deploy | install | clean-data | install-pub-key | ssh }" >&2
-esac

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/bin/env-blur.sh
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/bin/env-blur.sh b/src/blur-testsuite/bin/env-blur.sh
deleted file mode 100755
index 8b68771..0000000
--- a/src/blur-testsuite/bin/env-blur.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (C) 2011 Near Infinity Corporation
-#
-# Licensed 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.
-
-export BLUR_VM_IP=10.192.56.10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/conf/blur-env.sh
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/conf/blur-env.sh b/src/blur-testsuite/conf/blur-env.sh
deleted file mode 100755
index 2c14fd2..0000000
--- a/src/blur-testsuite/conf/blur-env.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-# Set environment specific Blur settings here.
-
-# JAVA_HOME is required
-export JAVA_HOME=/home/blur/jdk1.6.0_30
-
-# HADOOP_HOME is required
-export HADOOP_HOME=/home/blur/hadoop-0.20.2-cdh3u3
-
-# JAVA JVM OPTIONS for the shard servers, jvm tuning parameters are placed here.
-#
-# This is an example of JVM options on a large heap and how to setup large pages and max direct memory size.
-# export BLUR_SHARD_JVM_OPTIONS="-XX:MaxDirectMemorySize=<size>g -XX:+UseLargePages -Xms12g -Xmx12g -Xmn2g -XX:+UseCompressedOops \
-#-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:CMSIncrementalDutyCycleMin=10 -XX:CMSIncrementalDutyCycle=50 \
-#-XX:ParallelGCThreads=8 -XX:+UseParNewGC -XX:MaxGCPauseMillis=200 -XX:GCTimeRatio=10 -XX:+DisableExplicitGC \
-#-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$BLUR_HOME/logs/gc-blur-shard-server_`date +%Y%m%d_%H%M%S`.log
-export BLUR_SHARD_JVM_OPTIONS="-Xmx256m -XX:+UseCompressedOops"
-
-# JAVA JVM OPTIONS for the shard servers, jvm tuning parameters are placed here.
-export BLUR_CONTROLLER_JVM_OPTIONS="-Xmx128m -XX:+UseCompressedOops"
-
-# JAVA JVM OPTIONS for the shard servers, jvm tuning parameters are placed here.
-export BLUR_COMMAND="-Xmx128m -XX:+UseCompressedOops"
-
-# Any SSH Options to be used during startup or shutdown commands.
-export BLUR_SSH_OPTS=
-
-# Time to sleep between shard server commands.
-export BLUR_SHARD_SLEEP=0.1
-
-# Time to sleep between controller server commands.
-export BLUR_CONTROLLER_SLEEP=0.1
-
-# The of shard servers to spawn per machine.
-export BLUR_NUMBER_OF_SHARD_SERVER_INSTANCES_PER_MACHINE=3
-
-# The of controller servers to spawn per machine.
-export BLUR_NUMBER_OF_CONTROLLER_SERVER_INSTANCES_PER_MACHINE=2
-
-# The directory where all the log files will be located.
-# export BLUR_LOGS=$BLUR_HOME/logs
-

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/conf/blur-site.properties
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/conf/blur-site.properties b/src/blur-testsuite/conf/blur-site.properties
deleted file mode 100644
index fbe0aca..0000000
--- a/src/blur-testsuite/conf/blur-site.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-blur.zookeeper.connection=blur-vm
-blur.cluster.name=default
-blur.shard.wal.path=hdfs://blur-vm/blur/logs
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/pom.xml
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/pom.xml b/src/blur-testsuite/pom.xml
deleted file mode 100644
index 408e5d0..0000000
--- a/src/blur-testsuite/pom.xml
+++ /dev/null
@@ -1,109 +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.blur</groupId>
-		<artifactId>blur</artifactId>
-		<version>0.1.5</version>
-        <relativePath>../pom.xml</relativePath>
-	</parent>
-	<groupId>org.apache.blur</groupId>
-	<artifactId>blur-testsuite</artifactId>
-	<packaging>jar</packaging>
-	<name>Blur Test Suite</name>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.blur</groupId>
-			<artifactId>blur-core</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.blur</groupId>
-			<artifactId>blur-mapred</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.blur</groupId>
-			<artifactId>blur-thrift</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>${junit.version}</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.zookeeper</groupId>
-			<artifactId>zookeeper</artifactId>
-			<version>${zookeeper.version}</version>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>log4j</groupId>
-			<artifactId>log4j</artifactId>
-			<version>${log4j.version}</version>
-			<scope>provided</scope>
-			<exclusions>
-				<exclusion>
-					<groupId>javax.mail</groupId>
-					<artifactId>mail</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>javax.jms</groupId>
-					<artifactId>jms</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>com.sun.jdmk</groupId>
-					<artifactId>jmxtools</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>com.sun.jmx</groupId>
-					<artifactId>jmxri</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-	</dependencies>
-
-	<repositories>
-		<repository>
-			<id>libdir</id>
-			<url>file://${basedir}/../lib</url>
-		</repository>
-	</repositories>
-
-	<build>
-		<pluginManagement>
-			<plugins>
-				<plugin>
-					<groupId>org.apache.maven.plugins</groupId>
-					<artifactId>maven-compiler-plugin</artifactId>
-					<configuration>
-						<source>1.6</source>
-						<target>1.6</target>
-					</configuration>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-	</build>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/CreateInsertQueryRepeating.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/CreateInsertQueryRepeating.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/CreateInsertQueryRepeating.java
deleted file mode 100644
index 1acedfa..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/CreateInsertQueryRepeating.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import java.util.UUID;
-
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.BlurClient;
-import org.apache.blur.thrift.generated.AnalyzerDefinition;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.BlurQuery;
-import org.apache.blur.thrift.generated.BlurResults;
-import org.apache.blur.thrift.generated.RowMutation;
-import org.apache.blur.thrift.generated.RowMutationType;
-import org.apache.blur.thrift.generated.SimpleQuery;
-import org.apache.blur.thrift.generated.TableDescriptor;
-import org.apache.blur.thrift.generated.Blur.Iface;
-
-
-import static org.apache.blur.utils.BlurUtil.*;
-
-/**
- * Tests a lot of things, mainly connecting to a blur cluster and slamming a
- * bunch of rows in before querying for them. I like to use it as a load test.
- * 
- */
-public class CreateInsertQueryRepeating {
-
-  private DecimalFormat df = new DecimalFormat("#,###,000.00");
-  private static final char[] symbols = new char[36];
-
-  static {
-    for (int idx = 0; idx < 10; ++idx)
-      symbols[idx] = (char) ('0' + idx);
-    for (int idx = 10; idx < 36; ++idx)
-      symbols[idx] = (char) ('a' + idx - 10);
-  }
-
-  private String table = "test1";
-  private String host = "localhost";
-  private Iface client = null;
-
-  public CreateInsertQueryRepeating(String host, String table) throws BlurException, TException, IOException {
-    this.host = host;
-    this.table = table;
-
-    // init
-    String connectionStr = host + ":40010";
-    String cluster = "default";
-    client = BlurClient.getClient(connectionStr);
-
-    List<String> clusterList = client.shardClusterList();
-    if (clusterList != null && clusterList.size() > 0)
-      cluster = clusterList.get(0);
-    else
-      throw new IOException("cannot find a cluster to use :(");
-
-    System.out.println("using cluster: " + cluster);
-
-    List<String> tableList = client.tableList();
-    if (tableList == null || !tableList.contains(table))
-      createTable(client, table, cluster);
-    else
-      System.out.println("table existed, did not create.");
-  }
-
-  private final Random random = new Random();
-
-  public String randomString(int length) {
-    char[] buf = new char[length];
-
-    for (int idx = 0; idx < buf.length; ++idx)
-      buf[idx] = symbols[random.nextInt(symbols.length)];
-    return new String(buf);
-  }
-
-  public void getClusters(Iface client) {
-    try {
-      List<String> shardClusterList = client.shardClusterList();
-      for (String cluster : shardClusterList)
-        System.out.println("cluster: " + cluster);
-    } catch (BlurException e) {
-      e.printStackTrace();
-    } catch (TException e) {
-      e.printStackTrace();
-    }
-  }
-
-  public void createTable(Iface client, String tableName, String cluster) throws BlurException, TException {
-    TableDescriptor td = new TableDescriptor();
-    td.analyzerDefinition = new AnalyzerDefinition();
-
-    td.name = tableName;
-    // TODO: doc doesnt say required, yet it barfs without it?
-    td.cluster = cluster == null ? "default" : cluster;
-    // auto enable table
-    td.isEnabled = true;
-
-    // 1 shard per server :)
-    td.shardCount = client.shardServerList(cluster).size();
-    td.readOnly = false;
-    // TODO: hardcodes bad, assuming NN on same node as BC
-    td.tableUri = "hdfs://" + host + ":8020/" + tableName;
-    client.createTable(td);
-    System.out.println("table created");
-  }
-
-  /**
-   * @param args
-   * @throws TException
-   * @throws BlurException
-   * @throws IOException
-   */
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    String host = "localhost";
-    String table = "test1";
-
-    if (args != null) {
-      if (args.length >= 1)
-        host = args[0];
-      if (args.length == 2)
-        table = args[1];
-    }
-
-    CreateInsertQueryRepeating test = new CreateInsertQueryRepeating(host, table);
-
-    // System.out.println("Testing joins real quick");
-    // test.testJoin();
-    // System.out.println("test done");
-
-    System.out.println("Starting load");
-    test.loadupTable(100);
-    System.out.println("Finshed load");
-
-    System.out.println("query time!");
-    test.queryTable(50000);
-    System.out.println("query done!");
-
-    System.exit(0);
-  }
-
-  @SuppressWarnings("unused")
-  private void testJoin() throws BlurException, TException {
-    RowMutation mutation = new RowMutation();
-    mutation.table = table;
-    mutation.waitToBeVisible = true;
-    mutation.rowId = "row1";
-    mutation.addToRecordMutations(newRecordMutation("cf1", "recordid1", newColumn("col1", "value1")));
-    mutation.addToRecordMutations(newRecordMutation("cf1", "recordid2", newColumn("col2", "value2")));
-    mutation.rowMutationType = RowMutationType.REPLACE_ROW;
-    client.mutate(mutation);
-
-    List<String> joinTest = new ArrayList<String>();
-    joinTest.add("+cf1.col1:value1");
-    joinTest.add("+cf1.col2:value2");
-    joinTest.add("+cf1.col1:value1 +cf1.col2:value2");
-    joinTest.add("+(+cf1.col1:value1 nocf.nofield:somevalue) +(+cf1.col2.value2 nocf.nofield:somevalue)");
-    joinTest.add("+(+cf1.col1:value1) +(cf1.bla:bla +cf1.col2.value2)");
-
-    for (String q : joinTest)
-      System.out.println(q + " hits: " + hits(client, table, q, true));
-  }
-
-  private static long hits(Iface client, String table, String queryStr, boolean superQuery) throws BlurException, TException {
-    BlurQuery bq = new BlurQuery();
-    SimpleQuery sq = new SimpleQuery();
-    sq.queryStr = queryStr;
-    sq.superQueryOn = superQuery;
-    bq.simpleQuery = sq;
-    BlurResults query = client.query(table, bq);
-    return query.totalResults;
-  }
-
-  // really only useful against the table that was filled via loadupTable
-  public void queryTable(int times) throws BlurException, TException {
-    long start = System.currentTimeMillis();
-    BlurQuery bq = new BlurQuery();
-    bq.fetch = 10;
-    for (int i = 1; i <= times; i++) {
-      SimpleQuery sq = new SimpleQuery();
-      sq.queryStr = "numberField:" + random.nextInt(1000);
-      sq.superQueryOn = true;
-      bq.simpleQuery = sq;
-      client.query(table, bq);
-      if (i % 1000 == 0) {
-        System.out.println("queries: " + i + " times " + df.format((i / ((System.currentTimeMillis() - start + 0.0) / 1000))) + " queries/s");
-      }
-    }
-    System.out.println("queries: " + times + " times " + df.format((times / ((System.currentTimeMillis() - start + 0.0) / 1000))) + " queries/s");
-
-  }
-
-  public void loadupTable(int rows) throws BlurException, TException, IOException {
-
-    long start = System.currentTimeMillis();
-
-    long buildTotal = 0;
-    RowMutation mutation = new RowMutation();
-
-    for (int i = 1; i <= rows; i++) {
-      long buildStart = System.currentTimeMillis();
-      mutation.clear();
-      mutation.table = table;
-      mutation.waitToBeVisible = false;
-      mutation.rowId = UUID.randomUUID().toString();
-      mutation.addToRecordMutations(newRecordMutation("test", "test-" + i, newColumn("uuidField", UUID.randomUUID().toString()), newColumn("numberField", i + ""),
-          newColumn("fatTextField", randomString(1000))));
-      mutation.rowMutationType = RowMutationType.REPLACE_ROW;
-
-      if (i % 50 == 0) {
-        System.out.println("loaded: " + i + " around " + df.format((i / ((System.currentTimeMillis() - start + 0.0) / 1000))) + " rows/s");
-        System.out.println("Total time: " + (System.currentTimeMillis() - start + 0.0) / 1000 + " Build time: " + ((buildTotal / 1000) + 0.0) + " " + buildTotal);
-      }
-
-      buildTotal += System.currentTimeMillis() - buildStart;
-
-      client.mutate(mutation);
-
-    }
-    System.out.println("loaded: " + rows + " around " + df.format((rows / ((System.currentTimeMillis() - start + 0.0) / 1000))) + " rows/s");
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/CreateTable.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/CreateTable.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/CreateTable.java
deleted file mode 100644
index 7c1a070..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/CreateTable.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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 org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.BlurClient;
-import org.apache.blur.thrift.generated.AnalyzerDefinition;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.TableDescriptor;
-import org.apache.blur.thrift.generated.Blur.Iface;
-
-
-public class CreateTable {
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    String connectionStr = args[0];
-    final String cluster = args[1];
-    final String tableName = args[2];
-    int shardCount = Integer.parseInt(args[3]);
-    String uri = args[4];
-
-    final TableDescriptor tableDescriptor = new TableDescriptor();
-    tableDescriptor.analyzerDefinition = new AnalyzerDefinition();
-    tableDescriptor.cluster = cluster;
-    tableDescriptor.name = tableName;
-    tableDescriptor.readOnly = false;
-
-    tableDescriptor.shardCount = shardCount;
-    tableDescriptor.tableUri = uri;
-
-    Iface client = BlurClient.getClient(connectionStr);
-    client.createTable(tableDescriptor);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/DisableTable.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/DisableTable.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/DisableTable.java
deleted file mode 100644
index 41d1e08..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/DisableTable.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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 org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.BlurClient;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.Blur.Iface;
-
-
-public class DisableTable {
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    String connectionStr = args[0];
-    final String tableName = args[1];
-
-    Iface client = BlurClient.getClient(connectionStr);
-    client.disableTable(tableName);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/EnableTable.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/EnableTable.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/EnableTable.java
deleted file mode 100644
index 1ad4ab6..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/EnableTable.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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 org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.BlurClient;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.Blur.Iface;
-
-
-public class EnableTable {
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    String connectionStr = args[0];
-    final String tableName = args[1];
-
-    Iface client = BlurClient.getClient(connectionStr);
-    client.enableTable(tableName);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/ListTables.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/ListTables.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/ListTables.java
deleted file mode 100644
index fc57646..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/ListTables.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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 org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.BlurClient;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.Blur.Iface;
-
-
-public class ListTables {
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    String connectionStr = args[0];
-
-    Iface client = BlurClient.getClient(connectionStr);
-    System.out.println(client.tableList());
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadData.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadData.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadData.java
deleted file mode 100644
index ec8e24a..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadData.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.BlurClient;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.Column;
-import org.apache.blur.thrift.generated.Record;
-import org.apache.blur.thrift.generated.RecordMutation;
-import org.apache.blur.thrift.generated.RecordMutationType;
-import org.apache.blur.thrift.generated.RowMutation;
-import org.apache.blur.thrift.generated.RowMutationType;
-import org.apache.blur.thrift.generated.Blur.Iface;
-
-
-public class LoadData {
-
-  private static Random random = new Random();
-  private static List<String> words = new ArrayList<String>();
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    loadWords();
-    final boolean wal = true;
-    final int numberOfColumns = 3;
-    int numberRows = 100000;
-    final int numberRecordsPerRow = 3;
-    final int numberOfFamilies = 3;
-    final int numberOfWords = 30;
-    int count = 0;
-    int max = 100;
-    long start = System.currentTimeMillis();
-    final String table = args[1];
-    for (int i = 0; i < numberRows; i++) {
-      if (count >= max) {
-        double seconds = (System.currentTimeMillis() - start) / 1000.0;
-        double rate = i / seconds;
-        System.out.println("Rows indexed [" + i + "] at [" + rate + "/s]");
-        count = 0;
-      }
-
-      Iface client = BlurClient.getClient(args[0]);
-      RowMutation mutation = new RowMutation();
-      mutation.setTable(table);
-      String rowId = getRowId();
-      mutation.setRowId(rowId);
-      mutation.setWal(wal);
-      mutation.setRowMutationType(RowMutationType.REPLACE_ROW);
-      for (int j = 0; j < numberRecordsPerRow; j++) {
-        mutation.addToRecordMutations(getRecordMutation(numberOfColumns, numberOfFamilies, numberOfWords));
-      }
-      client.mutate(mutation);
-      count++;
-    }
-  }
-
-  private static void loadWords() throws IOException {
-    InputStream inputStream = LoadData.class.getResourceAsStream("words.txt");
-    BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
-    String word;
-    while ((word = reader.readLine()) != null) {
-      words.add(word.trim());
-    }
-    reader.close();
-  }
-
-  protected static RecordMutation getRecordMutation(int numberOfColumns, int numberOfFamilies, int numberOfWords) {
-    RecordMutation recordMutation = new RecordMutation();
-    recordMutation.setRecord(getRecord(numberOfColumns, numberOfFamilies, numberOfWords));
-    recordMutation.setRecordMutationType(RecordMutationType.REPLACE_ENTIRE_RECORD);
-    return recordMutation;
-  }
-
-  private static Record getRecord(int numberOfColumns, int numberOfFamilies, int numberOfWords) {
-    Record record = new Record();
-    record.setRecordId(getRowId());
-    record.setFamily(getFamily(numberOfFamilies));
-    for (int i = 0; i < numberOfColumns; i++) {
-      record.addToColumns(new Column("col" + i, getWords(numberOfWords)));
-    }
-    return record;
-  }
-
-  private static String getWords(int numberOfWords) {
-    StringBuilder builder = new StringBuilder();
-    for (int i = 0; i < numberOfWords; i++) {
-      if (i != 0) {
-        builder.append(' ');
-      }
-      builder.append(getWord());
-    }
-    return builder.toString();
-  }
-
-  private static String getFamily(int numberOfFamilies) {
-    return "fam" + random.nextInt(numberOfFamilies);
-  }
-
-  private static String getWord() {
-    return words.get(random.nextInt(words.size()));
-  }
-
-  protected static String getRowId() {
-    return Long.toString(Math.abs(random.nextLong())) + "-" + Long.toString(Math.abs(random.nextLong()));
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataAsync.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataAsync.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataAsync.java
deleted file mode 100644
index 65517ba..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataAsync.java
+++ /dev/null
@@ -1,146 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thirdparty.thrift_0_9_0.async.AsyncMethodCallback;
-import org.apache.blur.thrift.AsyncClientPool;
-import org.apache.blur.thrift.generated.Blur;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.Column;
-import org.apache.blur.thrift.generated.Record;
-import org.apache.blur.thrift.generated.RecordMutation;
-import org.apache.blur.thrift.generated.RecordMutationType;
-import org.apache.blur.thrift.generated.RowMutation;
-import org.apache.blur.thrift.generated.RowMutationType;
-import org.apache.blur.thrift.generated.Blur.AsyncIface;
-import org.apache.blur.thrift.generated.Blur.AsyncClient.mutate_call;
-
-
-public class LoadDataAsync {
-
-  private static Random random = new Random();
-  private static List<String> words = new ArrayList<String>();
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    loadWords();
-    final boolean wal = false;
-    final int numberOfColumns = 3;
-    int numberRows = 100000;
-    final int numberRecordsPerRow = 2;
-    final int numberOfFamilies = 3;
-    final int numberOfWords = 30;
-    int count = 0;
-    int max = 100;
-    long start = System.currentTimeMillis();
-    final String table = "test-table";
-    AsyncClientPool pool = new AsyncClientPool();
-    AsyncIface client = pool.getClient(Blur.AsyncIface.class, args[0]);
-    for (int i = 0; i < numberRows; i++) {
-      if (count >= max) {
-        double seconds = (System.currentTimeMillis() - start) / 1000.0;
-        double rate = i / seconds;
-        System.out.println("Rows indexed [" + i + "] at [" + rate + "/s]");
-        count = 0;
-      }
-      client.mutate(getRowMutation(table, wal, numberRecordsPerRow, numberOfColumns, numberOfFamilies, numberOfWords), new AsyncMethodCallback<Blur.AsyncClient.mutate_call>() {
-        @Override
-        public void onError(Exception exception) {
-
-        }
-
-        @Override
-        public void onComplete(mutate_call response) {
-
-        }
-      });
-      count++;
-    }
-  }
-
-  private static RowMutation getRowMutation(String table, boolean wal, int numberRecordsPerRow, int numberOfColumns, int numberOfFamilies, int numberOfWords) {
-    RowMutation mutation = new RowMutation();
-    mutation.setTable(table);
-    String rowId = getRowId();
-    mutation.setRowId(rowId);
-    mutation.setWal(wal);
-    mutation.setRowMutationType(RowMutationType.REPLACE_ROW);
-    for (int j = 0; j < numberRecordsPerRow; j++) {
-      mutation.addToRecordMutations(getRecordMutation(numberOfColumns, numberOfFamilies, numberOfWords));
-    }
-    return mutation;
-  }
-
-  private static void loadWords() throws IOException {
-    InputStream inputStream = LoadDataAsync.class.getResourceAsStream("words.txt");
-    BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
-    String word;
-    while ((word = reader.readLine()) != null) {
-      words.add(word.trim());
-    }
-    reader.close();
-  }
-
-  protected static RecordMutation getRecordMutation(int numberOfColumns, int numberOfFamilies, int numberOfWords) {
-    RecordMutation recordMutation = new RecordMutation();
-    recordMutation.setRecord(getRecord(numberOfColumns, numberOfFamilies, numberOfWords));
-    recordMutation.setRecordMutationType(RecordMutationType.REPLACE_ENTIRE_RECORD);
-    return recordMutation;
-  }
-
-  private static Record getRecord(int numberOfColumns, int numberOfFamilies, int numberOfWords) {
-    Record record = new Record();
-    record.setRecordId(getRowId());
-    record.setFamily(getFamily(numberOfFamilies));
-    for (int i = 0; i < numberOfColumns; i++) {
-      record.addToColumns(new Column("col" + i, getWords(numberOfWords)));
-    }
-    return record;
-  }
-
-  private static String getWords(int numberOfWords) {
-    StringBuilder builder = new StringBuilder();
-    for (int i = 0; i < numberOfWords; i++) {
-      if (i != 0) {
-        builder.append(' ');
-      }
-      builder.append(getWord());
-    }
-    return builder.toString();
-  }
-
-  private static String getFamily(int numberOfFamilies) {
-    return "fam" + random.nextInt(numberOfFamilies);
-  }
-
-  private static String getWord() {
-    return words.get(random.nextInt(words.size()));
-  }
-
-  protected static String getRowId() {
-    return Long.toString(Math.abs(random.nextLong())) + "-" + Long.toString(Math.abs(random.nextLong()));
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataAsyncContinuously.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataAsyncContinuously.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataAsyncContinuously.java
deleted file mode 100644
index ac68a58..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataAsyncContinuously.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thirdparty.thrift_0_9_0.async.AsyncMethodCallback;
-import org.apache.blur.thrift.AsyncClientPool;
-import org.apache.blur.thrift.generated.Blur;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.Column;
-import org.apache.blur.thrift.generated.Record;
-import org.apache.blur.thrift.generated.RecordMutation;
-import org.apache.blur.thrift.generated.RecordMutationType;
-import org.apache.blur.thrift.generated.RowMutation;
-import org.apache.blur.thrift.generated.RowMutationType;
-import org.apache.blur.thrift.generated.Blur.AsyncIface;
-import org.apache.blur.thrift.generated.Blur.AsyncClient.mutate_call;
-
-
-public class LoadDataAsyncContinuously {
-
-  private static Random random = new Random();
-  private static List<String> words = new ArrayList<String>();
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    loadWords();
-    while (true) {
-      final boolean wal = true;
-      final int numberOfColumns = 3;
-      int numberRows = 100000;
-      final int numberRecordsPerRow = 2;
-      final int numberOfFamilies = 3;
-      final int numberOfWords = 30;
-      int count = 0;
-      int max = 1000;
-      long start = System.currentTimeMillis();
-      final String table = "test1";
-      AsyncClientPool pool = new AsyncClientPool();
-      AsyncIface client = pool.getClient(Blur.AsyncIface.class, args[0]);
-      for (int i = 0; i < numberRows; i++) {
-        if (count >= max) {
-          double seconds = (System.currentTimeMillis() - start) / 1000.0;
-          double rate = i / seconds;
-          System.out.println("Rows indexed [" + i + "] at [" + rate + "/s]");
-          count = 0;
-        }
-        client.mutate(getRowMutation(i, table, wal, numberRecordsPerRow, numberOfColumns, numberOfFamilies, numberOfWords),
-            new AsyncMethodCallback<Blur.AsyncClient.mutate_call>() {
-              @Override
-              public void onError(Exception exception) {
-                exception.printStackTrace();
-              }
-
-              @Override
-              public void onComplete(mutate_call response) {
-                try {
-                  response.getResult();
-                } catch (BlurException e) {
-                  e.printStackTrace();
-                } catch (TException e) {
-                  e.printStackTrace();
-                }
-              }
-            });
-        count++;
-      }
-    }
-  }
-
-  private static RowMutation getRowMutation(int rowid, String table, boolean wal, int numberRecordsPerRow, int numberOfColumns, int numberOfFamilies, int numberOfWords) {
-    RowMutation mutation = new RowMutation();
-    mutation.setTable(table);
-    mutation.setRowId(Integer.toString(rowid));
-    mutation.setWal(wal);
-    mutation.setRowMutationType(RowMutationType.REPLACE_ROW);
-    for (int j = 0; j < numberRecordsPerRow; j++) {
-      mutation.addToRecordMutations(getRecordMutation(numberOfColumns, numberOfFamilies, numberOfWords));
-    }
-    return mutation;
-  }
-
-  private static void loadWords() throws IOException {
-    InputStream inputStream = LoadDataAsyncContinuously.class.getResourceAsStream("words.txt");
-    BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
-    String word;
-    while ((word = reader.readLine()) != null) {
-      words.add(word.trim());
-    }
-    reader.close();
-  }
-
-  protected static RecordMutation getRecordMutation(int numberOfColumns, int numberOfFamilies, int numberOfWords) {
-    RecordMutation recordMutation = new RecordMutation();
-    recordMutation.setRecord(getRecord(numberOfColumns, numberOfFamilies, numberOfWords));
-    recordMutation.setRecordMutationType(RecordMutationType.REPLACE_ENTIRE_RECORD);
-    return recordMutation;
-  }
-
-  private static Record getRecord(int numberOfColumns, int numberOfFamilies, int numberOfWords) {
-    Record record = new Record();
-    record.setRecordId(getRowId());
-    record.setFamily(getFamily(numberOfFamilies));
-    for (int i = 0; i < numberOfColumns; i++) {
-      record.addToColumns(new Column("col" + i, getWords(numberOfWords)));
-    }
-    return record;
-  }
-
-  private static String getWords(int numberOfWords) {
-    StringBuilder builder = new StringBuilder();
-    for (int i = 0; i < numberOfWords; i++) {
-      if (i != 0) {
-        builder.append(' ');
-      }
-      builder.append(getWord());
-    }
-    return builder.toString();
-  }
-
-  private static String getFamily(int numberOfFamilies) {
-    return "fam" + random.nextInt(numberOfFamilies);
-  }
-
-  private static String getWord() {
-    return words.get(random.nextInt(words.size()));
-  }
-
-  protected static String getRowId() {
-    return Long.toString(Math.abs(random.nextLong())) + "-" + Long.toString(Math.abs(random.nextLong()));
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataContinuously.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataContinuously.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataContinuously.java
deleted file mode 100644
index 5415ace..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/LoadDataContinuously.java
+++ /dev/null
@@ -1,174 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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.BufferedReader;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.BlurClient;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.Column;
-import org.apache.blur.thrift.generated.Record;
-import org.apache.blur.thrift.generated.RecordMutation;
-import org.apache.blur.thrift.generated.RecordMutationType;
-import org.apache.blur.thrift.generated.RowMutation;
-import org.apache.blur.thrift.generated.RowMutationType;
-import org.apache.blur.thrift.generated.Blur.Iface;
-
-
-public class LoadDataContinuously {
-
-  private static Random random = new Random();
-  public static List<String> words = new ArrayList<String>();
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    if (!(args.length == 8 || args.length == 9)) {
-      System.err
-          .println(LoadDataContinuously.class.getName()
-              + " <host1:port1,host2:port2> <table name> <WAL true|false> <# of columns per record> <# of records per row> <# of column families> <# of words per record> <time in seconds between reporting progress> <*optional path to word dictionary>");
-      System.exit(1);
-    }
-    if (args.length == 9) {
-      loadWords(args[8]);
-    } else {
-      loadWords(null);
-    }
-
-    final Iface client = BlurClient.getClient(args[0]);
-    final String table = args[1];
-    final boolean wal = Boolean.parseBoolean(args[2]);
-    final int numberOfColumns = Integer.parseInt(args[3]);
-    final int numberRecordsPerRow = Integer.parseInt(args[4]);
-    final int numberOfFamilies = Integer.parseInt(args[5]);
-    final int numberOfWords = Integer.parseInt(args[6]);
-    final long timeBetweenReporting = TimeUnit.SECONDS.toMillis(Integer.parseInt(args[7]));
-    final long start = System.currentTimeMillis();
-
-    long s = start;
-    long recordCountTotal = 0;
-    long rowCount = 0;
-
-    int batchSize = 100;
-
-    List<RowMutation> batch = new ArrayList<RowMutation>();
-
-    long recordCount = 0;
-    long totalTime = 0;
-    long calls = 0;
-    while (true) {
-      long now = System.currentTimeMillis();
-      if (s + timeBetweenReporting < now) {
-        double avgSeconds = (now - start) / 1000.0;
-        double seconds = (now - s) / 1000.0;
-        double avgRate = recordCountTotal / avgSeconds;
-        double rate = recordCount / seconds;
-        double latency = (totalTime / 1000000.0) / calls;
-        System.out.println(System.currentTimeMillis() + "," + recordCountTotal + "," + rowCount + "," + latency + "," + rate + "," + avgRate);
-        s = now;
-        recordCount = 0;
-        totalTime = 0;
-        calls = 0;
-      }
-
-      RowMutation mutation = new RowMutation();
-      mutation.setTable(table);
-      String rowId = getRowId();
-      mutation.setRowId(rowId);
-      mutation.setWal(wal);
-      mutation.setRowMutationType(RowMutationType.REPLACE_ROW);
-      for (int j = 0; j < numberRecordsPerRow; j++) {
-        mutation.addToRecordMutations(getRecordMutation(numberOfColumns, numberOfFamilies, numberOfWords));
-      }
-      batch.add(mutation);
-      if (batch.size() >= batchSize) {
-        long sm = System.nanoTime();
-        client.mutateBatch(batch);
-        long em = System.nanoTime();
-        calls++;
-        totalTime += (em - sm);
-        batch.clear();
-      }
-      rowCount++;
-      recordCount += numberRecordsPerRow;
-      recordCountTotal += numberRecordsPerRow;
-    }
-  }
-
-  public static void loadWords(String path) throws IOException {
-    InputStream inputStream;
-    if (path == null) {
-      inputStream = LoadDataContinuously.class.getResourceAsStream("words.txt");
-    } else {
-      inputStream = new FileInputStream(path);
-    }
-    BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
-    String word;
-    while ((word = reader.readLine()) != null) {
-      words.add(word.trim());
-    }
-    reader.close();
-  }
-
-  protected static RecordMutation getRecordMutation(int numberOfColumns, int numberOfFamilies, int numberOfWords) {
-    RecordMutation recordMutation = new RecordMutation();
-    recordMutation.setRecord(getRecord(numberOfColumns, numberOfFamilies, numberOfWords));
-    recordMutation.setRecordMutationType(RecordMutationType.REPLACE_ENTIRE_RECORD);
-    return recordMutation;
-  }
-
-  private static Record getRecord(int numberOfColumns, int numberOfFamilies, int numberOfWords) {
-    Record record = new Record();
-    record.setRecordId(getRowId());
-    record.setFamily(getFamily(numberOfFamilies));
-    for (int i = 0; i < numberOfColumns; i++) {
-      record.addToColumns(new Column("col" + i, getWords(numberOfWords)));
-    }
-    return record;
-  }
-
-  private static String getWords(int numberOfWords) {
-    StringBuilder builder = new StringBuilder();
-    for (int i = 0; i < numberOfWords; i++) {
-      if (i != 0) {
-        builder.append(' ');
-      }
-      builder.append(getWord());
-    }
-    return builder.toString();
-  }
-
-  private static String getFamily(int numberOfFamilies) {
-    return "fam" + random.nextInt(numberOfFamilies);
-  }
-
-  private static String getWord() {
-    return words.get(random.nextInt(words.size()));
-  }
-
-  protected static String getRowId() {
-    return Long.toString(Math.abs(random.nextLong())) + "-" + Long.toString(Math.abs(random.nextLong()));
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/OptimizeTable.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/OptimizeTable.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/OptimizeTable.java
deleted file mode 100644
index 20812a0..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/OptimizeTable.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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 org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.BlurClient;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.Blur.Iface;
-
-
-public class OptimizeTable {
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    final String tableName = args[1];
-    final int segmentCount = Integer.parseInt(args[2]);
-    Iface client = BlurClient.getClient(args[0]);
-    client.optimize(tableName, segmentCount);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/RandomSearchTable.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/RandomSearchTable.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/RandomSearchTable.java
deleted file mode 100644
index 1bfc3e2..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/RandomSearchTable.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Random;
-import java.util.Set;
-
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.BlurClient;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.BlurQuery;
-import org.apache.blur.thrift.generated.BlurResults;
-import org.apache.blur.thrift.generated.Schema;
-import org.apache.blur.thrift.generated.SimpleQuery;
-import org.apache.blur.thrift.generated.Blur.Iface;
-
-
-public class RandomSearchTable {
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    String connectionStr = args[0];
-    final String tableName = args[1];
-    int numberOfTerms = Integer.parseInt(args[2]);
-    int numberOfSearchesPerPass = Integer.parseInt(args[3]);
-    int numberOfTermsPerQuery = Integer.parseInt(args[4]);
-    List<String> sampleOfTerms = getSampleOfTerms(connectionStr, tableName, numberOfTerms);
-    // for (String term : sampleOfTerms) {
-    // System.out.println(term);
-    // }
-    runSearches(connectionStr, tableName, sampleOfTerms, numberOfSearchesPerPass, numberOfTermsPerQuery);
-  }
-
-  private static void runSearches(String connectionStr, final String tableName, List<String> sampleOfTerms, int numberOfSearchesPerPass, int numberOfTermsPerQuery)
-      throws BlurException, TException, IOException {
-    Random random = new Random();
-    StringBuilder builder = new StringBuilder();
-    for (int i = 0; i < numberOfSearchesPerPass; i++) {
-
-      builder.setLength(0);
-      String query = generateQuery(builder, random, sampleOfTerms, numberOfTermsPerQuery);
-      System.out.println(query);
-      final BlurQuery blurQuery = new BlurQuery();
-      blurQuery.simpleQuery = new SimpleQuery();
-      blurQuery.simpleQuery.queryStr = query;
-      long start = System.nanoTime();
-
-      Iface client = BlurClient.getClient(connectionStr);
-      BlurResults results = client.query(tableName, blurQuery);
-      long end = System.nanoTime();
-      System.out.println((end - start) / 1000000.0 + " ms " + results.totalResults);
-    }
-  }
-
-  private static String generateQuery(StringBuilder builder, Random random, List<String> sampleOfTerms, int numberOfTermsPerQuery) {
-    for (int i = 0; i < numberOfTermsPerQuery; i++) {
-      builder.append(getRandomTerm(sampleOfTerms, random)).append(' ');
-    }
-    return builder.toString().trim();
-  }
-
-  private static String getRandomTerm(List<String> sampleOfTerms, Random random) {
-    int index = random.nextInt(sampleOfTerms.size());
-    return sampleOfTerms.get(index);
-  }
-
-  private static List<String> getSampleOfTerms(String connectionStr, String tableName, int numberOfTerms) throws BlurException, TException, IOException {
-    List<String> sampleOfTerms = new ArrayList<String>();
-    Set<String> fields = getFields(connectionStr, tableName);
-    for (String field : fields) {
-      Set<String> randomSampleOfTerms = getRandomSampleOfTerms(connectionStr, tableName, field, numberOfTerms);
-      for (String term : randomSampleOfTerms) {
-        sampleOfTerms.add(field + ":" + term);
-      }
-    }
-    Collections.shuffle(sampleOfTerms);
-    return sampleOfTerms;
-  }
-
-  private static Set<String> getRandomSampleOfTerms(String connectionStr, final String tableName, final String field, final int numberOfTerms) throws BlurException, TException,
-      IOException {
-    Iface client = BlurClient.getClient(connectionStr);
-    String[] split = field.split("\\.");
-    String columnFamily = split[0];
-    String columnName = split[1];
-    List<String> terms = client.terms(tableName, columnFamily, columnName, "", (short) numberOfTerms);
-    return new HashSet<String>(terms);
-  }
-
-  private static Set<String> getFields(String connectionStr, final String tableName) throws BlurException, TException, IOException {
-    Iface client = BlurClient.getClient(connectionStr);
-    Schema schema = client.schema(tableName);
-    Set<String> fields = new HashSet<String>();
-    for (String cf : schema.columnFamilies.keySet()) {
-      for (String field : schema.columnFamilies.get(cf)) {
-        fields.add(cf + "." + field);
-      }
-    }
-    return fields;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/c31fac17/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/RandomSearchTableContinuously.java
----------------------------------------------------------------------
diff --git a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/RandomSearchTableContinuously.java b/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/RandomSearchTableContinuously.java
deleted file mode 100644
index 9afd8ce..0000000
--- a/src/blur-testsuite/src/main/java/org/apache/blur/testsuite/RandomSearchTableContinuously.java
+++ /dev/null
@@ -1,161 +0,0 @@
-package org.apache.blur.testsuite;
-
-/**
- * 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.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Random;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.BlurClient;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.BlurQuery;
-import org.apache.blur.thrift.generated.BlurResults;
-import org.apache.blur.thrift.generated.Schema;
-import org.apache.blur.thrift.generated.Selector;
-import org.apache.blur.thrift.generated.SimpleQuery;
-import org.apache.blur.thrift.generated.Blur.Iface;
-
-
-public class RandomSearchTableContinuously {
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    if (args.length != 6) {
-      System.err
-          .println(RandomSearchTableContinuously.class.getName()
-              + " <host1:port1,host2:port2> <table name> <# of terms to load into memory per pass> <# of searches per pass> <# of terms per query> <time in seconds between reporting progress>");
-      System.exit(1);
-    }
-    final String connectionStr = args[0];
-    final String tableName = args[1];
-    final int numberOfTerms = Integer.parseInt(args[2]);
-    final int numberOfSearchesPerPass = Integer.parseInt(args[3]);
-    final int numberOfTermsPerQuery = Integer.parseInt(args[4]);
-    final long timeBetweenReporting = TimeUnit.SECONDS.toMillis(Integer.parseInt(args[5]));
-    List<String> sampleOfTerms = getSampleOfTerms(connectionStr, tableName, numberOfTerms);
-    while (true) {
-      runSearches(connectionStr, tableName, sampleOfTerms, numberOfSearchesPerPass, numberOfTermsPerQuery, timeBetweenReporting);
-    }
-  }
-
-  private static void runSearches(String connectionStr, final String tableName, List<String> sampleOfTerms, int numberOfSearchesPerPass, int numberOfTermsPerQuery,
-      long timeBetweenReporting) throws BlurException, TException, IOException {
-    Random random = new Random();
-    StringBuilder builder = new StringBuilder();
-    final long start = System.currentTimeMillis();
-    long s = start;
-    long responseTime = 0;
-    int count = 0;
-    long resultCount = 0;
-    Iface client = BlurClient.getClient(connectionStr);
-    int i;
-    for (i = 0; i < numberOfSearchesPerPass; i++) {
-      long now = System.currentTimeMillis();
-      if (s + timeBetweenReporting < now) {
-        double avgSeconds = (now - start) / 1000.0;
-        double seconds = (now - s) / 1000.0;
-        double avgRate = i / avgSeconds;
-        double rate = count / seconds;
-        double responseTimeAvg = (responseTime / (double) count) / 1000000.0;
-        System.out.println(System.currentTimeMillis() + "," + i + "," + responseTimeAvg + "," + rate + "," + avgRate + "," + resultCount + "," + getCount(client, tableName));
-        s = now;
-        responseTime = 0;
-        count = 0;
-        resultCount = 0;
-      }
-
-      builder.setLength(0);
-      String query = generateQuery(builder, random, sampleOfTerms, numberOfTermsPerQuery);
-      final BlurQuery blurQuery = new BlurQuery();
-      blurQuery.simpleQuery = new SimpleQuery();
-      blurQuery.simpleQuery.queryStr = query;
-      blurQuery.cacheResult = false;
-      blurQuery.selector = new Selector();
-      long qs = System.nanoTime();
-
-      BlurResults results = client.query(tableName, blurQuery);
-      long qe = System.nanoTime();
-      resultCount += results.totalResults;
-      responseTime += (qe - qs);
-      count++;
-    }
-  }
-
-  private static long getCount(Iface client, String tableName) throws BlurException, TException {
-    BlurQuery bq = new BlurQuery();
-    bq.simpleQuery = new SimpleQuery();
-    bq.simpleQuery.queryStr = "*";
-    bq.simpleQuery.superQueryOn = false;
-    bq.cacheResult = false;
-    bq.useCacheIfPresent = false;
-    BlurResults results = client.query(tableName, bq);
-    return results.totalResults;
-  }
-
-  private static String generateQuery(StringBuilder builder, Random random, List<String> sampleOfTerms, int numberOfTermsPerQuery) {
-    for (int i = 0; i < numberOfTermsPerQuery; i++) {
-      builder.append(getRandomTerm(sampleOfTerms, random)).append(' ');
-    }
-    return builder.toString().trim();
-  }
-
-  private static String getRandomTerm(List<String> sampleOfTerms, Random random) {
-    int index = random.nextInt(sampleOfTerms.size());
-    return sampleOfTerms.get(index);
-  }
-
-  private static List<String> getSampleOfTerms(String connectionStr, String tableName, int numberOfTerms) throws BlurException, TException, IOException {
-    List<String> sampleOfTerms = new ArrayList<String>();
-    Set<String> fields = getFields(connectionStr, tableName);
-    for (String field : fields) {
-      Set<String> randomSampleOfTerms = getRandomSampleOfTerms(connectionStr, tableName, field, numberOfTerms);
-      for (String term : randomSampleOfTerms) {
-        sampleOfTerms.add(field + ":" + term);
-      }
-    }
-    Collections.shuffle(sampleOfTerms);
-    return sampleOfTerms;
-  }
-
-  private static Set<String> getRandomSampleOfTerms(String connectionStr, final String tableName, final String field, final int numberOfTerms) throws BlurException, TException,
-      IOException {
-    Iface client = BlurClient.getClient(connectionStr);
-    String[] split = field.split("\\.");
-    String columnFamily = split[0];
-    String columnName = split[1];
-    List<String> terms = client.terms(tableName, columnFamily, columnName, "", (short) numberOfTerms);
-    return new HashSet<String>(terms);
-  }
-
-  private static Set<String> getFields(String connectionStr, final String tableName) throws BlurException, TException, IOException {
-    Iface client = BlurClient.getClient(connectionStr);
-    Schema schema = client.schema(tableName);
-    Set<String> fields = new HashSet<String>();
-    for (String cf : schema.columnFamilies.keySet()) {
-      for (String field : schema.columnFamilies.get(cf)) {
-        fields.add(cf + "." + field);
-      }
-    }
-    return fields;
-  }
-
-}


Mime
View raw message