当前位置: 首页>>代码示例>>Java>>正文


Java StreamInput.readThrowable方法代码示例

本文整理汇总了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();
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:19,代码来源:ShardResponse.java

示例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;
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:19,代码来源:DistributedResultRequest.java

示例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);
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:15,代码来源:ElasticsearchException.java

示例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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:LocalTransport.java

示例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();
    }

}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:11,代码来源:TransportNodesListGatewayStartedShards.java

示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:UnassignedInfo.java

示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:ShardStateAction.java

示例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();
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:IndicesShardStoresResponse.java

示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:MultiGetResponse.java

示例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();
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:MultiPercolateResponse.java

示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:ShardSearchFailure.java

示例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();
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:MultiSearchResponse.java

示例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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:DefaultShardOperationFailedException.java

示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:10,代码来源:ActionWriteResponse.java

示例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();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:MultiTermVectorsResponse.java


注:本文中的org.elasticsearch.common.io.stream.StreamInput.readThrowable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。