incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Updated a few more things.
Date Thu, 04 Oct 2012 13:08:06 GMT
Updated Branches:
  refs/heads/new-api-prototype 5ea8d60ca -> 8651473d7


Updated a few more things.


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

Branch: refs/heads/new-api-prototype
Commit: 8651473d7e61956d6451c7708151014316fac376
Parents: 5ea8d60
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Thu Oct 4 09:07:42 2012 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Thu Oct 4 09:07:42 2012 -0400

----------------------------------------------------------------------
 src/blur-new-api-prototype/generateThrift.sh       |    1 +
 src/blur-new-api-prototype/pom.xml                 |    5 +-
 src/blur-new-api-prototype/service.thrift          |    1 +
 .../java/org/apache/blur/proto/LoadClient.java     |   43 -
 .../main/java/org/apache/blur/proto/RSession.java  |   18 +-
 .../java/org/apache/blur/proto/ReadClient.java     |   62 --
 .../org/apache/blur/proto/ReadClientBatch.java     |   74 --
 .../main/java/org/apache/blur/proto/Server.java    |   34 +
 .../src/main/java/org/apache/blur/proto/Util.java  |   16 +
 .../main/java/org/apache/blur/proto/WSession.java  |   21 +
 .../org/apache/blur/proto/WSessionThreaded.java    |   16 +
 .../blur/proto/example/clients/LoadClient.java     |   85 ++
 .../proto/example/clients/LoadClientBatch.java     |   94 ++
 .../blur/proto/example/clients/ReadClient.java     |   79 ++
 .../proto/example/clients/ReadClientBatch.java     |   92 ++
 .../apache/blur/thrift/generated/BlurTuple.java    |  806 +++++++++++++++
 src/blur-new-api-prototype/startServer.sh          |    2 +
 17 files changed, 1268 insertions(+), 181 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/generateThrift.sh
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/generateThrift.sh b/src/blur-new-api-prototype/generateThrift.sh
new file mode 100755
index 0000000..864c1af
--- /dev/null
+++ b/src/blur-new-api-prototype/generateThrift.sh
@@ -0,0 +1 @@
+thrift -out src/main/java/ --gen java service.thrift

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/pom.xml
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/pom.xml b/src/blur-new-api-prototype/pom.xml
index 548fd87..ad633d6 100644
--- a/src/blur-new-api-prototype/pom.xml
+++ b/src/blur-new-api-prototype/pom.xml
@@ -100,7 +100,10 @@
 						<target>1.6</target>
 					</configuration>
 				</plugin>
-
+				<plugin>
+					<groupId>org.codehaus.mojo</groupId>
+					<artifactId>exec-maven-plugin</artifactId>
+				</plugin>
 				<plugin>
 					<groupId>org.apache.maven.plugins</groupId>
 					<artifactId>maven-dependency-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/service.thrift
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/service.thrift b/src/blur-new-api-prototype/service.thrift
index 6889665..9197a37 100644
--- a/src/blur-new-api-prototype/service.thrift
+++ b/src/blur-new-api-prototype/service.thrift
@@ -54,6 +54,7 @@ service BlurTuple {
 
   WriteSession openWriteSession() throws (1:BlurException e)
   void writeTuple(1:WriteSession session, 2:Tuple tuple) throws (1:BlurException e)
+  void writeTuples(1:WriteSession session, 2:list<Tuple> tuples) throws (1:BlurException e)
   void commitWriteSession(1:WriteSession session) throws (1:BlurException e)
   void rollbackWriteSession(1:WriteSession session) throws (1:BlurException e)
   

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/LoadClient.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/LoadClient.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/LoadClient.java
deleted file mode 100644
index 3f0da07..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/LoadClient.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.apache.blur.proto;
-
-import java.io.IOException;
-import java.util.Random;
-
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.BlurTuple.Client;
-import org.apache.blur.thrift.generated.Tuple;
-import org.apache.blur.thrift.generated.WriteSession;
-import org.apache.thrift.TException;
-
-public class LoadClient {
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    final int length = 1000000;
-    ClientManager.execute("localhost:9000", new Command<Void>() {
-      @Override
-      public Void call(Client client) throws BlurException, TException {
-        WriteSession session = client.openWriteSession();
-        long s = System.currentTimeMillis();
-        Random random = new Random();
-        for (int i = 0; i < length; i++) {
-          Tuple tuple = new Tuple();
-          tuple.addToAttributes(Util.newAttribute("id0", Long.toString(random.nextLong())));
-          tuple.addToAttributes(Util.newAttribute("id1", Long.toString(random.nextLong())));
-          tuple.addToAttributes(Util.newAttribute("id2", Long.toString(random.nextLong())));
-          tuple.addToAttributes(Util.newAttribute("id3", Long.toString(random.nextLong())));
-          tuple.addToAttributes(Util.newAttribute("id4", Long.toString(random.nextLong())));
-          client.writeTuple(session, tuple);
-        }
-        long m = System.currentTimeMillis();
-        client.commitWriteSession(session);
-        long e = System.currentTimeMillis();
-        double rate = length /  ((m - s) / 1000.0);
-        System.out.println("Load time [" + (m - s) + "] at [" + rate + "/s]");
-        System.out.println("Commit time [" + (e - m) + "]");
-        return null;
-      }
-    });
-
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/RSession.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/RSession.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/RSession.java
index d83b940..0b13a53 100644
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/RSession.java
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/RSession.java
@@ -1,5 +1,21 @@
 package org.apache.blur.proto;
 
+/**
+ * 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.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
@@ -54,7 +70,7 @@ public class RSession {
     topDocs = searcher.search(query, fetch);
     totalHits = topDocs.totalHits;
   }
-  
+
   public int getTotalHits() {
     metaData = true;
     return totalHits;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/ReadClient.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/ReadClient.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/ReadClient.java
deleted file mode 100644
index 84eb280..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/ReadClient.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.apache.blur.proto;
-
-import java.io.IOException;
-
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.BlurTuple.Client;
-import org.apache.blur.thrift.generated.ReadResult;
-import org.apache.blur.thrift.generated.ReadSession;
-import org.apache.blur.thrift.generated.Tuple;
-import org.apache.thrift.TException;
-
-public class ReadClient {
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    ClientManager.execute("localhost:9000", new Command<Void>() {
-      @Override
-      public Void call(Client client) throws BlurException, TException {
-        ReadSession session = client.openReadSession();
-        client.executeQuery(session, "*");
-        while (true) {
-          ReadResult metaDataResult = client.nextMetaDataResult(session);
-          Tuple tuple = metaDataResult.getTuple();
-          if (tuple == null) {
-            break;
-          }
-          System.out.println(tuple);
-        }
-        long count = 0;
-        long total = 0;
-        long start = System.nanoTime();
-        long attributeCount = 0;
-        long attributeTotal = 0;
-        while (true) {
-          long now = System.nanoTime();
-          if (start + 5000000000L < now) {
-            double seconds = (now - start) / 1000000000.0;
-            double rate = count / seconds;
-            double attributeRate = attributeCount / seconds;
-            System.out.println("Tuple count [" + total + "] at [" + rate + "/s] Attribute Count [" + attributeTotal + "] at [" + attributeRate + "/s]");
-            start = System.nanoTime();
-            count = 0;
-            attributeCount = 0;
-          }
-          ReadResult result = client.nextResult(session);
-//          System.out.println(result.getTuple());
-          if (result.getTuple() == null) {
-            break;
-          }
-          count++;
-          total++;
-          int atCount = result.getTuple().getAttributes().size();
-          attributeCount += atCount;
-          attributeTotal += atCount;
-        }
-        client.closeReadSession(session);
-        return null;
-      }
-    });
-
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/ReadClientBatch.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/ReadClientBatch.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/ReadClientBatch.java
deleted file mode 100644
index 0674184..0000000
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/ReadClientBatch.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.apache.blur.proto;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.BlurTuple.Client;
-import org.apache.blur.thrift.generated.ReadResult;
-import org.apache.blur.thrift.generated.ReadSession;
-import org.apache.blur.thrift.generated.Tuple;
-import org.apache.thrift.TException;
-
-public class ReadClientBatch {
-
-  public static void main(String[] args) throws BlurException, TException, IOException {
-    ClientManager.execute("localhost:9000", new Command<Void>() {
-      @Override
-      public Void call(Client client) throws BlurException, TException {
-        ReadSession session = client.openReadSession();
-        // client.executeQuery(session, "id1:fb*");
-        client.executeQuery(session, "*");
-        while (true) {
-          ReadResult metaDataResult = client.nextMetaDataResult(session);
-          Tuple tuple = metaDataResult.getTuple();
-          if (tuple == null) {
-            break;
-          }
-          System.out.println(tuple);
-        }
-
-        long count = 0;
-        long total = 0;
-        long start = System.nanoTime();
-        long attributeCount = 0;
-        long attributeTotal = 0;
-        while (true) {
-          long now = System.nanoTime();
-          if (start + 5000000000L < now) {
-            double seconds = (now - start) / 1000000000.0;
-            double rate = count / seconds;
-            double attributeRate = attributeCount / seconds;
-            System.out.println("Tuple count [" + total + "] at [" + rate + "/s] Attribute Count [" + attributeTotal + "] at [" + attributeRate + "/s]");
-            start = System.nanoTime();
-            count = 0;
-            attributeCount = 0;
-          }
-          List<ReadResult> results = client.nextResults(session, 10);
-          // System.out.println(result.getDocument());
-          if (results.isEmpty()) {
-            break;
-          }
-          count += results.size();
-          total += results.size();
-          int atCount = 0;
-          for (ReadResult rr : results) {
-            atCount += rr.getTuple().getAttributes().size();
-          }
-          attributeCount += atCount;
-          attributeTotal += atCount;
-        }
-        client.closeReadSession(session);
-
-        long now = System.nanoTime();
-        double seconds = (now - start) / 1000000000.0;
-        double rate = count / seconds;
-        double attributeRate = attributeCount / seconds;
-        System.out.println("Tuple count [" + total + "] at [" + rate + "/s] Attribute Count [" + attributeTotal + "] at [" + attributeRate + "/s]");
-        return null;
-      }
-    });
-
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/Server.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/Server.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/Server.java
index a009b97..41ed74e 100644
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/Server.java
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/Server.java
@@ -1,5 +1,21 @@
 package org.apache.blur.proto;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import java.io.File;
 import java.io.IOException;
 import java.net.InetSocketAddress;
@@ -188,6 +204,16 @@ public class Server implements Iface {
   }
 
   @Override
+  public void writeTuples(WriteSession writeSession, List<Tuple> tuples) throws BlurException, TException {
+    try {
+      WSession session = writeSessions.get(writeSession.getSessionId());
+      session.addDocuments(convert(tuples));
+    } catch (Exception e) {
+      throw new BlurException();
+    }
+  }
+
+  @Override
   public void commitWriteSession(WriteSession writeSession) throws BlurException, TException {
     try {
       WSession session = writeSessions.remove(writeSession.getSessionId());
@@ -247,6 +273,14 @@ public class Server implements Iface {
     return tuple;
   }
 
+  private List<Document> convert(List<Tuple> tuples) {
+    List<Document> docs = new ArrayList<Document>();
+    for (Tuple tuple : tuples) {
+      docs.add(convert(tuple));
+    }
+    return docs;
+  }
+
   private RSession getSession(ReadSession readSession) throws BlurException {
     RSession session = readSessions.get(readSession.getSessionId());
     if (session == null) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/Util.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/Util.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/Util.java
index e21f8b9..9dfc7e9 100644
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/Util.java
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/Util.java
@@ -1,5 +1,21 @@
 package org.apache.blur.proto;
 
+/**
+ * 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.blur.thrift.generated.Attribute;
 import org.apache.blur.thrift.generated.TYPE;
 import org.apache.blur.thrift.generated.Value;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/WSession.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/WSession.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/WSession.java
index fdb564a..d674434 100644
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/WSession.java
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/WSession.java
@@ -1,7 +1,24 @@
 package org.apache.blur.proto;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import java.io.File;
 import java.io.IOException;
+import java.util.List;
 
 import org.apache.lucene.document.Document;
 import org.apache.lucene.index.IndexWriter;
@@ -28,6 +45,10 @@ public class WSession {
   public void addDocument(Document document) throws IOException {
     writer.addDocument(document);
   }
+  
+  public void addDocuments(List<Document> documents) throws IOException {
+    writer.addDocuments(documents);
+  }
 
   public void closeWriter() throws IOException {
     writer.close();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/WSessionThreaded.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/WSessionThreaded.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/WSessionThreaded.java
index b37226b..d9880ae 100644
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/WSessionThreaded.java
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/WSessionThreaded.java
@@ -1,5 +1,21 @@
 package org.apache.blur.proto;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/LoadClient.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/LoadClient.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/LoadClient.java
new file mode 100644
index 0000000..3361da9
--- /dev/null
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/LoadClient.java
@@ -0,0 +1,85 @@
+package org.apache.blur.proto.example.clients;
+
+/**
+ * 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.Random;
+
+import org.apache.blur.proto.ClientManager;
+import org.apache.blur.proto.Command;
+import org.apache.blur.proto.Util;
+import org.apache.blur.thrift.generated.BlurException;
+import org.apache.blur.thrift.generated.BlurTuple.Client;
+import org.apache.blur.thrift.generated.Tuple;
+import org.apache.blur.thrift.generated.WriteSession;
+import org.apache.thrift.TException;
+
+public class LoadClient {
+
+  public static void main(String[] args) throws BlurException, TException, IOException {
+    final int length = Integer.parseInt(args[0]);
+    final int fields = Integer.parseInt(args[1]);
+    ClientManager.execute("localhost:9000", new Command<Void>() {
+      @Override
+      public Void call(Client client) throws BlurException, TException {
+        WriteSession session = client.openWriteSession();
+        long s = System.currentTimeMillis();
+        Random random = new Random();
+
+        long count = 0;
+        long total = 0;
+        long start = System.nanoTime();
+        long attributeCount = 0;
+        long attributeTotal = 0;
+        
+        for (int i = 0; i < length; i++) {
+          long now = System.nanoTime();
+          if (start + 5000000000L < now) {
+            double seconds = (now - start) / 1000000000.0;
+            double rate = count / seconds;
+            double attributeRate = attributeCount / seconds;
+            System.out.println("Tuple count [" + total + "] at [" + rate + "/s] Attribute Count [" + attributeTotal + "] at [" + attributeRate + "/s]");
+            start = System.nanoTime();
+            count = 0;
+            attributeCount = 0;
+          }
+          
+          Tuple tuple = new Tuple();
+          for (int f = 0; f < fields; f++) {
+            tuple.addToAttributes(Util.newAttribute("id" + f, Long.toString(random.nextLong())));
+          }
+          client.writeTuple(session, tuple);
+          
+          count++;
+          total++;
+          int atCount = tuple.getAttributes().size();
+          attributeCount += atCount;
+          attributeTotal += atCount;
+        }
+        long m = System.currentTimeMillis();
+        client.commitWriteSession(session);
+        long e = System.currentTimeMillis();
+        double rate = length / ((m - s) / 1000.0);
+        System.out.println("Load time [" + (m - s) + "] at [" + rate + "/s]");
+        System.out.println("Commit time [" + (e - m) + "]");
+        return null;
+      }
+    });
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/LoadClientBatch.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/LoadClientBatch.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/LoadClientBatch.java
new file mode 100644
index 0000000..4f4a291
--- /dev/null
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/LoadClientBatch.java
@@ -0,0 +1,94 @@
+package org.apache.blur.proto.example.clients;
+
+/**
+ * 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.List;
+import java.util.Random;
+
+import org.apache.blur.proto.ClientManager;
+import org.apache.blur.proto.Command;
+import org.apache.blur.proto.Util;
+import org.apache.blur.thrift.generated.BlurException;
+import org.apache.blur.thrift.generated.BlurTuple.Client;
+import org.apache.blur.thrift.generated.Tuple;
+import org.apache.blur.thrift.generated.WriteSession;
+import org.apache.thrift.TException;
+
+public class LoadClientBatch {
+
+  public static void main(String[] args) throws BlurException, TException, IOException {
+    final int length = Integer.parseInt(args[0]);
+    final int fields = Integer.parseInt(args[1]);
+    final int batch = Integer.parseInt(args[2]);
+    ClientManager.execute("localhost:9000", new Command<Void>() {
+      @Override
+      public Void call(Client client) throws BlurException, TException {
+        WriteSession session = client.openWriteSession();
+        long s = System.currentTimeMillis();
+        Random random = new Random();
+        List<Tuple> tuples = new ArrayList<Tuple>();
+        
+        long count = 0;
+        long total = 0;
+        long start = System.nanoTime();
+        long attributeCount = 0;
+        long attributeTotal = 0;
+        
+        for (int i = 0; i < length; i++) {
+          long now = System.nanoTime();
+          if (start + 5000000000L < now) {
+            double seconds = (now - start) / 1000000000.0;
+            double rate = count / seconds;
+            double attributeRate = attributeCount / seconds;
+            System.out.println("Tuple count [" + total + "] at [" + rate + "/s] Attribute Count [" + attributeTotal + "] at [" + attributeRate + "/s]");
+            start = System.nanoTime();
+            count = 0;
+            attributeCount = 0;
+          }
+          
+          Tuple tuple = new Tuple();
+          for (int f = 0; f < fields; f++) {
+            tuple.addToAttributes(Util.newAttribute("id" + f, Long.toString(random.nextLong())));
+          }
+          tuples.add(tuple);
+          if (tuples.size() >= batch) {
+            client.writeTuples(session, tuples);
+            tuples.clear();
+          }
+          
+          count++;
+          total++;
+          int atCount = tuple.getAttributes().size();
+          attributeCount += atCount;
+          attributeTotal += atCount;
+        }
+        client.writeTuples(session, tuples);
+        long m = System.currentTimeMillis();
+        client.commitWriteSession(session);
+        long e = System.currentTimeMillis();
+        double rate = length / ((m - s) / 1000.0);
+        System.out.println("Load time [" + (m - s) + "] at [" + rate + "/s]");
+        System.out.println("Commit time [" + (e - m) + "]");
+        return null;
+      }
+    });
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/ReadClient.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/ReadClient.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/ReadClient.java
new file mode 100644
index 0000000..7495e72
--- /dev/null
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/ReadClient.java
@@ -0,0 +1,79 @@
+package org.apache.blur.proto.example.clients;
+/**
+ * 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.proto.ClientManager;
+import org.apache.blur.proto.Command;
+import org.apache.blur.thrift.generated.BlurException;
+import org.apache.blur.thrift.generated.BlurTuple.Client;
+import org.apache.blur.thrift.generated.ReadResult;
+import org.apache.blur.thrift.generated.ReadSession;
+import org.apache.blur.thrift.generated.Tuple;
+import org.apache.thrift.TException;
+
+public class ReadClient {
+
+  public static void main(String[] args) throws BlurException, TException, IOException {
+    ClientManager.execute("localhost:9000", new Command<Void>() {
+      @Override
+      public Void call(Client client) throws BlurException, TException {
+        ReadSession session = client.openReadSession();
+        client.executeQuery(session, "*");
+        while (true) {
+          ReadResult metaDataResult = client.nextMetaDataResult(session);
+          Tuple tuple = metaDataResult.getTuple();
+          if (tuple == null) {
+            break;
+          }
+          System.out.println(tuple);
+        }
+        long count = 0;
+        long total = 0;
+        long start = System.nanoTime();
+        long attributeCount = 0;
+        long attributeTotal = 0;
+        while (true) {
+          long now = System.nanoTime();
+          if (start + 5000000000L < now) {
+            double seconds = (now - start) / 1000000000.0;
+            double rate = count / seconds;
+            double attributeRate = attributeCount / seconds;
+            System.out.println("Tuple count [" + total + "] at [" + rate + "/s] Attribute Count [" + attributeTotal + "] at [" + attributeRate + "/s]");
+            start = System.nanoTime();
+            count = 0;
+            attributeCount = 0;
+          }
+          ReadResult result = client.nextResult(session);
+//          System.out.println(result.getTuple());
+          if (result.getTuple() == null) {
+            break;
+          }
+          count++;
+          total++;
+          int atCount = result.getTuple().getAttributes().size();
+          attributeCount += atCount;
+          attributeTotal += atCount;
+        }
+        client.closeReadSession(session);
+        return null;
+      }
+    });
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/ReadClientBatch.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/ReadClientBatch.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/ReadClientBatch.java
new file mode 100644
index 0000000..dcfca2e
--- /dev/null
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/proto/example/clients/ReadClientBatch.java
@@ -0,0 +1,92 @@
+package org.apache.blur.proto.example.clients;
+
+/**
+ * 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.List;
+
+import org.apache.blur.proto.ClientManager;
+import org.apache.blur.proto.Command;
+import org.apache.blur.thrift.generated.BlurException;
+import org.apache.blur.thrift.generated.BlurTuple.Client;
+import org.apache.blur.thrift.generated.ReadResult;
+import org.apache.blur.thrift.generated.ReadSession;
+import org.apache.blur.thrift.generated.Tuple;
+import org.apache.thrift.TException;
+
+public class ReadClientBatch {
+
+  public static void main(String[] args) throws BlurException, TException, IOException {
+    ClientManager.execute("localhost:9000", new Command<Void>() {
+      @Override
+      public Void call(Client client) throws BlurException, TException {
+        ReadSession session = client.openReadSession();
+        // client.executeQuery(session, "id1:fb*");
+        client.executeQuery(session, "*");
+        while (true) {
+          ReadResult metaDataResult = client.nextMetaDataResult(session);
+          Tuple tuple = metaDataResult.getTuple();
+          if (tuple == null) {
+            break;
+          }
+          System.out.println(tuple);
+        }
+
+        long count = 0;
+        long total = 0;
+        long start = System.nanoTime();
+        long attributeCount = 0;
+        long attributeTotal = 0;
+        while (true) {
+          long now = System.nanoTime();
+          if (start + 5000000000L < now) {
+            double seconds = (now - start) / 1000000000.0;
+            double rate = count / seconds;
+            double attributeRate = attributeCount / seconds;
+            System.out.println("Tuple count [" + total + "] at [" + rate + "/s] Attribute Count [" + attributeTotal + "] at [" + attributeRate + "/s]");
+            start = System.nanoTime();
+            count = 0;
+            attributeCount = 0;
+          }
+          List<ReadResult> results = client.nextResults(session, 10);
+          // System.out.println(result.getDocument());
+          if (results.isEmpty()) {
+            break;
+          }
+          count += results.size();
+          total += results.size();
+          int atCount = 0;
+          for (ReadResult rr : results) {
+            atCount += rr.getTuple().getAttributes().size();
+          }
+          attributeCount += atCount;
+          attributeTotal += atCount;
+        }
+        client.closeReadSession(session);
+
+        long now = System.nanoTime();
+        double seconds = (now - start) / 1000000000.0;
+        double rate = count / seconds;
+        double attributeRate = attributeCount / seconds;
+        System.out.println("Tuple count [" + total + "] at [" + rate + "/s] Attribute Count [" + attributeTotal + "] at [" + attributeRate + "/s]");
+        return null;
+      }
+    });
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/BlurTuple.java
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/BlurTuple.java b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/BlurTuple.java
index e8d0d6d..4250d75 100644
--- a/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/BlurTuple.java
+++ b/src/blur-new-api-prototype/src/main/java/org/apache/blur/thrift/generated/BlurTuple.java
@@ -42,6 +42,8 @@ public class BlurTuple {
 
     public void writeTuple(WriteSession session, Tuple tuple) throws BlurException, org.apache.thrift.TException;
 
+    public void writeTuples(WriteSession session, List<Tuple> tuples) throws BlurException, org.apache.thrift.TException;
+
     public void commitWriteSession(WriteSession session) throws BlurException, org.apache.thrift.TException;
 
     public void rollbackWriteSession(WriteSession session) throws BlurException, org.apache.thrift.TException;
@@ -68,6 +70,8 @@ public class BlurTuple {
 
     public void writeTuple(WriteSession session, Tuple tuple, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.writeTuple_call> resultHandler) throws org.apache.thrift.TException;
 
+    public void writeTuples(WriteSession session, List<Tuple> tuples, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.writeTuples_call> resultHandler) throws org.apache.thrift.TException;
+
     public void commitWriteSession(WriteSession session, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.commitWriteSession_call> resultHandler) throws org.apache.thrift.TException;
 
     public void rollbackWriteSession(WriteSession session, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.rollbackWriteSession_call> resultHandler) throws org.apache.thrift.TException;
@@ -321,6 +325,30 @@ public class BlurTuple {
       return;
     }
 
+    public void writeTuples(WriteSession session, List<Tuple> tuples) throws BlurException, org.apache.thrift.TException
+    {
+      send_writeTuples(session, tuples);
+      recv_writeTuples();
+    }
+
+    public void send_writeTuples(WriteSession session, List<Tuple> tuples) throws org.apache.thrift.TException
+    {
+      writeTuples_args args = new writeTuples_args();
+      args.setSession(session);
+      args.setTuples(tuples);
+      sendBase("writeTuples", args);
+    }
+
+    public void recv_writeTuples() throws BlurException, org.apache.thrift.TException
+    {
+      writeTuples_result result = new writeTuples_result();
+      receiveBase(result, "writeTuples");
+      if (result.e != null) {
+        throw result.e;
+      }
+      return;
+    }
+
     public void commitWriteSession(WriteSession session) throws BlurException, org.apache.thrift.TException
     {
       send_commitWriteSession(session);
@@ -679,6 +707,41 @@ public class BlurTuple {
       }
     }
 
+    public void writeTuples(WriteSession session, List<Tuple> tuples, org.apache.thrift.async.AsyncMethodCallback<writeTuples_call> resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      writeTuples_call method_call = new writeTuples_call(session, tuples, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class writeTuples_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private WriteSession session;
+      private List<Tuple> tuples;
+      public writeTuples_call(WriteSession session, List<Tuple> tuples, org.apache.thrift.async.AsyncMethodCallback<writeTuples_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.session = session;
+        this.tuples = tuples;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeTuples", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        writeTuples_args args = new writeTuples_args();
+        args.setSession(session);
+        args.setTuples(tuples);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public void getResult() throws BlurException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        (new Client(prot)).recv_writeTuples();
+      }
+    }
+
     public void commitWriteSession(WriteSession session, org.apache.thrift.async.AsyncMethodCallback<commitWriteSession_call> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       commitWriteSession_call method_call = new commitWriteSession_call(session, resultHandler, this, ___protocolFactory, ___transport);
@@ -765,6 +828,7 @@ public class BlurTuple {
       processMap.put("closeReadSession", new closeReadSession());
       processMap.put("openWriteSession", new openWriteSession());
       processMap.put("writeTuple", new writeTuple());
+      processMap.put("writeTuples", new writeTuples());
       processMap.put("commitWriteSession", new commitWriteSession());
       processMap.put("rollbackWriteSession", new rollbackWriteSession());
       return processMap;
@@ -950,6 +1014,26 @@ public class BlurTuple {
       }
     }
 
+    private static class writeTuples<I extends Iface> extends org.apache.thrift.ProcessFunction<I, writeTuples_args> {
+      public writeTuples() {
+        super("writeTuples");
+      }
+
+      protected writeTuples_args getEmptyArgsInstance() {
+        return new writeTuples_args();
+      }
+
+      protected writeTuples_result getResult(I iface, writeTuples_args args) throws org.apache.thrift.TException {
+        writeTuples_result result = new writeTuples_result();
+        try {
+          iface.writeTuples(args.session, args.tuples);
+        } catch (BlurException e) {
+          result.e = e;
+        }
+        return result;
+      }
+    }
+
     private static class commitWriteSession<I extends Iface> extends org.apache.thrift.ProcessFunction<I, commitWriteSession_args> {
       public commitWriteSession() {
         super("commitWriteSession");
@@ -7120,6 +7204,728 @@ public class BlurTuple {
 
   }
 
+  public static class writeTuples_args implements org.apache.thrift.TBase<writeTuples_args, writeTuples_args._Fields>, java.io.Serializable, Cloneable   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeTuples_args");
+
+    private static final org.apache.thrift.protocol.TField SESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("session", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+    private static final org.apache.thrift.protocol.TField TUPLES_FIELD_DESC = new org.apache.thrift.protocol.TField("tuples", org.apache.thrift.protocol.TType.LIST, (short)2);
+
+    public WriteSession session; // required
+    public List<Tuple> tuples; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      SESSION((short)1, "session"),
+      TUPLES((short)2, "tuples");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // SESSION
+            return SESSION;
+          case 2: // TUPLES
+            return TUPLES;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.SESSION, new org.apache.thrift.meta_data.FieldMetaData("session", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WriteSession.class)));
+      tmpMap.put(_Fields.TUPLES, new org.apache.thrift.meta_data.FieldMetaData("tuples", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Tuple.class))));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeTuples_args.class, metaDataMap);
+    }
+
+    public writeTuples_args() {
+    }
+
+    public writeTuples_args(
+      WriteSession session,
+      List<Tuple> tuples)
+    {
+      this();
+      this.session = session;
+      this.tuples = tuples;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public writeTuples_args(writeTuples_args other) {
+      if (other.isSetSession()) {
+        this.session = new WriteSession(other.session);
+      }
+      if (other.isSetTuples()) {
+        List<Tuple> __this__tuples = new ArrayList<Tuple>();
+        for (Tuple other_element : other.tuples) {
+          __this__tuples.add(new Tuple(other_element));
+        }
+        this.tuples = __this__tuples;
+      }
+    }
+
+    public writeTuples_args deepCopy() {
+      return new writeTuples_args(this);
+    }
+
+    @Override
+    public void clear() {
+      this.session = null;
+      this.tuples = null;
+    }
+
+    public WriteSession getSession() {
+      return this.session;
+    }
+
+    public writeTuples_args setSession(WriteSession session) {
+      this.session = session;
+      return this;
+    }
+
+    public void unsetSession() {
+      this.session = null;
+    }
+
+    /** Returns true if field session is set (has been assigned a value) and false otherwise */
+    public boolean isSetSession() {
+      return this.session != null;
+    }
+
+    public void setSessionIsSet(boolean value) {
+      if (!value) {
+        this.session = null;
+      }
+    }
+
+    public int getTuplesSize() {
+      return (this.tuples == null) ? 0 : this.tuples.size();
+    }
+
+    public java.util.Iterator<Tuple> getTuplesIterator() {
+      return (this.tuples == null) ? null : this.tuples.iterator();
+    }
+
+    public void addToTuples(Tuple elem) {
+      if (this.tuples == null) {
+        this.tuples = new ArrayList<Tuple>();
+      }
+      this.tuples.add(elem);
+    }
+
+    public List<Tuple> getTuples() {
+      return this.tuples;
+    }
+
+    public writeTuples_args setTuples(List<Tuple> tuples) {
+      this.tuples = tuples;
+      return this;
+    }
+
+    public void unsetTuples() {
+      this.tuples = null;
+    }
+
+    /** Returns true if field tuples is set (has been assigned a value) and false otherwise */
+    public boolean isSetTuples() {
+      return this.tuples != null;
+    }
+
+    public void setTuplesIsSet(boolean value) {
+      if (!value) {
+        this.tuples = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case SESSION:
+        if (value == null) {
+          unsetSession();
+        } else {
+          setSession((WriteSession)value);
+        }
+        break;
+
+      case TUPLES:
+        if (value == null) {
+          unsetTuples();
+        } else {
+          setTuples((List<Tuple>)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case SESSION:
+        return getSession();
+
+      case TUPLES:
+        return getTuples();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case SESSION:
+        return isSetSession();
+      case TUPLES:
+        return isSetTuples();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof writeTuples_args)
+        return this.equals((writeTuples_args)that);
+      return false;
+    }
+
+    public boolean equals(writeTuples_args that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_session = true && this.isSetSession();
+      boolean that_present_session = true && that.isSetSession();
+      if (this_present_session || that_present_session) {
+        if (!(this_present_session && that_present_session))
+          return false;
+        if (!this.session.equals(that.session))
+          return false;
+      }
+
+      boolean this_present_tuples = true && this.isSetTuples();
+      boolean that_present_tuples = true && that.isSetTuples();
+      if (this_present_tuples || that_present_tuples) {
+        if (!(this_present_tuples && that_present_tuples))
+          return false;
+        if (!this.tuples.equals(that.tuples))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    public int compareTo(writeTuples_args other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+      writeTuples_args typedOther = (writeTuples_args)other;
+
+      lastComparison = Boolean.valueOf(isSetSession()).compareTo(typedOther.isSetSession());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetSession()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session, typedOther.session);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      lastComparison = Boolean.valueOf(isSetTuples()).compareTo(typedOther.isSetTuples());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetTuples()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tuples, typedOther.tuples);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (field.id) {
+          case 1: // SESSION
+            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+              this.session = new WriteSession();
+              this.session.read(iprot);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          case 2: // TUPLES
+            if (field.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
+                this.tuples = new ArrayList<Tuple>(_list12.size);
+                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
+                {
+                  Tuple _elem14; // required
+                  _elem14 = new Tuple();
+                  _elem14.read(iprot);
+                  this.tuples.add(_elem14);
+                }
+                iprot.readListEnd();
+              }
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (this.session != null) {
+        oprot.writeFieldBegin(SESSION_FIELD_DESC);
+        this.session.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (this.tuples != null) {
+        oprot.writeFieldBegin(TUPLES_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.tuples.size()));
+          for (Tuple _iter15 : this.tuples)
+          {
+            _iter15.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("writeTuples_args(");
+      boolean first = true;
+
+      sb.append("session:");
+      if (this.session == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.session);
+      }
+      first = false;
+      if (!first) sb.append(", ");
+      sb.append("tuples:");
+      if (this.tuples == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.tuples);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+  }
+
+  public static class writeTuples_result implements org.apache.thrift.TBase<writeTuples_result, writeTuples_result._Fields>, java.io.Serializable, Cloneable   {
+    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeTuples_result");
+
+    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+    public BlurException e; // required
+
+    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+      E((short)1, "e");
+
+      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+      static {
+        for (_Fields field : EnumSet.allOf(_Fields.class)) {
+          byName.put(field.getFieldName(), field);
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, or null if its not found.
+       */
+      public static _Fields findByThriftId(int fieldId) {
+        switch(fieldId) {
+          case 1: // E
+            return E;
+          default:
+            return null;
+        }
+      }
+
+      /**
+       * Find the _Fields constant that matches fieldId, throwing an exception
+       * if it is not found.
+       */
+      public static _Fields findByThriftIdOrThrow(int fieldId) {
+        _Fields fields = findByThriftId(fieldId);
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        return fields;
+      }
+
+      /**
+       * Find the _Fields constant that matches name, or null if its not found.
+       */
+      public static _Fields findByName(String name) {
+        return byName.get(name);
+      }
+
+      private final short _thriftId;
+      private final String _fieldName;
+
+      _Fields(short thriftId, String fieldName) {
+        _thriftId = thriftId;
+        _fieldName = fieldName;
+      }
+
+      public short getThriftFieldId() {
+        return _thriftId;
+      }
+
+      public String getFieldName() {
+        return _fieldName;
+      }
+    }
+
+    // isset id assignments
+
+    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+    static {
+      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+      metaDataMap = Collections.unmodifiableMap(tmpMap);
+      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeTuples_result.class, metaDataMap);
+    }
+
+    public writeTuples_result() {
+    }
+
+    public writeTuples_result(
+      BlurException e)
+    {
+      this();
+      this.e = e;
+    }
+
+    /**
+     * Performs a deep copy on <i>other</i>.
+     */
+    public writeTuples_result(writeTuples_result other) {
+      if (other.isSetE()) {
+        this.e = new BlurException(other.e);
+      }
+    }
+
+    public writeTuples_result deepCopy() {
+      return new writeTuples_result(this);
+    }
+
+    @Override
+    public void clear() {
+      this.e = null;
+    }
+
+    public BlurException getE() {
+      return this.e;
+    }
+
+    public writeTuples_result setE(BlurException e) {
+      this.e = e;
+      return this;
+    }
+
+    public void unsetE() {
+      this.e = null;
+    }
+
+    /** Returns true if field e is set (has been assigned a value) and false otherwise */
+    public boolean isSetE() {
+      return this.e != null;
+    }
+
+    public void setEIsSet(boolean value) {
+      if (!value) {
+        this.e = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, Object value) {
+      switch (field) {
+      case E:
+        if (value == null) {
+          unsetE();
+        } else {
+          setE((BlurException)value);
+        }
+        break;
+
+      }
+    }
+
+    public Object getFieldValue(_Fields field) {
+      switch (field) {
+      case E:
+        return getE();
+
+      }
+      throw new IllegalStateException();
+    }
+
+    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+    public boolean isSet(_Fields field) {
+      if (field == null) {
+        throw new IllegalArgumentException();
+      }
+
+      switch (field) {
+      case E:
+        return isSetE();
+      }
+      throw new IllegalStateException();
+    }
+
+    @Override
+    public boolean equals(Object that) {
+      if (that == null)
+        return false;
+      if (that instanceof writeTuples_result)
+        return this.equals((writeTuples_result)that);
+      return false;
+    }
+
+    public boolean equals(writeTuples_result that) {
+      if (that == null)
+        return false;
+
+      boolean this_present_e = true && this.isSetE();
+      boolean that_present_e = true && that.isSetE();
+      if (this_present_e || that_present_e) {
+        if (!(this_present_e && that_present_e))
+          return false;
+        if (!this.e.equals(that.e))
+          return false;
+      }
+
+      return true;
+    }
+
+    @Override
+    public int hashCode() {
+      return 0;
+    }
+
+    public int compareTo(writeTuples_result other) {
+      if (!getClass().equals(other.getClass())) {
+        return getClass().getName().compareTo(other.getClass().getName());
+      }
+
+      int lastComparison = 0;
+      writeTuples_result typedOther = (writeTuples_result)other;
+
+      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetE()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
+      return 0;
+    }
+
+    public _Fields fieldForId(int fieldId) {
+      return _Fields.findByThriftId(fieldId);
+    }
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField field;
+      iprot.readStructBegin();
+      while (true)
+      {
+        field = iprot.readFieldBegin();
+        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (field.id) {
+          case 1: // E
+            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
+              this.e = new BlurException();
+              this.e.read(iprot);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+
+      // check for required fields of primitive type, which can't be checked in the validate method
+      validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+      oprot.writeStructBegin(STRUCT_DESC);
+
+      if (this.isSetE()) {
+        oprot.writeFieldBegin(E_FIELD_DESC);
+        this.e.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+    @Override
+    public String toString() {
+      StringBuilder sb = new StringBuilder("writeTuples_result(");
+      boolean first = true;
+
+      sb.append("e:");
+      if (this.e == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.e);
+      }
+      first = false;
+      sb.append(")");
+      return sb.toString();
+    }
+
+    public void validate() throws org.apache.thrift.TException {
+      // check for required fields
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+      try {
+        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+      try {
+        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+      } catch (org.apache.thrift.TException te) {
+        throw new java.io.IOException(te);
+      }
+    }
+
+  }
+
   public static class commitWriteSession_args implements org.apache.thrift.TBase<commitWriteSession_args, commitWriteSession_args._Fields>, java.io.Serializable, Cloneable   {
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("commitWriteSession_args");
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8651473d/src/blur-new-api-prototype/startServer.sh
----------------------------------------------------------------------
diff --git a/src/blur-new-api-prototype/startServer.sh b/src/blur-new-api-prototype/startServer.sh
new file mode 100755
index 0000000..08846cd
--- /dev/null
+++ b/src/blur-new-api-prototype/startServer.sh
@@ -0,0 +1,2 @@
+mvn install
+mvn exec:java -Dexec.mainClass="org.apache.blur.proto.Server" -Dexec.args="./index"


Mime
View raw message