incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [15/51] [abbrv] git commit: Added a new method during mutations, block waiting for visibility. This allows the client to perform a lot of updates and collect the generation information and then block once for all the mutations.
Date Tue, 11 Dec 2012 02:20:59 GMT
Added a new method during mutations, block waiting for visibility.  This allows the client
to perform a lot of updates and collect the generation information and then block once for
all the mutations.


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

Branch: refs/heads/0.2-dev
Commit: ce72e54441676c5cfe2f407a81ce7ae8198723c0
Parents: 7821c8f
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sat Nov 24 21:32:54 2012 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sat Nov 24 21:32:54 2012 -0500

----------------------------------------------------------------------
 interface/Blur.thrift                              |   16 +-
 interface/gen-html/Blur.html                       |   31 +-
 interface/gen-html/index.html                      |    2 +
 .../org/apache/blur/thrift/generated/Blur.java     | 2280 ++++++++++++---
 .../apache/blur/thrift/generated/Generation.java   |  597 ++++
 interface/gen-perl/Blur/Blur.pm                    |  565 +++-
 interface/gen-perl/Blur/Types.pm                   |   94 +
 interface/gen-rb/blur.rb                           |   94 +-
 interface/gen-rb/blur_types.rb                     |   20 +
 .../org/apache/blur/manager/writer/BlurIndex.java  |    9 +-
 .../blur/manager/writer/BlurIndexReader.java       |   13 +-
 .../apache/blur/manager/writer/BlurNRTIndex.java   |   25 +-
 .../org/apache/blur/thrift/BlurShardServer.java    |  136 +-
 .../org/apache/blur/thrift/ITBlurClusterTest.java  |   23 +-
 .../org/apache/blur/thrift/generated/Blur.java     | 2280 ++++++++++++---
 .../apache/blur/thrift/generated/Generation.java   |  597 ++++
 16 files changed, 5922 insertions(+), 860 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/ce72e544/interface/Blur.thrift
----------------------------------------------------------------------
diff --git a/interface/Blur.thrift b/interface/Blur.thrift
index 7c8f826..9d1f4a3 100644
--- a/interface/Blur.thrift
+++ b/interface/Blur.thrift
@@ -348,7 +348,11 @@ struct UpdatePackage {
  2:list<Document> documents
 }
 
-
+struct Generation {
+ 1:string table,
+ 2:i32 shardIndex,
+ 3:i64 generation
+}
 
 service Blur {
 
@@ -391,28 +395,30 @@ service Blur {
    * @param options the MutateOptions provide the table name, shard index, etc.
    * @param documents the documents to be added.  NOTE: All documents provided to be indexed
in a single segment.
    */
-  void addDocuments(1:MutateOptions options, 2:list<Document> documents) throws (1:BlurException
e)
+  list<Generation> addDocuments(1:MutateOptions options, 2:list<Document> documents)
throws (1:BlurException e)
 
   /**
    * Delete Documents to the given table in the provided shard.  If the table or shard is
not found on this shard server a BlurException will be thrown.
    * @param options the MutateOptions provide the table name, shard index, etc.
    * @param queries the Queries that will executed and mark there resulting documents as
deleted.
    */
-  void deleteDocumentsByQueries(1:MutateOptions options, 2:list<binary> queries) throws
(1:BlurException e)
+  list<Generation> deleteDocumentsByQueries(1:MutateOptions options, 2:list<binary>
queries) throws (1:BlurException e)
 
   /**
    * Delete Documents to the given table in the provided shard.  If the table or shard is
not found on this shard server a BlurException will be thrown.
    * @param options the MutateOptions provide the table name, shard index, etc.
    * @param queries the Terms that will be found and mark deleted all the documents to be
deleted.
    */
-  void deleteDocuments(1:MutateOptions options, 2:list<Term> terms) throws (1:BlurException
e)
+  list<Generation> deleteDocuments(1:MutateOptions options, 2:list<Term> terms)
throws (1:BlurException e)
 
   /**
    * Update Documents to the given table in the provided shard.  If the table or shard is
not found on this shard server a BlurException will be thrown.
    * @param options the MutateOptions provide the table name, shard index, etc.
    * @param updatePackages the documents to be updated.  NOTE: All documents within a update
document object are indexed in a single segment.
    */
-  void updateDocuments(1:MutateOptions options, 2:list<UpdatePackage> updatePackages)
throws (1:BlurException e)
+  list<Generation> updateDocuments(1:MutateOptions options, 2:list<UpdatePackage>
updatePackages) throws (1:BlurException e)
+
+  void blockUntilGenerationIsVisible(1:list<Generation> generations, 2:bool forceRefresh)
throws (1:BlurException e)
 
   // Cluster state.
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/ce72e544/interface/gen-html/Blur.html
----------------------------------------------------------------------
diff --git a/interface/gen-html/Blur.html b/interface/gen-html/Blur.html
index c092863..5b0df66 100644
--- a/interface/gen-html/Blur.html
+++ b/interface/gen-html/Blur.html
@@ -12,6 +12,7 @@
 <td>Blur</td><td><a href="Blur.html#Svc_Blur">Blur</a><br/>
 <ul>
 <li><a href="Blur.html#Fn_Blur_addDocuments">addDocuments</a></li>
+<li><a href="Blur.html#Fn_Blur_blockUntilGenerationIsVisible">blockUntilGenerationIsVisible</a></li>
 <li><a href="Blur.html#Fn_Blur_cancelQuery">cancelQuery</a></li>
 <li><a href="Blur.html#Fn_Blur_closeReadSession">closeReadSession</a></li>
 <li><a href="Blur.html#Fn_Blur_createTable">createTable</a></li>
@@ -43,6 +44,7 @@
 <a href="Blur.html#Struct_CpuTime">CpuTime</a><br/>
 <a href="Blur.html#Struct_Document">Document</a><br/>
 <a href="Blur.html#Struct_Field">Field</a><br/>
+<a href="Blur.html#Struct_Generation">Generation</a><br/>
 <a href="Blur.html#Struct_LiveSchema">LiveSchema</a><br/>
 <a href="Blur.html#Struct_MutateOptions">MutateOptions</a><br/>
 <a href="Blur.html#Struct_QueryArgs">QueryArgs</a><br/>
@@ -245,7 +247,12 @@ trace (if any).
 <tr><td>2</td><td>documents</td><td><code>list&lt;<code><a
href="Blur.html#Struct_Document">Document</a></code>&gt;</code></td><td>The
documents to be updated.
 </td><td>default</td><td></td></tr>
 </table><br/>Contains a the delete term as well as the documents that will be
added to the index shard.
-<br/></div><hr/><h2 id="Services">Services</h2>
+<br/></div><div class="definition"><h3 id="Struct_Generation">Struct:
Generation</h3>
+<table class="table-bordered table-striped table-condensed"><thead><th>Key</th><th>Field</th><th>Type</th><th>Description</th><th>Requiredness</th><th>Default
value</th></thead>
+<tr><td>1</td><td>table</td><td><code>string</code></td><td></td><td>default</td><td></td></tr>
+<tr><td>2</td><td>shardIndex</td><td><code>i32</code></td><td></td><td>default</td><td></td></tr>
+<tr><td>3</td><td>generation</td><td><code>i64</code></td><td></td><td>default</td><td></td></tr>
+</table><br/></div><hr/><h2 id="Services">Services</h2>
 <h3 id="Svc_Blur">Service: Blur</h3>
 <div class="definition"><h4 id="Fn_Blur_openReadSession">Function: Blur.openReadSession</h4>
 <pre><code><a href="Blur.html#Struct_Session">Session</a></code>
openReadSession(<code>string</code> table)
@@ -277,34 +284,38 @@ trace (if any).
 </pre>Closes the session and allows the readers to be closed.
 @param session the Session.
 <br/></div><div class="definition"><h4 id="Fn_Blur_addDocuments">Function:
Blur.addDocuments</h4>
-<pre><code>void</code> addDocuments(<code><a href="Blur.html#Struct_MutateOptions">MutateOptions</a></code>
options,
-                  <code>list&lt;<code><a href="Blur.html#Struct_Document">Document</a></code>&gt;</code>
documents)
+<pre><code>list&lt;<code><a href="Blur.html#Struct_Generation">Generation</a></code>&gt;</code>
addDocuments(<code><a href="Blur.html#Struct_MutateOptions">MutateOptions</a></code>
options,
+                              <code>list&lt;<code><a href="Blur.html#Struct_Document">Document</a></code>&gt;</code>
documents)
     throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
 </pre>Add Documents to the given table in the provided shard.  If the table or shard
is not found on this shard server a BlurException will be thrown.
 @param options the MutateOptions provide the table name, shard index, etc.
 @param documents the documents to be added.  NOTE: All documents provided to be indexed in
a single segment.
 <br/></div><div class="definition"><h4 id="Fn_Blur_deleteDocumentsByQueries">Function:
Blur.deleteDocumentsByQueries</h4>
-<pre><code>void</code> deleteDocumentsByQueries(<code><a href="Blur.html#Struct_MutateOptions">MutateOptions</a></code>
options,
-                              <code>list&lt;<code>binary</code>&gt;</code>
queries)
+<pre><code>list&lt;<code><a href="Blur.html#Struct_Generation">Generation</a></code>&gt;</code>
deleteDocumentsByQueries(<code><a href="Blur.html#Struct_MutateOptions">MutateOptions</a></code>
options,
+                                          <code>list&lt;<code>binary</code>&gt;</code>
queries)
     throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
 </pre>Delete Documents to the given table in the provided shard.  If the table or shard
is not found on this shard server a BlurException will be thrown.
 @param options the MutateOptions provide the table name, shard index, etc.
 @param queries the Queries that will executed and mark there resulting documents as deleted.
 <br/></div><div class="definition"><h4 id="Fn_Blur_deleteDocuments">Function:
Blur.deleteDocuments</h4>
-<pre><code>void</code> deleteDocuments(<code><a href="Blur.html#Struct_MutateOptions">MutateOptions</a></code>
options,
-                     <code>list&lt;<code><a href="Blur.html#Struct_Term">Term</a></code>&gt;</code>
terms)
+<pre><code>list&lt;<code><a href="Blur.html#Struct_Generation">Generation</a></code>&gt;</code>
deleteDocuments(<code><a href="Blur.html#Struct_MutateOptions">MutateOptions</a></code>
options,
+                                 <code>list&lt;<code><a href="Blur.html#Struct_Term">Term</a></code>&gt;</code>
terms)
     throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
 </pre>Delete Documents to the given table in the provided shard.  If the table or shard
is not found on this shard server a BlurException will be thrown.
 @param options the MutateOptions provide the table name, shard index, etc.
 @param queries the Terms that will be found and mark deleted all the documents to be deleted.
 <br/></div><div class="definition"><h4 id="Fn_Blur_updateDocuments">Function:
Blur.updateDocuments</h4>
-<pre><code>void</code> updateDocuments(<code><a href="Blur.html#Struct_MutateOptions">MutateOptions</a></code>
options,
-                     <code>list&lt;<code><a href="Blur.html#Struct_UpdatePackage">UpdatePackage</a></code>&gt;</code>
updatePackages)
+<pre><code>list&lt;<code><a href="Blur.html#Struct_Generation">Generation</a></code>&gt;</code>
updateDocuments(<code><a href="Blur.html#Struct_MutateOptions">MutateOptions</a></code>
options,
+                                 <code>list&lt;<code><a href="Blur.html#Struct_UpdatePackage">UpdatePackage</a></code>&gt;</code>
updatePackages)
     throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
 </pre>Update Documents to the given table in the provided shard.  If the table or shard
is not found on this shard server a BlurException will be thrown.
 @param options the MutateOptions provide the table name, shard index, etc.
 @param updatePackages the documents to be updated.  NOTE: All documents within a update document
object are indexed in a single segment.
-<br/></div><div class="definition"><h4 id="Fn_Blur_serverList">Function:
Blur.serverList</h4>
+<br/></div><div class="definition"><h4 id="Fn_Blur_blockUntilGenerationIsVisible">Function:
Blur.blockUntilGenerationIsVisible</h4>
+<pre><code>void</code> blockUntilGenerationIsVisible(<code>list&lt;<code><a
href="Blur.html#Struct_Generation">Generation</a></code>&gt;</code>
generations,
+                                   <code>bool</code> forceRefresh)
+    throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
+</pre></div><div class="definition"><h4 id="Fn_Blur_serverList">Function:
Blur.serverList</h4>
 <pre><code>list&lt;<code>string</code>&gt;</code> serverList()
     throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
 </pre>Returns a list of all the shard servers for the given cluster.

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/ce72e544/interface/gen-html/index.html
----------------------------------------------------------------------
diff --git a/interface/gen-html/index.html b/interface/gen-html/index.html
index b69a06a..6ec1837 100644
--- a/interface/gen-html/index.html
+++ b/interface/gen-html/index.html
@@ -8,6 +8,7 @@
 <td>Blur</td><td><a href="Blur.html#Svc_Blur">Blur</a><br/>
 <ul>
 <li><a href="Blur.html#Fn_Blur_addDocuments">addDocuments</a></li>
+<li><a href="Blur.html#Fn_Blur_blockUntilGenerationIsVisible">blockUntilGenerationIsVisible</a></li>
 <li><a href="Blur.html#Fn_Blur_cancelQuery">cancelQuery</a></li>
 <li><a href="Blur.html#Fn_Blur_closeReadSession">closeReadSession</a></li>
 <li><a href="Blur.html#Fn_Blur_createTable">createTable</a></li>
@@ -39,6 +40,7 @@
 <a href="Blur.html#Struct_CpuTime">CpuTime</a><br/>
 <a href="Blur.html#Struct_Document">Document</a><br/>
 <a href="Blur.html#Struct_Field">Field</a><br/>
+<a href="Blur.html#Struct_Generation">Generation</a><br/>
 <a href="Blur.html#Struct_LiveSchema">LiveSchema</a><br/>
 <a href="Blur.html#Struct_MutateOptions">MutateOptions</a><br/>
 <a href="Blur.html#Struct_QueryArgs">QueryArgs</a><br/>


Mime
View raw message