http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TimeoutException.java ---------------------------------------------------------------------- diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TimeoutException.java b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TimeoutException.java new file mode 100644 index 0000000..335eaa3 --- /dev/null +++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/TimeoutException.java @@ -0,0 +1,409 @@ +/** + * Autogenerated by Thrift Compiler (0.9.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.blur.thrift.generated; + +/** + * 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.thirdparty.thrift_0_9_0.scheme.IScheme; +import org.apache.blur.thirdparty.thrift_0_9_0.scheme.SchemeFactory; +import org.apache.blur.thirdparty.thrift_0_9_0.scheme.StandardScheme; + +import org.apache.blur.thirdparty.thrift_0_9_0.scheme.TupleScheme; +import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol; +import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolException; +import org.apache.blur.thirdparty.thrift_0_9_0.EncodingUtils; +import org.apache.blur.thirdparty.thrift_0_9_0.TException; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; + +/** + * TimeoutException occurs before the network connection timeout + * happens so that the client can reconnect. + */ +public class TimeoutException extends TException implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<TimeoutException, TimeoutException._Fields>, java.io.Serializable, Cloneable { + private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("TimeoutException"); + + private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField EXECUTION_ID_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("executionId", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, (short)1); + + private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TimeoutExceptionStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TimeoutExceptionTupleSchemeFactory()); + } + + public String executionId; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum { + EXECUTION_ID((short)1, "executionId"); + + 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: // EXECUTION_ID + return EXECUTION_ID; + 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.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.EXECUTION_ID, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("executionId", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, + new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(TimeoutException.class, metaDataMap); + } + + public TimeoutException() { + } + + public TimeoutException( + String executionId) + { + this(); + this.executionId = executionId; + } + + /** + * Performs a deep copy on <i>other</i>. + */ + public TimeoutException(TimeoutException other) { + if (other.isSetExecutionId()) { + this.executionId = other.executionId; + } + } + + public TimeoutException deepCopy() { + return new TimeoutException(this); + } + + @Override + public void clear() { + this.executionId = null; + } + + public String getExecutionId() { + return this.executionId; + } + + public TimeoutException setExecutionId(String executionId) { + this.executionId = executionId; + return this; + } + + public void unsetExecutionId() { + this.executionId = null; + } + + /** Returns true if field executionId is set (has been assigned a value) and false otherwise */ + public boolean isSetExecutionId() { + return this.executionId != null; + } + + public void setExecutionIdIsSet(boolean value) { + if (!value) { + this.executionId = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case EXECUTION_ID: + if (value == null) { + unsetExecutionId(); + } else { + setExecutionId((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case EXECUTION_ID: + return getExecutionId(); + + } + 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 EXECUTION_ID: + return isSetExecutionId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TimeoutException) + return this.equals((TimeoutException)that); + return false; + } + + public boolean equals(TimeoutException that) { + if (that == null) + return false; + + boolean this_present_executionId = true && this.isSetExecutionId(); + boolean that_present_executionId = true && that.isSetExecutionId(); + if (this_present_executionId || that_present_executionId) { + if (!(this_present_executionId && that_present_executionId)) + return false; + if (!this.executionId.equals(that.executionId)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(TimeoutException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + TimeoutException typedOther = (TimeoutException)other; + + lastComparison = Boolean.valueOf(isSetExecutionId()).compareTo(typedOther.isSetExecutionId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExecutionId()) { + lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.executionId, typedOther.executionId); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TimeoutException("); + boolean first = true; + + sb.append("executionId:"); + if (this.executionId == null) { + sb.append("null"); + } else { + sb.append(this.executionId); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out))); + } catch (org.apache.blur.thirdparty.thrift_0_9_0.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.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in))); + } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TimeoutExceptionStandardSchemeFactory implements SchemeFactory { + public TimeoutExceptionStandardScheme getScheme() { + return new TimeoutExceptionStandardScheme(); + } + } + + private static class TimeoutExceptionStandardScheme extends StandardScheme<TimeoutException> { + + public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, TimeoutException struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // EXECUTION_ID + if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING) { + struct.executionId = iprot.readString(); + struct.setExecutionIdIsSet(true); + } else { + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot, TimeoutException struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.executionId != null) { + oprot.writeFieldBegin(EXECUTION_ID_FIELD_DESC); + oprot.writeString(struct.executionId); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TimeoutExceptionTupleSchemeFactory implements SchemeFactory { + public TimeoutExceptionTupleScheme getScheme() { + return new TimeoutExceptionTupleScheme(); + } + } + + private static class TimeoutExceptionTupleScheme extends TupleScheme<TimeoutException> { + + @Override + public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, TimeoutException struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetExecutionId()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetExecutionId()) { + oprot.writeString(struct.executionId); + } + } + + @Override + public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, TimeoutException struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.executionId = iprot.readString(); + struct.setExecutionIdIsSet(true); + } + } + } + +} +
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/blur-thrift/src/main/java/org/apache/blur/thrift/util/CommandExample.java ---------------------------------------------------------------------- diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/util/CommandExample.java b/blur-thrift/src/main/java/org/apache/blur/thrift/util/CommandExample.java index 276ae96..fe8dab4 100644 --- a/blur-thrift/src/main/java/org/apache/blur/thrift/util/CommandExample.java +++ b/blur-thrift/src/main/java/org/apache/blur/thrift/util/CommandExample.java @@ -19,16 +19,22 @@ package org.apache.blur.thrift.util; import java.io.IOException; import org.apache.blur.thirdparty.thrift_0_9_0.TException; -import org.apache.blur.thrift.BlurClient; -import org.apache.blur.thrift.generated.Blur.Iface; +import org.apache.blur.thrift.BlurClientManager; +import org.apache.blur.thrift.Connection; +import org.apache.blur.thrift.generated.Blur.Client; import org.apache.blur.thrift.generated.BlurException; +import org.apache.blur.thrift.generated.Response; public class CommandExample { public static void main(String[] args) throws BlurException, TException, IOException { - Iface client = BlurClient.getClient("localhost:40010"); + Client client = BlurClientManager.getClientPool().getClient(new Connection("localhost:40010")); + System.out.println(client.execute("test", "docCount", null)); System.out.println(client.execute("test", "docCountNoCombine", null)); - System.out.println(client.execute("test", "docCountAggregate", null)); + Response response = client.execute("test", "docCountAggregate", null); + long count = response.getValue().getLongValue(); + System.out.println(count); + } } http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/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 6692657..ec1bae3 100644 --- a/distribution/src/main/scripts/interface/Blur.thrift +++ b/distribution/src/main/scripts/interface/Blur.thrift @@ -55,6 +55,14 @@ exception BlurException { 3:ErrorType errorType } +/** + * TimeoutException occurs before the network connection timeout + * happens so that the client can reconnect. + */ +exception TimeoutException { + 1:string executionId +} + /** * <table class="table-bordered table-striped table-condensed"> * <tr><td colspan="2">The scoring type used during a SuperQuery to score multi Record hits within a ColumnFamily.</td></tr> @@ -842,9 +850,18 @@ union Value { 9:bool nullValue } +struct Shard { + 1:string shard +} + +struct Server { + 1:string server +} + union Response { - 1:map<string, Value> shardToValue, - 2:Value value + 1:map<Shard, Value> shardToValue, + 2:map<Server, Value> serverToValue, + 3:Value value } struct Arguments { @@ -857,7 +874,25 @@ struct Arguments { */ service Blur { - Response execute(1:string table, 2:string commandName, 3:Arguments arguments) throws (1:BlurException ex) + // Platform Commands + + /** + * Executes the given command by name on the table with the provided arguments. + */ + Response execute(1:string table, 2:string commandName, 3:Arguments arguments) throws (1:BlurException bex, 2:TimeoutException tex) + + /** + * If the execute command times out due to command taking longer than the configured + * network tcp timeout this method allows the client to reconnect to the already + * executing command. + */ + Response reconnect(1:string executionId) throws (1:BlurException bex, 2:TimeoutException tex) + + /** + * Releases and refreshes the read snapshots of the indexes in the session for the + * current connection. + */ + oneway void refresh() //Table Commands http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/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 db28370..5bd262f 100644 --- a/distribution/src/main/scripts/interface/gen-html/Blur.html +++ b/distribution/src/main/scripts/interface/gen-html/Blur.html @@ -37,7 +37,9 @@ <li><a href="Blur.html#Fn_Blur_query">query</a></li> <li><a href="Blur.html#Fn_Blur_queryStatusById">queryStatusById</a></li> <li><a href="Blur.html#Fn_Blur_queryStatusIdList">queryStatusIdList</a></li> +<li><a href="Blur.html#Fn_Blur_reconnect">reconnect</a></li> <li><a href="Blur.html#Fn_Blur_recordFrequency">recordFrequency</a></li> +<li><a href="Blur.html#Fn_Blur_refresh">refresh</a></li> <li><a href="Blur.html#Fn_Blur_removeSnapshot">removeSnapshot</a></li> <li><a href="Blur.html#Fn_Blur_removeTable">removeTable</a></li> <li><a href="Blur.html#Fn_Blur_resetLogging">resetLogging</a></li> @@ -87,12 +89,15 @@ <a href="Blur.html#Struct_Schema">Schema</a><br/> <a href="Blur.html#Enum_ScoreType">ScoreType</a><br/> <a href="Blur.html#Struct_Selector">Selector</a><br/> +<a href="Blur.html#Struct_Server">Server</a><br/> +<a href="Blur.html#Struct_Shard">Shard</a><br/> <a href="Blur.html#Enum_ShardState">ShardState</a><br/> <a href="Blur.html#Struct_SortField">SortField</a><br/> <a href="Blur.html#Struct_SortFieldResult">SortFieldResult</a><br/> <a href="Blur.html#Enum_Status">Status</a><br/> <a href="Blur.html#Struct_TableDescriptor">TableDescriptor</a><br/> <a href="Blur.html#Struct_TableStats">TableStats</a><br/> +<a href="Blur.html#Struct_TimeoutException">TimeoutException</a><br/> <a href="Blur.html#Struct_User">User</a><br/> <a href="Blur.html#Struct_Value">Value</a><br/> </td> @@ -217,6 +222,11 @@ Logging level enum used to change the logging levels at runtime. <tr><td>3</td><td>errorType</td><td><code><a href="Blur.html#Enum_ErrorType">ErrorType</a></code></td><td></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_TimeoutException">Exception: TimeoutException</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>executionId</td><td><code>string</code></td><td></td><td>default</td><td></td></tr> +</table><br/>TimeoutException occurs before the network connection timeout +happens so that the client can reconnect. <br/></div><div class="definition"><h3 id="Struct_User">Struct: User</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>username</td><td><code>string</code></td><td>username. @@ -589,10 +599,17 @@ be family dot column, "family.column". <tr><td>7</td><td>binaryValue</td><td><code>binary</code></td><td></td><td>default</td><td></td></tr> <tr><td>8</td><td>booleanValue</td><td><code>bool</code></td><td></td><td>default</td><td></td></tr> <tr><td>9</td><td>nullValue</td><td><code>bool</code></td><td></td><td>default</td><td></td></tr> +</table><br/></div><div class="definition"><h3 id="Struct_Shard">Struct: Shard</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>shard</td><td><code>string</code></td><td></td><td>default</td><td></td></tr> +</table><br/></div><div class="definition"><h3 id="Struct_Server">Struct: Server</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>server</td><td><code>string</code></td><td></td><td>default</td><td></td></tr> </table><br/></div><div class="definition"><h3 id="Struct_Response">Struct: Response</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>shardToValue</td><td><code>map<<code>string</code>, <code><a href="Blur.html#Struct_Value">Value</a></code>></code></td><td></td><td>default</td><td></td></tr> -<tr><td>2</td><td>value</td><td><code><a href="Blur.html#Struct_Value">Value</a></code></td><td></td><td>default</td><td></td></tr> +<tr><td>1</td><td>shardToValue</td><td><code>map<<code><a href="Blur.html#Struct_Shard">Shard</a></code>, <code><a href="Blur.html#Struct_Value">Value</a></code>></code></td><td></td><td>default</td><td></td></tr> +<tr><td>2</td><td>serverToValue</td><td><code>map<<code><a href="Blur.html#Struct_Server">Server</a></code>, <code><a href="Blur.html#Struct_Value">Value</a></code>></code></td><td></td><td>default</td><td></td></tr> +<tr><td>3</td><td>value</td><td><code><a href="Blur.html#Struct_Value">Value</a></code></td><td></td><td>default</td><td></td></tr> </table><br/></div><div class="definition"><h3 id="Struct_Arguments">Struct: Arguments</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>values</td><td><code>map<<code>string</code>, <code><a href="Blur.html#Struct_Value">Value</a></code>></code></td><td></td><td>default</td><td></td></tr> @@ -604,8 +621,19 @@ shards servers. Each of the methods are documented. <pre><code><a href="Blur.html#Struct_Response">Response</a></code> execute(<code>string</code> table, <code>string</code> commandName, <code><a href="Blur.html#Struct_Arguments">Arguments</a></code> arguments) - throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code> -</pre></div><div class="definition"><h4 id="Fn_Blur_createTable">Function: Blur.createTable</h4> + throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>, <code><a href="Blur.html#Struct_TimeoutException">TimeoutException</a></code> +</pre>Executes the given command by name on the table with the provided arguments. +<br/></div><div class="definition"><h4 id="Fn_Blur_reconnect">Function: Blur.reconnect</h4> +<pre><code><a href="Blur.html#Struct_Response">Response</a></code> reconnect(<code>string</code> executionId) + throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>, <code><a href="Blur.html#Struct_TimeoutException">TimeoutException</a></code> +</pre>If the execute command times out due to command taking longer than the configured +network tcp timeout this method allows the client to reconnect to the already +executing command. +<br/></div><div class="definition"><h4 id="Fn_Blur_refresh">Function: Blur.refresh</h4> +<pre><code>void</code> refresh() +</pre>Releases and refreshes the read snapshots of the indexes in the session for the +current connection. +<br/></div><div class="definition"><h4 id="Fn_Blur_createTable">Function: Blur.createTable</h4> <pre><code>void</code> createTable(<code><a href="Blur.html#Struct_TableDescriptor">TableDescriptor</a></code> tableDescriptor) throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code> </pre>Creates a table with the given TableDescriptor. http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/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 45edf65..5a9c99a 100644 --- a/distribution/src/main/scripts/interface/gen-html/index.html +++ b/distribution/src/main/scripts/interface/gen-html/index.html @@ -33,7 +33,9 @@ <li><a href="Blur.html#Fn_Blur_query">query</a></li> <li><a href="Blur.html#Fn_Blur_queryStatusById">queryStatusById</a></li> <li><a href="Blur.html#Fn_Blur_queryStatusIdList">queryStatusIdList</a></li> +<li><a href="Blur.html#Fn_Blur_reconnect">reconnect</a></li> <li><a href="Blur.html#Fn_Blur_recordFrequency">recordFrequency</a></li> +<li><a href="Blur.html#Fn_Blur_refresh">refresh</a></li> <li><a href="Blur.html#Fn_Blur_removeSnapshot">removeSnapshot</a></li> <li><a href="Blur.html#Fn_Blur_removeTable">removeTable</a></li> <li><a href="Blur.html#Fn_Blur_resetLogging">resetLogging</a></li> @@ -83,12 +85,15 @@ <a href="Blur.html#Struct_Schema">Schema</a><br/> <a href="Blur.html#Enum_ScoreType">ScoreType</a><br/> <a href="Blur.html#Struct_Selector">Selector</a><br/> +<a href="Blur.html#Struct_Server">Server</a><br/> +<a href="Blur.html#Struct_Shard">Shard</a><br/> <a href="Blur.html#Enum_ShardState">ShardState</a><br/> <a href="Blur.html#Struct_SortField">SortField</a><br/> <a href="Blur.html#Struct_SortFieldResult">SortFieldResult</a><br/> <a href="Blur.html#Enum_Status">Status</a><br/> <a href="Blur.html#Struct_TableDescriptor">TableDescriptor</a><br/> <a href="Blur.html#Struct_TableStats">TableStats</a><br/> +<a href="Blur.html#Struct_TimeoutException">TimeoutException</a><br/> <a href="Blur.html#Struct_User">User</a><br/> <a href="Blur.html#Struct_Value">Value</a><br/> </td> http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b434b067/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Arguments.java ---------------------------------------------------------------------- diff --git a/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Arguments.java b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Arguments.java index 68d6916..d14f8c9 100644 --- a/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Arguments.java +++ b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Arguments.java @@ -363,16 +363,16 @@ public class Arguments implements org.apache.blur.thirdparty.thrift_0_9_0.TBase< case 1: // VALUES if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP) { { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map242 = iprot.readMapBegin(); - struct.values = new HashMap<String,Value>(2*_map242.size); - for (int _i243 = 0; _i243 < _map242.size; ++_i243) + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map252 = iprot.readMapBegin(); + struct.values = new HashMap<String,Value>(2*_map252.size); + for (int _i253 = 0; _i253 < _map252.size; ++_i253) { - String _key244; // optional - Value _val245; // required - _key244 = iprot.readString(); - _val245 = new Value(); - _val245.read(iprot); - struct.values.put(_key244, _val245); + String _key254; // optional + Value _val255; // required + _key254 = iprot.readString(); + _val255 = new Value(); + _val255.read(iprot); + struct.values.put(_key254, _val255); } iprot.readMapEnd(); } @@ -400,10 +400,10 @@ public class Arguments implements org.apache.blur.thirdparty.thrift_0_9_0.TBase< oprot.writeFieldBegin(VALUES_FIELD_DESC); { oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, struct.values.size())); - for (Map.Entry<String, Value> _iter246 : struct.values.entrySet()) + for (Map.Entry<String, Value> _iter256 : struct.values.entrySet()) { - oprot.writeString(_iter246.getKey()); - _iter246.getValue().write(oprot); + oprot.writeString(_iter256.getKey()); + _iter256.getValue().write(oprot); } oprot.writeMapEnd(); } @@ -434,10 +434,10 @@ public class Arguments implements org.apache.blur.thirdparty.thrift_0_9_0.TBase< if (struct.isSetValues()) { { oprot.writeI32(struct.values.size()); - for (Map.Entry<String, Value> _iter247 : struct.values.entrySet()) + for (Map.Entry<String, Value> _iter257 : struct.values.entrySet()) { - oprot.writeString(_iter247.getKey()); - _iter247.getValue().write(oprot); + oprot.writeString(_iter257.getKey()); + _iter257.getValue().write(oprot); } } } @@ -449,16 +449,16 @@ public class Arguments implements org.apache.blur.thirdparty.thrift_0_9_0.TBase< BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map248 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32()); - struct.values = new HashMap<String,Value>(2*_map248.size); - for (int _i249 = 0; _i249 < _map248.size; ++_i249) + org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map258 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32()); + struct.values = new HashMap<String,Value>(2*_map258.size); + for (int _i259 = 0; _i259 < _map258.size; ++_i259) { - String _key250; // optional - Value _val251; // required - _key250 = iprot.readString(); - _val251 = new Value(); - _val251.read(iprot); - struct.values.put(_key250, _val251); + String _key260; // optional + Value _val261; // required + _key260 = iprot.readString(); + _val261 = new Value(); + _val261.read(iprot); + struct.values.put(_key260, _val261); } } struct.setValuesIsSet(true);
