http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a2585810/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableDescriptor.java ---------------------------------------------------------------------- diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableDescriptor.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableDescriptor.java index e5a267a..585c20d 100644 --- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableDescriptor.java +++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableDescriptor.java @@ -1074,15 +1074,15 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor, case 8: // PROPERTIES if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map44 = iprot.readMapBegin(); - struct.properties = new HashMap<String,String>(2*_map44.size); - for (int _i45 = 0; _i45 < _map44.size; ++_i45) + org.apache.thrift.protocol.TMap _map34 = iprot.readMapBegin(); + struct.properties = new HashMap<String,String>(2*_map34.size); + for (int _i35 = 0; _i35 < _map34.size; ++_i35) { - String _key46; // required - String _val47; // optional - _key46 = iprot.readString(); - _val47 = iprot.readString(); - struct.properties.put(_key46, _val47); + String _key36; // required + String _val37; // optional + _key36 = iprot.readString(); + _val37 = iprot.readString(); + struct.properties.put(_key36, _val37); } iprot.readMapEnd(); } @@ -1139,10 +1139,10 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor, oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size())); - for (Map.Entry<String, String> _iter48 : struct.properties.entrySet()) + for (Map.Entry<String, String> _iter38 : struct.properties.entrySet()) { - oprot.writeString(_iter48.getKey()); - oprot.writeString(_iter48.getValue()); + oprot.writeString(_iter38.getKey()); + oprot.writeString(_iter38.getValue()); } oprot.writeMapEnd(); } @@ -1215,10 +1215,10 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor, if (struct.isSetProperties()) { { oprot.writeI32(struct.properties.size()); - for (Map.Entry<String, String> _iter49 : struct.properties.entrySet()) + for (Map.Entry<String, String> _iter39 : struct.properties.entrySet()) { - oprot.writeString(_iter49.getKey()); - oprot.writeString(_iter49.getValue()); + oprot.writeString(_iter39.getKey()); + oprot.writeString(_iter39.getValue()); } } } @@ -1259,15 +1259,15 @@ public class TableDescriptor implements org.apache.thrift.TBase<TableDescriptor, } if (incoming.get(7)) { { - org.apache.thrift.protocol.TMap _map50 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.properties = new HashMap<String,String>(2*_map50.size); - for (int _i51 = 0; _i51 < _map50.size; ++_i51) + org.apache.thrift.protocol.TMap _map40 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.properties = new HashMap<String,String>(2*_map40.size); + for (int _i41 = 0; _i41 < _map40.size; ++_i41) { - String _key52; // required - String _val53; // optional - _key52 = iprot.readString(); - _val53 = iprot.readString(); - struct.properties.put(_key52, _val53); + String _key42; // required + String _val43; // optional + _key42 = iprot.readString(); + _val43 = iprot.readString(); + struct.properties.put(_key42, _val43); } } struct.setPropertiesIsSet(true);
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a2585810/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableSchema.java ---------------------------------------------------------------------- diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableSchema.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableSchema.java index 0646589..0faa76d 100644 --- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableSchema.java +++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TableSchema.java @@ -462,14 +462,14 @@ public class TableSchema implements org.apache.thrift.TBase<TableSchema, TableSc case 1: // FIELDS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list10 = iprot.readListBegin(); - struct.fields = new ArrayList<FieldSchema>(_list10.size); - for (int _i11 = 0; _i11 < _list10.size; ++_i11) + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.fields = new ArrayList<FieldSchema>(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - FieldSchema _elem12; // required - _elem12 = new FieldSchema(); - _elem12.read(iprot); - struct.fields.add(_elem12); + FieldSchema _elem2; // required + _elem2 = new FieldSchema(); + _elem2.read(iprot); + struct.fields.add(_elem2); } iprot.readListEnd(); } @@ -505,9 +505,9 @@ public class TableSchema implements org.apache.thrift.TBase<TableSchema, TableSc oprot.writeFieldBegin(FIELDS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fields.size())); - for (FieldSchema _iter13 : struct.fields) + for (FieldSchema _iter3 : struct.fields) { - _iter13.write(oprot); + _iter3.write(oprot); } oprot.writeListEnd(); } @@ -546,9 +546,9 @@ public class TableSchema implements org.apache.thrift.TBase<TableSchema, TableSc if (struct.isSetFields()) { { oprot.writeI32(struct.fields.size()); - for (FieldSchema _iter14 : struct.fields) + for (FieldSchema _iter4 : struct.fields) { - _iter14.write(oprot); + _iter4.write(oprot); } } } @@ -563,14 +563,14 @@ public class TableSchema implements org.apache.thrift.TBase<TableSchema, TableSc BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list15 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.fields = new ArrayList<FieldSchema>(_list15.size); - for (int _i16 = 0; _i16 < _list15.size; ++_i16) + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.fields = new ArrayList<FieldSchema>(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) { - FieldSchema _elem17; // required - _elem17 = new FieldSchema(); - _elem17.read(iprot); - struct.fields.add(_elem17); + FieldSchema _elem7; // required + _elem7 = new FieldSchema(); + _elem7.read(iprot); + struct.fields.add(_elem7); } } struct.setFieldsIsSet(true); http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a2585810/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TopFieldDocs.java ---------------------------------------------------------------------- diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TopFieldDocs.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TopFieldDocs.java index 9c68b18..bd6d1b0 100644 --- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TopFieldDocs.java +++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TopFieldDocs.java @@ -694,14 +694,14 @@ public class TopFieldDocs implements org.apache.thrift.TBase<TopFieldDocs, TopFi case 3: // SCORE_DOCS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list78 = iprot.readListBegin(); - struct.scoreDocs = new ArrayList<ScoreDoc>(_list78.size); - for (int _i79 = 0; _i79 < _list78.size; ++_i79) + org.apache.thrift.protocol.TList _list68 = iprot.readListBegin(); + struct.scoreDocs = new ArrayList<ScoreDoc>(_list68.size); + for (int _i69 = 0; _i69 < _list68.size; ++_i69) { - ScoreDoc _elem80; // required - _elem80 = new ScoreDoc(); - _elem80.read(iprot); - struct.scoreDocs.add(_elem80); + ScoreDoc _elem70; // required + _elem70 = new ScoreDoc(); + _elem70.read(iprot); + struct.scoreDocs.add(_elem70); } iprot.readListEnd(); } @@ -721,14 +721,14 @@ public class TopFieldDocs implements org.apache.thrift.TBase<TopFieldDocs, TopFi case 5: // FIELDS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list81 = iprot.readListBegin(); - struct.fields = new ArrayList<SortField>(_list81.size); - for (int _i82 = 0; _i82 < _list81.size; ++_i82) + org.apache.thrift.protocol.TList _list71 = iprot.readListBegin(); + struct.fields = new ArrayList<SortField>(_list71.size); + for (int _i72 = 0; _i72 < _list71.size; ++_i72) { - SortField _elem83; // required - _elem83 = new SortField(); - _elem83.read(iprot); - struct.fields.add(_elem83); + SortField _elem73; // required + _elem73 = new SortField(); + _elem73.read(iprot); + struct.fields.add(_elem73); } iprot.readListEnd(); } @@ -762,9 +762,9 @@ public class TopFieldDocs implements org.apache.thrift.TBase<TopFieldDocs, TopFi oprot.writeFieldBegin(SCORE_DOCS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.scoreDocs.size())); - for (ScoreDoc _iter84 : struct.scoreDocs) + for (ScoreDoc _iter74 : struct.scoreDocs) { - _iter84.write(oprot); + _iter74.write(oprot); } oprot.writeListEnd(); } @@ -777,9 +777,9 @@ public class TopFieldDocs implements org.apache.thrift.TBase<TopFieldDocs, TopFi oprot.writeFieldBegin(FIELDS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fields.size())); - for (SortField _iter85 : struct.fields) + for (SortField _iter75 : struct.fields) { - _iter85.write(oprot); + _iter75.write(oprot); } oprot.writeListEnd(); } @@ -828,9 +828,9 @@ public class TopFieldDocs implements org.apache.thrift.TBase<TopFieldDocs, TopFi if (struct.isSetScoreDocs()) { { oprot.writeI32(struct.scoreDocs.size()); - for (ScoreDoc _iter86 : struct.scoreDocs) + for (ScoreDoc _iter76 : struct.scoreDocs) { - _iter86.write(oprot); + _iter76.write(oprot); } } } @@ -840,9 +840,9 @@ public class TopFieldDocs implements org.apache.thrift.TBase<TopFieldDocs, TopFi if (struct.isSetFields()) { { oprot.writeI32(struct.fields.size()); - for (SortField _iter87 : struct.fields) + for (SortField _iter77 : struct.fields) { - _iter87.write(oprot); + _iter77.write(oprot); } } } @@ -862,14 +862,14 @@ public class TopFieldDocs implements org.apache.thrift.TBase<TopFieldDocs, TopFi } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list88 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.scoreDocs = new ArrayList<ScoreDoc>(_list88.size); - for (int _i89 = 0; _i89 < _list88.size; ++_i89) + org.apache.thrift.protocol.TList _list78 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.scoreDocs = new ArrayList<ScoreDoc>(_list78.size); + for (int _i79 = 0; _i79 < _list78.size; ++_i79) { - ScoreDoc _elem90; // required - _elem90 = new ScoreDoc(); - _elem90.read(iprot); - struct.scoreDocs.add(_elem90); + ScoreDoc _elem80; // required + _elem80 = new ScoreDoc(); + _elem80.read(iprot); + struct.scoreDocs.add(_elem80); } } struct.setScoreDocsIsSet(true); @@ -880,14 +880,14 @@ public class TopFieldDocs implements org.apache.thrift.TBase<TopFieldDocs, TopFi } if (incoming.get(4)) { { - org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.fields = new ArrayList<SortField>(_list91.size); - for (int _i92 = 0; _i92 < _list91.size; ++_i92) + org.apache.thrift.protocol.TList _list81 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.fields = new ArrayList<SortField>(_list81.size); + for (int _i82 = 0; _i82 < _list81.size; ++_i82) { - SortField _elem93; // required - _elem93 = new SortField(); - _elem93.read(iprot); - struct.fields.add(_elem93); + SortField _elem83; // required + _elem83 = new SortField(); + _elem83.read(iprot); + struct.fields.add(_elem83); } } struct.setFieldsIsSet(true); http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a2585810/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/UpdatePackage.java ---------------------------------------------------------------------- diff --git a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/UpdatePackage.java b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/UpdatePackage.java index 00e1da7..df8a10b 100644 --- a/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/UpdatePackage.java +++ b/src/blur-thrift/src/main/java/org/apache/blur/thrift/generated/UpdatePackage.java @@ -474,14 +474,14 @@ public class UpdatePackage implements org.apache.thrift.TBase<UpdatePackage, Upd case 2: // DOCUMENTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list102 = iprot.readListBegin(); - struct.documents = new ArrayList<Document>(_list102.size); - for (int _i103 = 0; _i103 < _list102.size; ++_i103) + org.apache.thrift.protocol.TList _list92 = iprot.readListBegin(); + struct.documents = new ArrayList<Document>(_list92.size); + for (int _i93 = 0; _i93 < _list92.size; ++_i93) { - Document _elem104; // required - _elem104 = new Document(); - _elem104.read(iprot); - struct.documents.add(_elem104); + Document _elem94; // required + _elem94 = new Document(); + _elem94.read(iprot); + struct.documents.add(_elem94); } iprot.readListEnd(); } @@ -514,9 +514,9 @@ public class UpdatePackage implements org.apache.thrift.TBase<UpdatePackage, Upd oprot.writeFieldBegin(DOCUMENTS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.documents.size())); - for (Document _iter105 : struct.documents) + for (Document _iter95 : struct.documents) { - _iter105.write(oprot); + _iter95.write(oprot); } oprot.writeListEnd(); } @@ -553,9 +553,9 @@ public class UpdatePackage implements org.apache.thrift.TBase<UpdatePackage, Upd if (struct.isSetDocuments()) { { oprot.writeI32(struct.documents.size()); - for (Document _iter106 : struct.documents) + for (Document _iter96 : struct.documents) { - _iter106.write(oprot); + _iter96.write(oprot); } } } @@ -572,14 +572,14 @@ public class UpdatePackage implements org.apache.thrift.TBase<UpdatePackage, Upd } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list107 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.documents = new ArrayList<Document>(_list107.size); - for (int _i108 = 0; _i108 < _list107.size; ++_i108) + org.apache.thrift.protocol.TList _list97 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.documents = new ArrayList<Document>(_list97.size); + for (int _i98 = 0; _i98 < _list97.size; ++_i98) { - Document _elem109; // required - _elem109 = new Document(); - _elem109.read(iprot); - struct.documents.add(_elem109); + Document _elem99; // required + _elem99 = new Document(); + _elem99.read(iprot); + struct.documents.add(_elem99); } } struct.setDocumentsIsSet(true); http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a2585810/src/contrib/blur-jdbc/src/main/java/org/apache/blur/jdbc/BlurResultSetDocuments.java ---------------------------------------------------------------------- diff --git a/src/contrib/blur-jdbc/src/main/java/org/apache/blur/jdbc/BlurResultSetDocuments.java b/src/contrib/blur-jdbc/src/main/java/org/apache/blur/jdbc/BlurResultSetDocuments.java index 42c1a1f..c5f9d5a 100644 --- a/src/contrib/blur-jdbc/src/main/java/org/apache/blur/jdbc/BlurResultSetDocuments.java +++ b/src/contrib/blur-jdbc/src/main/java/org/apache/blur/jdbc/BlurResultSetDocuments.java @@ -3,14 +3,24 @@ package org.apache.blur.jdbc; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.SQLWarning; +import java.util.Set; +import java.util.UUID; import org.apache.blur.jdbc.abstractimpl.AbstractBlurResultSet; -import org.apache.blur.jdbc.parser.Parser; import org.apache.blur.thrift.generated.Blur.Iface; +import org.apache.blur.thrift.generated.BlurException; +import org.apache.blur.thrift.generated.QueryArgs; +import org.apache.blur.thrift.generated.Session; +import org.apache.thrift.TException; public class BlurResultSetDocuments extends AbstractBlurResultSet { - public BlurResultSetDocuments(Iface client, Parser parser) { + public BlurResultSetDocuments(Iface client, String tableName, QueryArgs queryArgs, Set<String> fieldToFetch) throws BlurException, TException { + + Session session = new Session(); + session.setTableName(tableName); + session.setSessionId(UUID.randomUUID().toString()); + client.search(session, queryArgs); } http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a2585810/src/distribution/src/main/scripts/interface/Blur.thrift ---------------------------------------------------------------------- diff --git a/src/distribution/src/main/scripts/interface/Blur.thrift b/src/distribution/src/main/scripts/interface/Blur.thrift index eb7f8e4..8fda442 100644 --- a/src/distribution/src/main/scripts/interface/Blur.thrift +++ b/src/distribution/src/main/scripts/interface/Blur.thrift @@ -149,42 +149,6 @@ enum SortType { /** * */ -struct CpuTime { - /** - * - */ - 1:i64 cpuTime, - /** - * - */ - 2:i64 realTime -} - -/** - * - */ -struct QueryStatus { - /** - * - */ - 1:map<string,CpuTime> cpuTimes, - /** - * - */ - 2:i32 completeShards, - /** - * - */ - 3:i32 totalShards, - /** - * - */ - 4:QueryState state, -} - -/** - * - */ struct TableStats { /** * @@ -384,9 +348,9 @@ struct Query { struct QueryArgs { /** - * Unique id for controlling the given query. + * Unique id for controlling the given query, leave null for server side assignment. */ - 1:i64 id, + 1:string id, /** * If after is left null then the first N (where N is numberToFetch) * ScoreDocs are fetched. If after is not null then the first N @@ -432,6 +396,44 @@ struct QueryArgs { 10:list<i32> shardIndexes } +/** + * Contains the query status information for a query on a server. + */ +struct QueryStatus { + /** + * The startTime as set on the server, this is when the query has started executing. This could be different depending on the server. + */ + 1:i64 startTime, + /** + * The endTime as set on the server, this is when the query has stopped executing. This could be different depending on the server. + */ + 2:i64 endTime, + /** + * The amount cpu time spent executing the given query. + */ + 3:i64 cpuTime, + /** + * The total amount of time spent executing the query. + */ + 4:i64 userTime, + /** + * The number of shards that this server has completed. + */ + 5:i32 completeShards, + /** + * The number of shards that this server has to complete. + */ + 6:i32 totalShards, + /** + * The state of the query. This could be different depending on the server. + */ + 7:QueryState state, + /** + * The query that is executing. + */ + 8:QueryArgs queryArgs, +} + struct TopFieldDocs { 1:i32 shardIndex, 2:i64 totalHits, @@ -694,27 +696,29 @@ service Blur { // Query status /** - * 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. + * Cancels a query that is executing within the given session. * @param session the Session. - * @param id the uuid of the query. + * @param server the server name to receive the call, null for all servers. + * @param id the id of the query, (QueryArgs.id). */ - void cancelQuery(1:Session session, 2:i64 id) throws (1:BlurException ex) + void cancelQuery(1:Session session, 2:string server, 3:string id) throws (1:BlurException ex) /** - * Returns a list of the query ids of queries that have recently been executed for the given table. + * Returns a list of the query ids of queries that have recently been executed within the given session. * @param session the Session. - * @return the uuids of the query status objects. + * @param server the server name to receive the call, null for all servers. + * @return the ids of the query objects, (QueryArgs.id). */ - list<i64> queryStatusIdList(1:Session session) throws (1:BlurException ex) + map<string,list<string>> queryStatusIdList(1:Session session, 2:string server) throws (1:BlurException ex) /** - * Returns the query status for the given table and query uuid. + * Returns the query status for the given session and query id, (QueryArgs.id). * @param session the Session. - * @param id the uuid of the query. - * @return the query status for the given. + * @param server the server name to receive the call, null for all servers. + * @param id the id of the query, (QueryArgs.id). + * @return a map of server to the query status for the given session and id. */ - QueryStatus queryStatus(1:Session session, 2:i64 id) throws (1:BlurException ex) + map<string,QueryStatus> queryStatus(1:Session session, 2:string server, 3:string id) throws (1:BlurException ex) /** * Returns the the schema for the given session. http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a2585810/src/distribution/src/main/scripts/interface/gen-html/Blur.html ---------------------------------------------------------------------- diff --git a/src/distribution/src/main/scripts/interface/gen-html/Blur.html b/src/distribution/src/main/scripts/interface/gen-html/Blur.html index b1ff0a9..8cc63c3 100644 --- a/src/distribution/src/main/scripts/interface/gen-html/Blur.html +++ b/src/distribution/src/main/scripts/interface/gen-html/Blur.html @@ -42,7 +42,6 @@ <a href="Blur.html#Struct_AnalyzerType">AnalyzerType</a><br/> <a href="Blur.html#Struct_BlurException">BlurException</a><br/> <a href="Blur.html#Struct_ClassDefinition">ClassDefinition</a><br/> -<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_FieldSchema">FieldSchema</a><br/> @@ -120,24 +119,6 @@ The fields types. </td><td>default</td><td></td></tr> </table><br/>BlurException that carries a message plus the original stack trace (if any). -<br/></div><div class="definition"><h3 id="Struct_CpuTime">Struct: CpuTime</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>cpuTime</td><td><code>i64</code></td><td> -</td><td>default</td><td></td></tr> -<tr><td>2</td><td>realTime</td><td><code>i64</code></td><td> -</td><td>default</td><td></td></tr> -</table><br/><p/> -<br/></div><div class="definition"><h3 id="Struct_QueryStatus">Struct: QueryStatus</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>cpuTimes</td><td><code>map<<code>string</code>, <code><a href="Blur.html#Struct_CpuTime">CpuTime</a></code>></code></td><td> -</td><td>default</td><td></td></tr> -<tr><td>2</td><td>completeShards</td><td><code>i32</code></td><td> -</td><td>default</td><td></td></tr> -<tr><td>3</td><td>totalShards</td><td><code>i32</code></td><td> -</td><td>default</td><td></td></tr> -<tr><td>4</td><td>state</td><td><code><a href="Blur.html#Enum_QueryState">QueryState</a></code></td><td> -</td><td>default</td><td></td></tr> -</table><br/><p/> <br/></div><div class="definition"><h3 id="Struct_TableStats">Struct: TableStats</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>bytes</td><td><code>i64</code></td><td> @@ -251,7 +232,7 @@ type is STRING or JSON the queryString field is used. If the BINARY type is used the queryBinary should be used. <br/></div><div class="definition"><h3 id="Struct_QueryArgs">Struct: QueryArgs</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>id</td><td><code>i64</code></td><td>Unique id for controlling the given query. +<tr><td>1</td><td>id</td><td><code>string</code></td><td>Unique id for controlling the given query, leave null for server side assignment. </td><td>default</td><td></td></tr> <tr><td>2</td><td>after</td><td><code><a href="Blur.html#Struct_ScoreDoc">ScoreDoc</a></code></td><td>If after is left null then the first N (where N is numberToFetch) ScoreDocs are fetched. If after is not null then the first N @@ -277,7 +258,26 @@ shards being sorted and aggregated together. <tr><td>10</td><td>shardIndexes</td><td><code>list<<code>i32</code>></code></td><td>Shard indexes allows the user to specify which shards of the table to execute the query against. If left null, all the shards of the table are used. </td><td>default</td><td></td></tr> -</table><br/></div><div class="definition"><h3 id="Struct_TopFieldDocs">Struct: TopFieldDocs</h3> +</table><br/></div><div class="definition"><h3 id="Struct_QueryStatus">Struct: QueryStatus</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>startTime</td><td><code>i64</code></td><td>The startTime as set on the server, this is when the query has started executing. This could be different depending on the server. +</td><td>default</td><td></td></tr> +<tr><td>2</td><td>endTime</td><td><code>i64</code></td><td>The endTime as set on the server, this is when the query has stopped executing. This could be different depending on the server. +</td><td>default</td><td></td></tr> +<tr><td>3</td><td>cpuTime</td><td><code>i64</code></td><td>The amount cpu time spent executing the given query. +</td><td>default</td><td></td></tr> +<tr><td>4</td><td>userTime</td><td><code>i64</code></td><td>The total amount of time spent executing the query. +</td><td>default</td><td></td></tr> +<tr><td>5</td><td>completeShards</td><td><code>i32</code></td><td>The number of shards that this server has completed. +</td><td>default</td><td></td></tr> +<tr><td>6</td><td>totalShards</td><td><code>i32</code></td><td>The number of shards that this server has to complete. +</td><td>default</td><td></td></tr> +<tr><td>7</td><td>state</td><td><code><a href="Blur.html#Enum_QueryState">QueryState</a></code></td><td>The state of the query. This could be different depending on the server. +</td><td>default</td><td></td></tr> +<tr><td>8</td><td>queryArgs</td><td><code><a href="Blur.html#Struct_QueryArgs">QueryArgs</a></code></td><td>The query that is executing. +</td><td>default</td><td></td></tr> +</table><br/>Contains the query status information for a query on a server. +<br/></div><div class="definition"><h3 id="Struct_TopFieldDocs">Struct: TopFieldDocs</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>shardIndex</td><td><code>i32</code></td><td></td><td>default</td><td></td></tr> <tr><td>2</td><td>totalHits</td><td><code>i64</code></td><td></td><td>default</td><td></td></tr> @@ -471,26 +471,31 @@ block until natural refresh occurs. @param table the table name. <br/></div><div class="definition"><h4 id="Fn_Blur_cancelQuery">Function: Blur.cancelQuery</h4> <pre><code>void</code> cancelQuery(<code><a href="Blur.html#Struct_Session">Session</a></code> session, - <code>i64</code> id) + <code>string</code> server, + <code>string</code> id) throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code> -</pre>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. +</pre>Cancels a query that is executing within the given session. @param session the Session. -@param id the uuid of the query. +@param server the server name to receive the call, null for all servers. +@param id the id of the query, (QueryArgs.id). <br/></div><div class="definition"><h4 id="Fn_Blur_queryStatusIdList">Function: Blur.queryStatusIdList</h4> -<pre><code>list<<code>i64</code>></code> queryStatusIdList(<code><a href="Blur.html#Struct_Session">Session</a></code> session) +<pre><code>map<<code>string</code>, <code>list<<code>string</code>></code>></code> queryStatusIdList(<code><a href="Blur.html#Struct_Session">Session</a></code> session, + <code>string</code> server) throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code> -</pre>Returns a list of the query ids of queries that have recently been executed for the given table. +</pre>Returns a list of the query ids of queries that have recently been executed within the given session. @param session the Session. -@return the uuids of the query status objects. +@param server the server name to receive the call, null for all servers. +@return the ids of the query objects, (QueryArgs.id). <br/></div><div class="definition"><h4 id="Fn_Blur_queryStatus">Function: Blur.queryStatus</h4> -<pre><code><a href="Blur.html#Struct_QueryStatus">QueryStatus</a></code> queryStatus(<code><a href="Blur.html#Struct_Session">Session</a></code> session, - <code>i64</code> id) +<pre><code>map<<code>string</code>, <code><a href="Blur.html#Struct_QueryStatus">QueryStatus</a></code>></code> queryStatus(<code><a href="Blur.html#Struct_Session">Session</a></code> session, + <code>string</code> server, + <code>string</code> id) throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code> -</pre>Returns the query status for the given table and query uuid. +</pre>Returns the query status for the given session and query id, (QueryArgs.id). @param session the Session. -@param id the uuid of the query. -@return the query status for the given. +@param server the server name to receive the call, null for all servers. +@param id the id of the query, (QueryArgs.id). +@return a map of server to the query status for the given session and id. <br/></div><div class="definition"><h4 id="Fn_Blur_schema">Function: Blur.schema</h4> <pre><code><a href="Blur.html#Struct_TableSchema">TableSchema</a></code> schema(<code><a href="Blur.html#Struct_Session">Session</a></code> session) throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code> http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a2585810/src/distribution/src/main/scripts/interface/gen-html/index.html ---------------------------------------------------------------------- diff --git a/src/distribution/src/main/scripts/interface/gen-html/index.html b/src/distribution/src/main/scripts/interface/gen-html/index.html index d2c0701..41edfff 100644 --- a/src/distribution/src/main/scripts/interface/gen-html/index.html +++ b/src/distribution/src/main/scripts/interface/gen-html/index.html @@ -38,7 +38,6 @@ <a href="Blur.html#Struct_AnalyzerType">AnalyzerType</a><br/> <a href="Blur.html#Struct_BlurException">BlurException</a><br/> <a href="Blur.html#Struct_ClassDefinition">ClassDefinition</a><br/> -<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_FieldSchema">FieldSchema</a><br/> http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a2585810/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Analyzer.java ---------------------------------------------------------------------- diff --git a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Analyzer.java b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Analyzer.java index c009344..c5d4dea 100644 --- a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Analyzer.java +++ b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Analyzer.java @@ -376,14 +376,14 @@ public class Analyzer implements org.apache.thrift.TBase<Analyzer, Analyzer._Fie case 1: // ANALYZER_TYPES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list36 = iprot.readListBegin(); - struct.analyzerTypes = new ArrayList<AnalyzerType>(_list36.size); - for (int _i37 = 0; _i37 < _list36.size; ++_i37) + org.apache.thrift.protocol.TList _list26 = iprot.readListBegin(); + struct.analyzerTypes = new ArrayList<AnalyzerType>(_list26.size); + for (int _i27 = 0; _i27 < _list26.size; ++_i27) { - AnalyzerType _elem38; // required - _elem38 = new AnalyzerType(); - _elem38.read(iprot); - struct.analyzerTypes.add(_elem38); + AnalyzerType _elem28; // required + _elem28 = new AnalyzerType(); + _elem28.read(iprot); + struct.analyzerTypes.add(_elem28); } iprot.readListEnd(); } @@ -411,9 +411,9 @@ public class Analyzer implements org.apache.thrift.TBase<Analyzer, Analyzer._Fie oprot.writeFieldBegin(ANALYZER_TYPES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.analyzerTypes.size())); - for (AnalyzerType _iter39 : struct.analyzerTypes) + for (AnalyzerType _iter29 : struct.analyzerTypes) { - _iter39.write(oprot); + _iter29.write(oprot); } oprot.writeListEnd(); } @@ -444,9 +444,9 @@ public class Analyzer implements org.apache.thrift.TBase<Analyzer, Analyzer._Fie if (struct.isSetAnalyzerTypes()) { { oprot.writeI32(struct.analyzerTypes.size()); - for (AnalyzerType _iter40 : struct.analyzerTypes) + for (AnalyzerType _iter30 : struct.analyzerTypes) { - _iter40.write(oprot); + _iter30.write(oprot); } } } @@ -458,14 +458,14 @@ public class Analyzer implements org.apache.thrift.TBase<Analyzer, Analyzer._Fie BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list41 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.analyzerTypes = new ArrayList<AnalyzerType>(_list41.size); - for (int _i42 = 0; _i42 < _list41.size; ++_i42) + org.apache.thrift.protocol.TList _list31 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.analyzerTypes = new ArrayList<AnalyzerType>(_list31.size); + for (int _i32 = 0; _i32 < _list31.size; ++_i32) { - AnalyzerType _elem43; // required - _elem43 = new AnalyzerType(); - _elem43.read(iprot); - struct.analyzerTypes.add(_elem43); + AnalyzerType _elem33; // required + _elem33 = new AnalyzerType(); + _elem33.read(iprot); + struct.analyzerTypes.add(_elem33); } } struct.setAnalyzerTypesIsSet(true); http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a2585810/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/AnalyzerType.java ---------------------------------------------------------------------- diff --git a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/AnalyzerType.java b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/AnalyzerType.java index 58c36b3..b3e25bb 100644 --- a/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/AnalyzerType.java +++ b/src/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/AnalyzerType.java @@ -583,14 +583,14 @@ public class AnalyzerType implements org.apache.thrift.TBase<AnalyzerType, Analy case 3: // ANALYZER_SUB_TYPES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list28 = iprot.readListBegin(); - struct.analyzerSubTypes = new ArrayList<AnalyzerSubType>(_list28.size); - for (int _i29 = 0; _i29 < _list28.size; ++_i29) + org.apache.thrift.protocol.TList _list18 = iprot.readListBegin(); + struct.analyzerSubTypes = new ArrayList<AnalyzerSubType>(_list18.size); + for (int _i19 = 0; _i19 < _list18.size; ++_i19) { - AnalyzerSubType _elem30; // required - _elem30 = new AnalyzerSubType(); - _elem30.read(iprot); - struct.analyzerSubTypes.add(_elem30); + AnalyzerSubType _elem20; // required + _elem20 = new AnalyzerSubType(); + _elem20.read(iprot); + struct.analyzerSubTypes.add(_elem20); } iprot.readListEnd(); } @@ -628,9 +628,9 @@ public class AnalyzerType implements org.apache.thrift.TBase<AnalyzerType, Analy oprot.writeFieldBegin(ANALYZER_SUB_TYPES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.analyzerSubTypes.size())); - for (AnalyzerSubType _iter31 : struct.analyzerSubTypes) + for (AnalyzerSubType _iter21 : struct.analyzerSubTypes) { - _iter31.write(oprot); + _iter21.write(oprot); } oprot.writeListEnd(); } @@ -673,9 +673,9 @@ public class AnalyzerType implements org.apache.thrift.TBase<AnalyzerType, Analy if (struct.isSetAnalyzerSubTypes()) { { oprot.writeI32(struct.analyzerSubTypes.size()); - for (AnalyzerSubType _iter32 : struct.analyzerSubTypes) + for (AnalyzerSubType _iter22 : struct.analyzerSubTypes) { - _iter32.write(oprot); + _iter22.write(oprot); } } } @@ -696,14 +696,14 @@ public class AnalyzerType implements org.apache.thrift.TBase<AnalyzerType, Analy } if (incoming.get(2)) { { - org.apache.thrift.protocol.TList _list33 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.analyzerSubTypes = new ArrayList<AnalyzerSubType>(_list33.size); - for (int _i34 = 0; _i34 < _list33.size; ++_i34) + org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.analyzerSubTypes = new ArrayList<AnalyzerSubType>(_list23.size); + for (int _i24 = 0; _i24 < _list23.size; ++_i24) { - AnalyzerSubType _elem35; // required - _elem35 = new AnalyzerSubType(); - _elem35.read(iprot); - struct.analyzerSubTypes.add(_elem35); + AnalyzerSubType _elem25; // required + _elem25 = new AnalyzerSubType(); + _elem25.read(iprot); + struct.analyzerSubTypes.add(_elem25); } } struct.setAnalyzerSubTypesIsSet(true);
