本文整理汇总了Java中org.elasticsearch.common.io.stream.StreamInput.readThrowable方法的典型用法代码示例。如果您正苦于以下问题:Java StreamInput.readThrowable方法的具体用法?Java StreamInput.readThrowable怎么用?Java StreamInput.readThrowable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.common.io.stream.StreamInput
的用法示例。
在下文中一共展示了StreamInput.readThrowable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int size = in.readVInt();
locations = new IntArrayList(size);
failures = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
locations.add(in.readVInt());
if (in.readBoolean()) {
failures.add(Failure.readFailure(in));
} else {
failures.add(null);
}
}
if (in.readBoolean()) {
failure = in.readThrowable();
}
}
示例2: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
jobId = new UUID(in.readLong(), in.readLong());
executionPhaseId = in.readVInt();
bucketIdx = in.readVInt();
isLast = in.readBoolean();
inputId = in.readByte();
boolean failure = in.readBoolean();
if (failure) {
throwable = in.readThrowable();
} else {
StreamBucket bucket = new StreamBucket(streamers);
bucket.readFrom(in);
rows = bucket;
}
}
示例3: ElasticsearchException
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public ElasticsearchException(StreamInput in) throws IOException {
super(in.readOptionalString(), in.readThrowable());
readStackTrace(this, in);
int numKeys = in.readVInt();
for (int i = 0; i < numKeys; i++) {
final String key = in.readString();
final int numValues = in.readVInt();
final ArrayList<String> values = new ArrayList<>(numValues);
for (int j = 0; j < numValues; j++) {
values.add(in.readString());
}
headers.put(key, values);
}
}
示例4: handlerResponseError
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
private void handlerResponseError(StreamInput buffer, final TransportResponseHandler handler) {
Throwable error;
try {
error = buffer.readThrowable();
} catch (Throwable e) {
error = new TransportSerializationException("Failed to deserialize exception response from stream", e);
}
handleException(handler, error);
}
示例5: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
version = in.readLong();
numDocs = in.readLong();
if (in.readBoolean()) {
storeException = in.readThrowable();
}
}
示例6: UnassignedInfo
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
UnassignedInfo(StreamInput in) throws IOException {
this.reason = Reason.values()[(int) in.readByte()];
this.unassignedTimeMillis = in.readLong();
// As System.nanoTime() cannot be compared across different JVMs, reset it to now.
// This means that in master failover situations, elapsed delay time is forgotten.
this.unassignedTimeNanos = System.nanoTime();
this.message = in.readOptionalString();
this.failure = in.readThrowable();
}
示例7: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
shardRouting = readShardRoutingEntry(in);
indexUUID = in.readString();
message = in.readString();
finderNodeId = in.readString();
failure = in.readThrowable();
}
示例8: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
node = DiscoveryNode.readNode(in);
version = in.readLong();
allocation = Allocation.readFrom(in);
if (in.readBoolean()) {
storeException = in.readThrowable();
}
}
示例9: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
index = in.readString();
type = in.readOptionalString();
id = in.readString();
throwable = in.readThrowable();
}
示例10: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
if (in.readBoolean()) {
response = new PercolateResponse();
response.readFrom(in);
} else {
throwable = in.readThrowable();
}
}
示例11: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
if (in.readBoolean()) {
shardTarget = readSearchShardTarget(in);
}
reason = in.readString();
status = RestStatus.readFrom(in);
cause = in.readThrowable();
}
示例12: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
if (in.readBoolean()) {
this.response = new SearchResponse();
response.readFrom(in);
} else {
throwable = in.readThrowable();
}
}
示例13: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
if (in.readBoolean()) {
index = in.readString();
}
shardId = in.readVInt();
reason = in.readThrowable();
status = RestStatus.readFrom(in);
}
示例14: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
index = in.readString();
shardId = in.readVInt();
nodeId = in.readOptionalString();
cause = in.readThrowable();
status = RestStatus.readFrom(in);
primary = in.readBoolean();
}
示例15: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
index = in.readString();
type = in.readOptionalString();
id = in.readString();
cause = in.readThrowable();
}