Java Code Examples for org.elasticsearch.common.io.stream.StreamInput#readList()

The following examples show how to use org.elasticsearch.common.io.stream.StreamInput#readList() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PutIndexTemplateRequest.java    From crate with Apache License 2.0 6 votes vote down vote up
public PutIndexTemplateRequest(StreamInput in) throws IOException {
    super(in);
    cause = in.readString();
    name = in.readString();

    indexPatterns = in.readList(StreamInput::readString);
    order = in.readInt();
    create = in.readBoolean();
    settings = readSettingsFromStream(in);
    int size = in.readVInt();
    for (int i = 0; i < size; i++) {
        final String type = in.readString();
        String mappingSource = in.readString();
        mappings.put(type, mappingSource);
    }
    int aliasesSize = in.readVInt();
    for (int i = 0; i < aliasesSize; i++) {
        aliases.add(new Alias(in));
    }
    version = in.readOptionalVInt();
}
 
Example 2
Source File: TransportBroadcastByNodeAction.java    From crate with Apache License 2.0 5 votes vote down vote up
public NodeResponse(StreamInput in) throws IOException {
    nodeId = in.readString();
    totalShards = in.readVInt();
    results = in.readList((stream) -> stream.readBoolean() ? readShardResult(stream) : null);
    if (in.readBoolean()) {
        exceptions = in.readList(BroadcastShardOperationFailedException::new);
    } else {
        exceptions = null;
    }
}
 
Example 3
Source File: StoredFeature.java    From elasticsearch-learning-to-rank with Apache License 2.0 5 votes vote down vote up
public StoredFeature(StreamInput input) throws IOException {
    name = input.readString();
    queryParams = input.readList(StreamInput::readString);
    templateLanguage = input.readString();
    template = input.readString();
    templateAsString = input.readBoolean();
}
 
Example 4
Source File: AddFeaturesToSetAction.java    From elasticsearch-learning-to-rank with Apache License 2.0 5 votes vote down vote up
public  AddFeaturesToSetRequest(StreamInput in) throws IOException {
    super(in);
    store = in.readString();
    features = in.readList(StoredFeature::new);
    if (in.readBoolean()) {
        featureNameQuery = in.readOptionalString();
    }
    merge = in.readBoolean();
    featureSet = in.readString();
    routing = in.readOptionalString();
    validation = in.readOptionalWriteable(FeatureValidation::new);
}
 
Example 5
Source File: InternalGeoPointClustering.java    From elasticsearch-aggregation-geoclustering with Apache License 2.0 5 votes vote down vote up
/**
 * Read from a stream.
 */
public InternalGeoPointClustering(StreamInput in) throws IOException {
    super(in);
    radius = in.readDouble();
    ratio = in.readDouble();
    requiredSize = readSize(in);
    buckets = in.readList(Bucket::new);
}
 
Example 6
Source File: InternalGeoShape.java    From elasticsearch-plugin-geoshape with MIT License 5 votes vote down vote up
/**
 * Read from a stream.
 */
public InternalGeoShape(StreamInput in) throws IOException {
    super(in);
    output_format = InternalGeoShape.OutputFormat.valueOf(in.readString());
    requiredSize = readSize(in);
    shardSize = readSize(in);
    this.buckets = in.readList(InternalBucket::new);
}
 
Example 7
Source File: ClearCachesAction.java    From elasticsearch-learning-to-rank with Apache License 2.0 4 votes vote down vote up
@Override
protected List<ClearCachesNodeResponse> readNodesFrom(StreamInput in) throws IOException {
    return in.readList(ClearCachesNodeResponse::new);
}
 
Example 8
Source File: TransportBroadcastByNodeAction.java    From crate with Apache License 2.0 4 votes vote down vote up
public NodeRequest(StreamInput in) throws IOException {
    super(in);
    indicesLevelRequest = readRequestFrom(in);
    shards = in.readList(ShardRouting::new);
    nodeId = in.readString();
}
 
Example 9
Source File: DataTypes.java    From crate with Apache License 2.0 4 votes vote down vote up
public static List<DataType<?>> listFromStream(StreamInput in) throws IOException {
    return in.readList(DataTypes::fromStream);
}
 
Example 10
Source File: SwapRelationsRequest.java    From crate with Apache License 2.0 4 votes vote down vote up
public SwapRelationsRequest(StreamInput in) throws IOException {
    super(in);
    swapRelations = in.readList(RelationNameSwap::new);
    dropRelations = in.readList(RelationName::new);
}
 
Example 11
Source File: ThreadPoolStats.java    From crate with Apache License 2.0 4 votes vote down vote up
public ThreadPoolStats(StreamInput in) throws IOException {
    stats = in.readList(Stats::new);
}
 
Example 12
Source File: PeersRequest.java    From crate with Apache License 2.0 4 votes vote down vote up
public PeersRequest(StreamInput in) throws IOException {
    super(in);
    sourceNode = new DiscoveryNode(in);
    knownPeers = in.readList(DiscoveryNode::new);
}
 
Example 13
Source File: CronResponse.java    From anomaly-detection with Apache License 2.0 4 votes vote down vote up
@Override
public List<CronNodeResponse> readNodesFrom(StreamInput in) throws IOException {
    return in.readList(CronNodeResponse::readNodeResponse);
}
 
Example 14
Source File: CachesStatsAction.java    From elasticsearch-learning-to-rank with Apache License 2.0 4 votes vote down vote up
@Override
protected List<CachesStatsNodeResponse> readNodesFrom(StreamInput in) throws IOException {
    return in.readList(CachesStatsNodeResponse::new);
}
 
Example 15
Source File: LoggingSearchExtBuilder.java    From elasticsearch-learning-to-rank with Apache License 2.0 4 votes vote down vote up
public LoggingSearchExtBuilder(StreamInput input) throws IOException {
    logSpecs = input.readList(LogSpec::new);
}
 
Example 16
Source File: StoredFeatureSet.java    From elasticsearch-learning-to-rank with Apache License 2.0 4 votes vote down vote up
public StoredFeatureSet(StreamInput input) throws IOException {
    this(input.readString(), input.readList(StoredFeature::new));
}
 
Example 17
Source File: ADStatsNodesResponse.java    From anomaly-detection with Apache License 2.0 4 votes vote down vote up
@Override
public List<ADStatsNodeResponse> readNodesFrom(StreamInput in) throws IOException {
    return in.readList(ADStatsNodeResponse::readStats);
}
 
Example 18
Source File: Symbols.java    From crate with Apache License 2.0 4 votes vote down vote up
public static List<Symbol> listFromStream(StreamInput in) throws IOException {
    return in.readList(Symbols::fromStream);
}
 
Example 19
Source File: DeleteModelResponse.java    From anomaly-detection with Apache License 2.0 4 votes vote down vote up
@Override
public List<DeleteModelNodeResponse> readNodesFrom(StreamInput in) throws IOException {
    return in.readList(DeleteModelNodeResponse::readNodeResponse);
}
 
Example 20
Source File: ProfileResponse.java    From anomaly-detection with Apache License 2.0 4 votes vote down vote up
@Override
public List<ProfileNodeResponse> readNodesFrom(StreamInput in) throws IOException {
    return in.readList(ProfileNodeResponse::readProfiles);
}