incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [3/6] Adding the the enqueueMutate method through the Blur API stack. Still need to finish the TableQueueReader running in the controller for listening to logical queues.
Date Thu, 06 Mar 2014 21:40:43 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8de60c97/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java
----------------------------------------------------------------------
diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java
b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java
index eb8a126..7a7249a 100644
--- a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java
+++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/SafeClientGen.java
@@ -125,6 +125,20 @@ public void enableTable(java.lang.String arg0) throws org.apache.blur.thrift.gen
 }
 
 @Override
+public void enqueueMutate(org.apache.blur.thrift.generated.RowMutation arg0) throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
+  _lock.errorFailLock(); try {
+    super.enqueueMutate(arg0);
+  } finally {_lock.unlock();}
+}
+
+@Override
+public void enqueueMutateBatch(java.util.List arg0) throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
+  _lock.errorFailLock(); try {
+    super.enqueueMutateBatch(arg0);
+  } finally {_lock.unlock();}
+}
+
+@Override
 public org.apache.blur.thrift.generated.FetchResult fetchRow(java.lang.String arg0, org.apache.blur.thrift.generated.Selector
arg1) throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
{
   _lock.errorFailLock(); try {
     return super.fetchRow(arg0, arg1);
@@ -153,6 +167,13 @@ public java.util.Map listSnapshots(java.lang.String arg0) throws org.apache.blur
 }
 
 @Override
+public void logging(java.lang.String arg0, org.apache.blur.thrift.generated.Level arg1) throws
org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    super.logging(arg0, arg1);
+  } finally {_lock.unlock();}
+}
+
+@Override
 public java.util.Map metrics(java.util.Set arg0) throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
   _lock.errorFailLock(); try {
     return super.metrics(arg0);
@@ -286,6 +307,20 @@ public void recv_enableTable() throws org.apache.blur.thrift.generated.BlurExcep
 }
 
 @Override
+public void recv_enqueueMutate() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    super.recv_enqueueMutate();
+  } finally {_lock.unlock();}
+}
+
+@Override
+public void recv_enqueueMutateBatch() throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
+  _lock.errorFailLock(); try {
+    super.recv_enqueueMutateBatch();
+  } finally {_lock.unlock();}
+}
+
+@Override
 public org.apache.blur.thrift.generated.FetchResult recv_fetchRow() throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
   _lock.errorFailLock(); try {
     return super.recv_fetchRow();
@@ -314,6 +349,13 @@ public java.util.Map recv_listSnapshots() throws org.apache.blur.thrift.generate
 }
 
 @Override
+public void recv_logging() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    super.recv_logging();
+  } finally {_lock.unlock();}
+}
+
+@Override
 public java.util.Map recv_metrics() throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
   _lock.errorFailLock(); try {
     return super.recv_metrics();
@@ -398,6 +440,13 @@ public void recv_removeTable() throws org.apache.blur.thrift.generated.BlurExcep
 }
 
 @Override
+public void recv_resetLogging() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    super.recv_resetLogging();
+  } finally {_lock.unlock();}
+}
+
+@Override
 public org.apache.blur.thrift.generated.Schema recv_schema() throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
   _lock.errorFailLock(); try {
     return super.recv_schema();
@@ -503,6 +552,13 @@ public void removeTable(java.lang.String arg0, boolean arg1) throws org.apache.b
 }
 
 @Override
+public void resetLogging() throws org.apache.blur.thrift.generated.BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    super.resetLogging();
+  } finally {_lock.unlock();}
+}
+
+@Override
 public org.apache.blur.thrift.generated.Schema schema(java.lang.String arg0) throws org.apache.blur.thrift.generated.BlurException,
org.apache.blur.thirdparty.thrift_0_9_0.TException {
   _lock.errorFailLock(); try {
     return super.schema(arg0);
@@ -573,6 +629,20 @@ public void send_enableTable(java.lang.String arg0) throws org.apache.blur.third
 }
 
 @Override
+public void send_enqueueMutate(org.apache.blur.thrift.generated.RowMutation arg0) throws
org.apache.blur.thirdparty.thrift_0_9_0.TException {
+  _lock.errorFailLock(); try {
+    super.send_enqueueMutate(arg0);
+  } finally {_lock.unlock();}
+}
+
+@Override
+public void send_enqueueMutateBatch(java.util.List arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    super.send_enqueueMutateBatch(arg0);
+  } finally {_lock.unlock();}
+}
+
+@Override
 public void send_fetchRow(java.lang.String arg0, org.apache.blur.thrift.generated.Selector
arg1) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
   _lock.errorFailLock(); try {
     super.send_fetchRow(arg0, arg1);
@@ -601,6 +671,13 @@ public void send_listSnapshots(java.lang.String arg0) throws org.apache.blur.thi
 }
 
 @Override
+public void send_logging(java.lang.String arg0, org.apache.blur.thrift.generated.Level arg1)
throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+  _lock.errorFailLock(); try {
+    super.send_logging(arg0, arg1);
+  } finally {_lock.unlock();}
+}
+
+@Override
 public void send_metrics(java.util.Set arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException
{
   _lock.errorFailLock(); try {
     super.send_metrics(arg0);
@@ -685,6 +762,13 @@ public void send_removeTable(java.lang.String arg0, boolean arg1) throws
org.apa
 }
 
 @Override
+public void send_resetLogging() throws org.apache.blur.thirdparty.thrift_0_9_0.TException
{
+  _lock.errorFailLock(); try {
+    super.send_resetLogging();
+  } finally {_lock.unlock();}
+}
+
+@Override
 public void send_schema(java.lang.String arg0) throws org.apache.blur.thirdparty.thrift_0_9_0.TException
{
   _lock.errorFailLock(); try {
     super.send_schema(arg0);

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8de60c97/blur-thrift/src/main/java/org/apache/blur/thrift/util/LoadData.java
----------------------------------------------------------------------
diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/util/LoadData.java b/blur-thrift/src/main/java/org/apache/blur/thrift/util/LoadData.java
index 477396a..ceac9f6 100644
--- a/blur-thrift/src/main/java/org/apache/blur/thrift/util/LoadData.java
+++ b/blur-thrift/src/main/java/org/apache/blur/thrift/util/LoadData.java
@@ -53,11 +53,11 @@ public class LoadData {
     String connectionString = args[0];
     String table = args[1];
     Iface client = BlurClient.getClient(connectionString);
-    runLoad(client, table, numberRows, numberRecordsPerRow, numberOfFamilies, numberOfColumns,
numberOfWords,
+    runLoad(client, false, table, numberRows, numberRecordsPerRow, numberOfFamilies, numberOfColumns,
numberOfWords,
         batch, new PrintWriter(System.out));
   }
 
-  public static void runLoad(Iface client, String table, int numberRows, int numberRecordsPerRow,
+  public static void runLoad(Iface client, boolean enqueue, String table, int numberRows,
int numberRecordsPerRow,
       int numberOfFamilies, int numberOfColumns, int numberOfWords, int batch, PrintWriter
out) throws IOException,
       BlurException, TException {
     loadWords();
@@ -90,18 +90,30 @@ public class LoadData {
         countRecord++;
       }
       if (batch == 1) {
-        client.mutate(mutation);
+        if (enqueue) {
+          client.enqueueMutate(mutation);
+        } else {
+          client.mutate(mutation);
+        }
       } else {
         mutations.add(mutation);
         if (mutations.size() >= batch) {
-          client.mutateBatch(mutations);
+          if (enqueue) {
+            client.enqueueMutateBatch(mutations);
+          } else {
+            client.mutateBatch(mutations);
+          }
           mutations.clear();
         }
       }
       countRow++;
     }
     if (!mutations.isEmpty()) {
-      client.mutateBatch(mutations);
+      if (enqueue) {
+        client.enqueueMutateBatch(mutations);
+      } else {
+        client.mutateBatch(mutations);
+      }
     }
     printPerformance(out, countRow, countRecord, start, s, numberRows);
   }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8de60c97/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
----------------------------------------------------------------------
diff --git a/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java b/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
index 95052da..9d7b3e7 100644
--- a/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
+++ b/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
@@ -41,6 +41,10 @@ public class BlurConstants {
   public static final String BLUR_SHARD_INDEX_QUEUE_READER_BACKOFF = "blur.shard.index.queue.reader.backoff";
   public static final String BLUR_SHARD_INDEX_QUEUE_READER_MAX = "blur.shard.index.queue.reader.max";
   
+  public static final String BLUR_TABLE_INDEX_QUEUE_READER_CLASS = "blur.table.index.queue.reader.class";
+  public static final String BLUR_TABLE_INDEX_QUEUE_READER_BACKOFF = "blur.table.index.queue.reader.backoff";
+  public static final String BLUR_TABLE_INDEX_QUEUE_READER_MAX = "blur.table.index.queue.reader.max";
+  
   public static final String FAST_DECOMPRESSION = "FAST_DECOMPRESSION";
   public static final String FAST = "FAST";
   public static final String HIGH_COMPRESSION = "HIGH_COMPRESSION";

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8de60c97/distribution/src/main/scripts/interface/Blur.thrift
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/Blur.thrift b/distribution/src/main/scripts/interface/Blur.thrift
index c632487..ad608d7 100644
--- a/distribution/src/main/scripts/interface/Blur.thrift
+++ b/distribution/src/main/scripts/interface/Blur.thrift
@@ -1012,6 +1012,14 @@ service Blur {
   ) throws (1:BlurException ex)
 
   /**
+   * Enqueue a RowMutation. Note that the effect of the RowMutation will occur at some point
in the future, volume and load will play a role in how much time will pass before the mutation
goes into effect.
+   */
+  void enqueueMutate(
+    /** the RowMutation.*/
+    1:RowMutation mutation
+  ) throws (1:BlurException ex)
+
+  /**
    * Mutates a group of Rows given the list of RowMutations that are provided.  Note: This
is not an atomic operation.
    */
   void mutateBatch(
@@ -1020,6 +1028,14 @@ service Blur {
   ) throws (1:BlurException ex)
 
   /**
+   * Enqueue a batch of RowMutations. Note that the effect of the RowMutation will occur
at some point in the future, volume and load will play a role in how much time will pass before
the mutation goes into effect.
+   */
+  void enqueueMutateBatch(
+    /** the batch of RowMutations.*/
+    1:list<RowMutation> mutations
+  ) throws (1:BlurException ex)
+
+  /**
    * Cancels a query that is executing against the given table with the given uuid.  Note,
the 
    * cancel call maybe take some time for the query actually stops executing.
    */

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8de60c97/distribution/src/main/scripts/interface/gen-html/Blur.html
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-html/Blur.html b/distribution/src/main/scripts/interface/gen-html/Blur.html
index 3c0668f..50a684e 100644
--- a/distribution/src/main/scripts/interface/gen-html/Blur.html
+++ b/distribution/src/main/scripts/interface/gen-html/Blur.html
@@ -20,6 +20,8 @@
 <li><a href="Blur.html#Fn_Blur_describe">describe</a></li>
 <li><a href="Blur.html#Fn_Blur_disableTable">disableTable</a></li>
 <li><a href="Blur.html#Fn_Blur_enableTable">enableTable</a></li>
+<li><a href="Blur.html#Fn_Blur_enqueueMutate">enqueueMutate</a></li>
+<li><a href="Blur.html#Fn_Blur_enqueueMutateBatch">enqueueMutateBatch</a></li>
 <li><a href="Blur.html#Fn_Blur_fetchRow">fetchRow</a></li>
 <li><a href="Blur.html#Fn_Blur_fetchRowBatch">fetchRowBatch</a></li>
 <li><a href="Blur.html#Fn_Blur_isInSafeMode">isInSafeMode</a></li>
@@ -737,6 +739,13 @@ the shard server, if any.
 <br/><br/><h4 id="Parameters_Blur_mutate">Parameters</h4>
 <table class="table-bordered table-striped table-condensed"><thead><th>Name</th><th>Description</th></thead><tr><td>mutation</td><td>the
RowMutation.
 </td></tr>
+</table></div><div class="definition"><h4 id="Fn_Blur_enqueueMutate">Function:
Blur.enqueueMutate</h4>
+<pre><code>void</code> enqueueMutate(<code><a href="Blur.html#Struct_RowMutation">RowMutation</a></code>
mutation)
+    throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
+</pre>Enqueue a RowMutation. Note that the effect of the RowMutation will occur at
some point in the future, volume and load will play a role in how much time will pass before
the mutation goes into effect.
+<br/><br/><h4 id="Parameters_Blur_enqueueMutate">Parameters</h4>
+<table class="table-bordered table-striped table-condensed"><thead><th>Name</th><th>Description</th></thead><tr><td>mutation</td><td>the
RowMutation.
+</td></tr>
 </table></div><div class="definition"><h4 id="Fn_Blur_mutateBatch">Function:
Blur.mutateBatch</h4>
 <pre><code>void</code> mutateBatch(<code>list&lt;<code><a
href="Blur.html#Struct_RowMutation">RowMutation</a></code>&gt;</code>
mutations)
     throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
@@ -744,6 +753,13 @@ the shard server, if any.
 <br/><br/><h4 id="Parameters_Blur_mutateBatch">Parameters</h4>
 <table class="table-bordered table-striped table-condensed"><thead><th>Name</th><th>Description</th></thead><tr><td>mutations</td><td>the
batch of RowMutations.
 </td></tr>
+</table></div><div class="definition"><h4 id="Fn_Blur_enqueueMutateBatch">Function:
Blur.enqueueMutateBatch</h4>
+<pre><code>void</code> enqueueMutateBatch(<code>list&lt;<code><a
href="Blur.html#Struct_RowMutation">RowMutation</a></code>&gt;</code>
mutations)
+    throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
+</pre>Enqueue a batch of RowMutations. Note that the effect of the RowMutation will
occur at some point in the future, volume and load will play a role in how much time will
pass before the mutation goes into effect.
+<br/><br/><h4 id="Parameters_Blur_enqueueMutateBatch">Parameters</h4>
+<table class="table-bordered table-striped table-condensed"><thead><th>Name</th><th>Description</th></thead><tr><td>mutations</td><td>the
batch of RowMutations.
+</td></tr>
 </table></div><div class="definition"><h4 id="Fn_Blur_cancelQuery">Function:
Blur.cancelQuery</h4>
 <pre><code>void</code> cancelQuery(<code>string</code> table,
                  <code>string</code> uuid)

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8de60c97/distribution/src/main/scripts/interface/gen-html/index.html
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-html/index.html b/distribution/src/main/scripts/interface/gen-html/index.html
index d11ed9a..b9834e3 100644
--- a/distribution/src/main/scripts/interface/gen-html/index.html
+++ b/distribution/src/main/scripts/interface/gen-html/index.html
@@ -16,6 +16,8 @@
 <li><a href="Blur.html#Fn_Blur_describe">describe</a></li>
 <li><a href="Blur.html#Fn_Blur_disableTable">disableTable</a></li>
 <li><a href="Blur.html#Fn_Blur_enableTable">enableTable</a></li>
+<li><a href="Blur.html#Fn_Blur_enqueueMutate">enqueueMutate</a></li>
+<li><a href="Blur.html#Fn_Blur_enqueueMutateBatch">enqueueMutateBatch</a></li>
 <li><a href="Blur.html#Fn_Blur_fetchRow">fetchRow</a></li>
 <li><a href="Blur.html#Fn_Blur_fetchRowBatch">fetchRowBatch</a></li>
 <li><a href="Blur.html#Fn_Blur_isInSafeMode">isInSafeMode</a></li>


Mime
View raw message