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

The following examples show how to use org.elasticsearch.common.io.stream.StreamOutput#writeStringArrayNullable() . 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: FieldStatsRequest.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArrayNullable(fields);
    out.writeVInt(indexConstraints.length);
    for (IndexConstraint indexConstraint : indexConstraints) {
        out.writeString(indexConstraint.getField());
        out.writeByte(indexConstraint.getProperty().getId());
        out.writeByte(indexConstraint.getComparison().getId());
        out.writeString(indexConstraint.getValue());
        if (out.getVersion().onOrAfter(Version.V_2_0_1)) {
            out.writeOptionalString(indexConstraint.getOptionalFormat());
        }
    }
    out.writeString(level);
}
 
Example 2
Source File: ShardExportResponse.java    From elasticsearch-inout-plugin with Apache License 2.0 6 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeOptionalString(cmd);
    if (cmdArray == null) {
        out.writeStringArrayNullable(null);
    } else {
        out.writeStringArray(cmdArray.toArray(new String[cmdArray.size()]));
    }

    out.writeOptionalString(file);
    out.writeOptionalString(stderr);
    out.writeOptionalString(stdout);
    out.writeVInt(exitCode);
    out.writeVLong(numExported);
    out.writeOptionalText(node);
    out.writeBoolean(dryRun);
}
 
Example 3
Source File: PutMappingRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArrayNullable(indices);
    indicesOptions.writeIndicesOptions(out);
    out.writeOptionalString(type);
    out.writeString(source);
    out.writeBoolean(updateAllTypes);
    out.writeBoolean(reindex);
    writeTimeout(out);
}
 
Example 4
Source File: BaseNodesRequest.java    From crate with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    if (out.getVersion().before(Version.V_4_1_0)) {
        out.writeStringArrayNullable(null);
    }
    out.writeOptionalArray(concreteNodes);
    out.writeOptionalTimeValue(timeout);
}
 
Example 5
Source File: CommonStatsFlags.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    long longFlags = 0;
    for (Flag flag : flags) {
        longFlags |= (1 << flag.ordinal());
    }
    out.writeLong(longFlags);

    out.writeStringArrayNullable(types);
    out.writeStringArrayNullable(groups);
    out.writeStringArrayNullable(fieldDataFields);
    out.writeStringArrayNullable(completionDataFields);
}
 
Example 6
Source File: ClearIndicesCacheRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeBoolean(queryCache);
    out.writeBoolean(fieldDataCache);
    out.writeBoolean(recycler);
    out.writeStringArrayNullable(fields);
    out.writeBoolean(requestCache);
}
 
Example 7
Source File: UpdateSettingsRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArrayNullable(indices);
    indicesOptions.writeIndicesOptions(out);
    writeSettingsToStream(settings, out);
    writeTimeout(out);
}
 
Example 8
Source File: IndicesShardStoresRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArrayNullable(indices);
    out.writeVInt(statuses.size());
    for (ClusterHealthStatus status : statuses) {
        out.writeByte(status.value());
    }
    indicesOptions.writeIndicesOptions(out);
}
 
Example 9
Source File: ShardSearchLocalRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
protected void innerWriteTo(StreamOutput out, boolean asKey) throws IOException {
    out.writeString(index);
    out.writeVInt(shardId);
    out.writeByte(searchType.id());
    if (!asKey) {
        out.writeVInt(numberOfShards);
    }
    if (scroll == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        scroll.writeTo(out);
    }
    out.writeBytesReference(source);
    out.writeBytesReference(extraSource);
    out.writeStringArray(types);
    out.writeStringArrayNullable(filteringAliases);
    if (!asKey) {
        out.writeVLong(nowInMillis);
    }

    out.writeBytesReference(templateSource);
    boolean hasTemplate = template != null;
    out.writeBoolean(hasTemplate);
    if (hasTemplate) {
        template.writeTo(out);
    }
    out.writeOptionalBoolean(requestCache);
}
 
Example 10
Source File: MultiPercolateRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArrayNullable(indices);
    out.writeOptionalString(documentType);
    indicesOptions.writeIndicesOptions(out);
    out.writeVInt(requests.size());
    for (PercolateRequest request : requests) {
        request.writeTo(out);
    }
}
 
Example 11
Source File: UpdateSettingsRequest.java    From crate with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArrayNullable(indices);
    indicesOptions.writeIndicesOptions(out);
    writeSettingsToStream(settings, out);
    out.writeBoolean(preserveExisting);
}
 
Example 12
Source File: CommonStatsFlags.java    From crate with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    long longFlags = 0;
    for (Flag flag : flags) {
        longFlags |= (1 << flag.getIndex());
    }
    out.writeLong(longFlags);

    out.writeStringArrayNullable(types);
    out.writeStringArrayNullable(groups);
    out.writeStringArrayNullable(fieldDataFields);
    out.writeStringArrayNullable(completionDataFields);
    out.writeBoolean(includeSegmentFileSizes);
}
 
Example 13
Source File: BaseTasksRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    taskId.writeTo(out);
    parentTaskId.writeTo(out);
    out.writeStringArrayNullable(nodesIds);
    out.writeStringArrayNullable(actions);
    out.writeOptionalStreamable(timeout);
}
 
Example 14
Source File: BaseNodesRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArrayNullable(nodesIds);
    if (timeout == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        timeout.writeTo(out);
    }
}
 
Example 15
Source File: PutMappingRequest.java    From crate with Apache License 2.0 5 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArrayNullable(indices);
    indicesOptions.writeIndicesOptions(out);
    out.writeOptionalString(type);
    out.writeString(source);
    out.writeBoolean(updateAllTypes);
    out.writeOptionalWriteable(concreteIndex);
}
 
Example 16
Source File: BroadcastRequest.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArrayNullable(indices);
    indicesOptions.writeIndicesOptions(out);
}
 
Example 17
Source File: CoordinateSearchMetadata.java    From siren-join with GNU Affero General Public License v3.0 4 votes vote down vote up
public void writeTo(StreamOutput out) throws IOException {
  out.writeStringArrayNullable(indices);
  out.writeStringArrayNullable(types);
  out.writeOptionalString(field);
}
 
Example 18
Source File: BroadcastRequest.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArrayNullable(indices);
    indicesOptions.writeIndicesOptions(out);
}
 
Example 19
Source File: OriginalIndices.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
public static void writeOriginalIndices(OriginalIndices originalIndices, StreamOutput out) throws IOException {
    out.writeStringArrayNullable(originalIndices.indices);
    originalIndices.indicesOptions.writeIndicesOptions(out);
}
 
Example 20
Source File: FieldStatsShardRequest.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeStringArrayNullable(fields);
}