Java Code Examples for org.elasticsearch.common.io.stream.StreamOutput#writeMap()

The following examples show how to use org.elasticsearch.common.io.stream.StreamOutput#writeMap() . 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: Script.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Override
public final void writeTo(StreamOutput out) throws IOException {
    out.writeString(script);
    boolean hasType = type != null;
    out.writeBoolean(hasType);
    if (hasType) {
        ScriptType.writeTo(type, out);
    }
    out.writeOptionalString(lang);
    boolean hasParams = params != null;
    out.writeBoolean(hasParams);
    if (hasParams) {
        out.writeMap(params);
    }
    doWriteTo(out);
}
 
Example 2
Source File: PipelineAggregator.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public final void writeTo(StreamOutput out) throws IOException {
    out.writeString(name);
    out.writeStringArray(bucketsPaths);
    out.writeMap(metaData);
    doWriteTo(out);
}
 
Example 3
Source File: TransportMessage.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    if (headers == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        out.writeMap(headers);
    }
}
 
Example 4
Source File: MultiValuesSourceAggregationBuilder.java    From elasticsearch-linear-regression with Apache License 2.0 5 votes vote down vote up
@Override
protected final void doWriteTo(StreamOutput out) throws IOException {
  if (serializeTargetValueType()) {
    out.writeOptionalWriteable(targetValueType);
  }
  out.writeGenericValue(fields);
  out.writeOptionalWriteable(valueType);
  out.writeOptionalString(format);
  out.writeMap(missingMap);
  innerWriteTo(out);
}
 
Example 5
Source File: StoredLtrQueryBuilder.java    From elasticsearch-learning-to-rank with Apache License 2.0 5 votes vote down vote up
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
    out.writeOptionalString(modelName);
    out.writeOptionalString(featureSetName);
    out.writeMap(params);
    if (out.getVersion().onOrAfter(Version.V_6_2_4)) {
        out.writeOptionalStringArray(activeFeatures != null ? activeFeatures.toArray(new String[0]) : null);
    }
    out.writeOptionalString(storeName);
}
 
Example 6
Source File: StoredLtrQueryBuilder.java    From fess with Apache License 2.0 5 votes vote down vote up
@Override
protected void doWriteTo(final StreamOutput out) throws IOException {
    out.writeOptionalString(modelName);
    out.writeOptionalString(featureSetName);
    out.writeMap(params);
    out.writeOptionalStringArray(activeFeatures != null ? activeFeatures.toArray(new String[0]) : null);
    out.writeOptionalString(storeName);
}
 
Example 7
Source File: ListStoresAction.java    From elasticsearch-learning-to-rank with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(storeName);
    out.writeString(indexName);
    out.writeVInt(version);
    out.writeMap(counts, StreamOutput::writeString, StreamOutput::writeVInt);
}
 
Example 8
Source File: NodeCollectProfileResponse.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeMap(durationByContextIdent);
}
 
Example 9
Source File: ProfileNodeResponse.java    From anomaly-detection with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeMap(modelSize, StreamOutput::writeString, StreamOutput::writeLong);
    out.writeInt(shingleSize);
}
 
Example 10
Source File: GeoShapeType.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public void writeValueTo(StreamOutput out, Map<String, Object> v) throws IOException {
    out.writeMap(v);
}
 
Example 11
Source File: DiffableStringMap.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
public void writeTo(StreamOutput out) throws IOException {
    out.writeMap((Map<String, Object>) (Map) innerMap);
}
 
Example 12
Source File: ReplicationTracker.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeVLong(clusterStateVersion);
    out.writeMap(checkpoints, (streamOutput, s) -> out.writeString(s), (streamOutput, cps) -> cps.writeTo(out));
    IndexShardRoutingTable.Builder.writeTo(routingTable, out);
}
 
Example 13
Source File: ListStoresAction.java    From elasticsearch-learning-to-rank with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeMap(stores, StreamOutput::writeString, (w, i) -> i.writeTo(w));
}
 
Example 14
Source File: CachesStatsAction.java    From elasticsearch-learning-to-rank with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    allStores.writeTo(out);
    out.writeMap(byStore, StreamOutput::writeString, (o, s) -> s.writeTo(o));
}
 
Example 15
Source File: CachesStatsAction.java    From elasticsearch-learning-to-rank with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    allStores.writeTo(out);
    out.writeMap(byStore, StreamOutput::writeString, (o, s) -> s.writeTo(o));
}
 
Example 16
Source File: FeatureValidation.java    From elasticsearch-learning-to-rank with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(index);
    out.writeMap(params);
}
 
Example 17
Source File: BucketStreamContext.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    ValueFormatterStreams.writeOptional(formatter, out);
    out.writeBoolean(keyed);
    out.writeMap(attributes);
}
 
Example 18
Source File: GeoShapeType.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public void writeValueTo(StreamOutput out, Object v) throws IOException {
    out.writeMap((Map<String, Object>)v);
}
 
Example 19
Source File: ADStatsNodeResponse.java    From anomaly-detection with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeMap(statsMap, StreamOutput::writeString, StreamOutput::writeGenericValue);
}