Java Code Examples for org.elasticsearch.common.io.stream.StreamOutput#writeBoolean()
The following examples show how to use
org.elasticsearch.common.io.stream.StreamOutput#writeBoolean() .
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: TransportShardMultiPercolateAction.java From Elasticsearch with Apache License 2.0 | 6 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeVInt(shardId); out.writeOptionalString(preference); out.writeVInt(items.size()); for (Item item : items) { out.writeVInt(item.slot); OriginalIndices.writeOriginalIndices(item.request.originalIndices(), out); out.writeString(item.request.documentType()); out.writeBytesReference(item.request.source()); out.writeBytesReference(item.request.docSource()); out.writeBoolean(item.request.onlyCount()); if (out.getVersion().onOrAfter(Version.V_2_3_0)) { out.writeLong(item.request.getStartTime()); } } }
Example 2
Source File: WriterProjection.java From Elasticsearch with Apache License 2.0 | 6 votes |
@Override public void writeTo(StreamOutput out) throws IOException { out.writeBoolean(isDirectoryUri); Symbol.toStream(uri, out); if (outputNames != null) { out.writeVInt(outputNames.size()); for (String name : outputNames) { out.writeString(name); } } else { out.writeVInt(0); } Symbol.toStream(inputs, out); out.writeVInt(overwrites.size()); for (Map.Entry<ColumnIdent, Symbol> entry : overwrites.entrySet()) { entry.getKey().writeTo(out); Symbol.toStream(entry.getValue(), out); } out.writeInt(compressionType != null ? compressionType.ordinal() : -1); out.writeInt(outputFormat.ordinal()); }
Example 3
Source File: ShardUpsertRequest.java From Elasticsearch with Apache License 2.0 | 6 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); // Stream References if (updateColumns != null) { out.writeVInt(updateColumns.length); for (String column : updateColumns) { out.writeString(column); } } else { out.writeVInt(0); } if (insertColumns != null) { out.writeVInt(insertColumns.length); for (Reference reference : insertColumns) { Reference.toStream(reference, out); } } else { out.writeVInt(0); } out.writeBoolean(continueOnError); out.writeBoolean(overwriteDuplicates); out.writeBoolean(validateGeneratedColumns); writeItems(out); }
Example 4
Source File: TransportTasksAction.java From Elasticsearch with Apache License 2.0 | 6 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeString(nodeId); out.writeVInt(results.size()); for (TaskResponse result : results) { if (result != null) { out.writeBoolean(true); result.writeTo(out); } else { out.writeBoolean(false); } } out.writeBoolean(exceptions != null); if (exceptions != null) { int taskFailures = exceptions.size(); out.writeVInt(taskFailures); for (TaskOperationFailure exception : exceptions) { exception.writeTo(out); } } }
Example 5
Source File: InternalScriptedMetric.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override protected void doWriteTo(StreamOutput out) throws IOException { boolean hasScript = reduceScript != null; out.writeBoolean(hasScript); if (hasScript) { reduceScript.writeTo(out); } out.writeGenericValue(aggregation); }
Example 6
Source File: DeleteIndexedScriptResponse.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeString(index); out.writeString(type); out.writeString(id); out.writeLong(version); out.writeBoolean(found); }
Example 7
Source File: IndexResponse.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeString(index); out.writeString(type); out.writeString(id); out.writeLong(version); out.writeBoolean(created); }
Example 8
Source File: SearchScrollRequest.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeString(scrollId); if (scroll == null) { out.writeBoolean(false); } else { out.writeBoolean(true); scroll.writeTo(out); } }
Example 9
Source File: RecoveryFileChunkRequest.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeLong(recoveryId); shardId.writeTo(out); out.writeString(metaData.name()); out.writeVLong(position); out.writeVLong(metaData.length()); out.writeOptionalString(metaData.checksum()); out.writeBytesReference(content); out.writeOptionalString(metaData.writtenBy() == null ? null : metaData.writtenBy().toString()); out.writeBoolean(lastChunk); out.writeVInt(totalTranslogOps); out.writeLong(sourceThrottleTimeInNanos); }
Example 10
Source File: IntegerType.java From crate with Apache License 2.0 | 5 votes |
@Override public void writeValueTo(StreamOutput out, Integer v) throws IOException { out.writeBoolean(v == null); if (v != null) { out.writeInt(v); } }
Example 11
Source File: TransportNodesListGatewayMetaState.java From crate with Apache License 2.0 | 5 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); if (metaData == null) { out.writeBoolean(false); } else { out.writeBoolean(true); metaData.writeTo(out); } }
Example 12
Source File: StartRecoveryRequest.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeLong(recoveryId); shardId.writeTo(out); sourceNode.writeTo(out); targetNode.writeTo(out); out.writeBoolean(markAsRelocated); metadataSnapshot.writeTo(out); out.writeByte(recoveryType.id()); }
Example 13
Source File: DocumentGroup.java From elasticsearch-carrot2 with Apache License 2.0 | 5 votes |
@Override public void writeTo(StreamOutput out) throws IOException { out.writeVInt(id); out.writeDouble(score); out.writeStringArray(phrases); out.writeBoolean(ungroupedDocuments); out.writeStringArray(documentReferences); out.writeVInt(subgroups.length); for (DocumentGroup group : subgroups) { group.writeTo(out); } }
Example 14
Source File: TermsByQueryRequest.java From siren-join with GNU Affero General Public License v3.0 | 4 votes |
/** * Serialize * * @param out the output * @throws IOException */ @Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeOptionalString(routing); out.writeOptionalString(preference); if (querySource != null) { out.writeBoolean(true); out.writeBytesReference(querySource); } else { out.writeBoolean(false); } if (types == null) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeStringArray(types); } out.writeString(field); out.writeVLong(nowInMillis); if (ordering == null) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeVInt(ordering.ordinal()); } if (maxTermsPerShard == null) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeVInt(maxTermsPerShard); } if (termsEncoding == null) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeVInt(termsEncoding.ordinal()); } if (expectedTerms == null) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeVLong(expectedTerms); } }
Example 15
Source File: NodeInfo.java From Elasticsearch with Apache License 2.0 | 4 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeVInt(version.id); Build.writeBuild(build, out); if (getServiceAttributes() == null) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeVInt(serviceAttributes.size()); for (Map.Entry<String, String> entry : serviceAttributes.entrySet()) { out.writeString(entry.getKey()); out.writeString(entry.getValue()); } } if (settings == null) { out.writeBoolean(false); } else { out.writeBoolean(true); Settings.writeSettingsToStream(settings, out); } if (os == null) { out.writeBoolean(false); } else { out.writeBoolean(true); os.writeTo(out); } if (process == null) { out.writeBoolean(false); } else { out.writeBoolean(true); process.writeTo(out); } if (jvm == null) { out.writeBoolean(false); } else { out.writeBoolean(true); jvm.writeTo(out); } if (threadPool == null) { out.writeBoolean(false); } else { out.writeBoolean(true); threadPool.writeTo(out); } if (transport == null) { out.writeBoolean(false); } else { out.writeBoolean(true); transport.writeTo(out); } if (http == null) { out.writeBoolean(false); } else { out.writeBoolean(true); http.writeTo(out); } if (plugins == null) { out.writeBoolean(false); } else { out.writeBoolean(true); plugins.writeTo(out); } }
Example 16
Source File: EsRejectedExecutionException.java From Elasticsearch with Apache License 2.0 | 4 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeBoolean(isExecutorShutdown); }
Example 17
Source File: DistributedResultResponse.java From Elasticsearch with Apache License 2.0 | 4 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeBoolean(needMore); }
Example 18
Source File: UpgradeRequest.java From Elasticsearch with Apache License 2.0 | 4 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeBoolean(upgradeOnlyAncientSegments); }
Example 19
Source File: IndicesSegmentsRequest.java From Elasticsearch with Apache License 2.0 | 4 votes |
@Override public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); out.writeBoolean(verbose); }
Example 20
Source File: QuerySearchResult.java From Elasticsearch with Apache License 2.0 | 4 votes |
public void writeToNoId(StreamOutput out) throws IOException { // shardTarget.writeTo(out); out.writeVInt(from); out.writeVInt(size); writeTopDocs(out, topDocs); if (aggregations == null) { out.writeBoolean(false); } else { out.writeBoolean(true); aggregations.writeTo(out); } if (pipelineAggregators == null) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeVInt(pipelineAggregators.size()); for (PipelineAggregator pipelineAggregator : pipelineAggregators) { out.writeBytesReference(pipelineAggregator.type().stream()); pipelineAggregator.writeTo(out); } } if (suggest == null) { out.writeBoolean(false); } else { out.writeBoolean(true); suggest.writeTo(out); } out.writeBoolean(searchTimedOut); out.writeOptionalBoolean(terminatedEarly); if (out.getVersion().onOrAfter(Version.V_2_2_0)) { if (profileShardResults == null) { out.writeBoolean(false); } else { out.writeBoolean(true); out.writeVInt(profileShardResults.size()); for (ProfileShardResult shardResult : profileShardResults) { shardResult.writeTo(out); } } } }