Java Code Examples for org.elasticsearch.common.io.stream.StreamInput#readVLong()
The following examples show how to use
org.elasticsearch.common.io.stream.StreamInput#readVLong() .
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: SignificantLongTerms.java From Elasticsearch with Apache License 2.0 | 6 votes |
@Override protected void doReadFrom(StreamInput in) throws IOException { this.formatter = ValueFormatterStreams.readOptional(in); this.requiredSize = readSize(in); this.minDocCount = in.readVLong(); this.subsetSize = in.readVLong(); this.supersetSize = in.readVLong(); significanceHeuristic = SignificanceHeuristicStreams.read(in); int size = in.readVInt(); List<InternalSignificantTerms.Bucket> buckets = new ArrayList<>(size); for (int i = 0; i < size; i++) { Bucket bucket = new Bucket(subsetSize, supersetSize, formatter); bucket.readFrom(in); buckets.add(bucket); } this.buckets = buckets; this.bucketMap = null; }
Example 2
Source File: JvmStats.java From Elasticsearch with Apache License 2.0 | 6 votes |
@Override public void readFrom(StreamInput in) throws IOException { timestamp = in.readVLong(); uptime = in.readVLong(); mem = Mem.readMem(in); threads = Threads.readThreads(in); gc = GarbageCollectors.readGarbageCollectors(in); if (in.readBoolean()) { int size = in.readVInt(); bufferPools = new ArrayList<>(size); for (int i = 0; i < size; i++) { BufferPool bufferPool = new BufferPool(); bufferPool.readFrom(in); bufferPools.add(bufferPool); } } }
Example 3
Source File: SQLResponse.java From Elasticsearch with Apache License 2.0 | 6 votes |
@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); boolean negative = in.readBoolean(); rowCount = in.readVLong(); if (negative) { rowCount = -rowCount; } int numCols = cols().length; int numRows = in.readInt(); rows = new Object[numRows][numCols]; for (int i = 0; i < numRows; i++) { for (int j = 0; j < numCols; j++) { rows[i][j] = in.readGenericValue(); } } }
Example 4
Source File: LongTerms.java From Elasticsearch with Apache License 2.0 | 6 votes |
@Override protected void doReadFrom(StreamInput in) throws IOException { this.docCountError = in.readLong(); this.order = InternalOrder.Streams.readOrder(in); this.formatter = ValueFormatterStreams.readOptional(in); this.requiredSize = readSize(in); this.shardSize = readSize(in); this.showTermDocCountError = in.readBoolean(); this.minDocCount = in.readVLong(); this.otherDocCount = in.readVLong(); int size = in.readVInt(); List<InternalTerms.Bucket> buckets = new ArrayList<>(size); for (int i = 0; i < size; i++) { Bucket bucket = new Bucket(formatter, showTermDocCountError); bucket.readFrom(in); buckets.add(bucket); } this.buckets = buckets; this.bucketMap = null; }
Example 5
Source File: SignificantStringTerms.java From Elasticsearch with Apache License 2.0 | 6 votes |
@Override protected void doReadFrom(StreamInput in) throws IOException { this.requiredSize = readSize(in); this.minDocCount = in.readVLong(); this.subsetSize = in.readVLong(); this.supersetSize = in.readVLong(); significanceHeuristic = SignificanceHeuristicStreams.read(in); int size = in.readVInt(); List<InternalSignificantTerms.Bucket> buckets = new ArrayList<>(size); for (int i = 0; i < size; i++) { Bucket bucket = new Bucket(subsetSize, supersetSize); bucket.readFrom(in); buckets.add(bucket); } this.buckets = buckets; this.bucketMap = null; }
Example 6
Source File: OsStats.java From crate with Apache License 2.0 | 5 votes |
public OsStats(StreamInput in) throws IOException { this.timestamp = in.readVLong(); this.cpu = new Cpu(in); this.mem = new Mem(in); this.swap = new Swap(in); this.cgroup = in.readOptionalWriteable(Cgroup::new); }
Example 7
Source File: UpdateProjection.java From crate with Apache License 2.0 | 5 votes |
public UpdateProjection(StreamInput in) throws IOException { uidSymbol = Symbols.fromStream(in); int assignmentColumnsSize = in.readVInt(); assignmentsColumns = new String[assignmentColumnsSize]; for (int i = 0; i < assignmentColumnsSize; i++) { assignmentsColumns[i] = in.readString(); } int assignmentsSize = in.readVInt(); assignments = new Symbol[assignmentsSize]; for (int i = 0; i < assignmentsSize; i++) { assignments[i] = Symbols.fromStream(in); } requiredVersion = in.readVLong(); if (requiredVersion == 0) { requiredVersion = null; } if (in.getVersion().onOrAfter(Version.V_4_2_0)) { int outputSize = in.readVInt(); outputs = new Symbol[outputSize]; for (int i = 0; i < outputSize; i++) { outputs[i] = Symbols.fromStream(in); } int returnValuesSize = in.readVInt(); if (returnValuesSize > 0) { returnValues = new Symbol[returnValuesSize]; for (int i = 0; i < returnValuesSize; i++) { returnValues[i] = Symbols.fromStream(in); } } } else { //Outputs should never be null and for BwC reasons //the default value in pre 4.1 was a long for a count outputs = new Symbol[]{new InputColumn(0, DataTypes.LONG)}; } }
Example 8
Source File: SearchStats.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void readFrom(StreamInput in) throws IOException { totalStats = Stats.readStats(in); openContexts = in.readVLong(); if (in.readBoolean()) { int size = in.readVInt(); groupStats = new HashMap<>(size); for (int i = 0; i < size; i++) { groupStats.put(in.readString(), Stats.readStats(in)); } } }
Example 9
Source File: ProcessStats.java From crate with Apache License 2.0 | 5 votes |
public ProcessStats(StreamInput in) throws IOException { timestamp = in.readVLong(); openFileDescriptors = in.readLong(); maxFileDescriptors = in.readLong(); cpu = in.readOptionalWriteable(Cpu::new); mem = in.readOptionalWriteable(Mem::new); }
Example 10
Source File: RecoveryResponse.java From crate with Apache License 2.0 | 5 votes |
RecoveryResponse(StreamInput in) throws IOException { int size = in.readVInt(); phase1FileNames = new ArrayList<>(size); for (int i = 0; i < size; i++) { phase1FileNames.add(in.readString()); } size = in.readVInt(); phase1FileSizes = new ArrayList<>(size); for (int i = 0; i < size; i++) { phase1FileSizes.add(in.readVLong()); } size = in.readVInt(); phase1ExistingFileNames = new ArrayList<>(size); for (int i = 0; i < size; i++) { phase1ExistingFileNames.add(in.readString()); } size = in.readVInt(); phase1ExistingFileSizes = new ArrayList<>(size); for (int i = 0; i < size; i++) { phase1ExistingFileSizes.add(in.readVLong()); } phase1TotalSize = in.readVLong(); phase1ExistingTotalSize = in.readVLong(); phase1Time = in.readVLong(); phase1ThrottlingWaitTime = in.readVLong(); startTime = in.readVLong(); phase2Operations = in.readVInt(); phase2Time = in.readVLong(); }
Example 11
Source File: ClusterStatsNodes.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void readFrom(StreamInput in) throws IOException { int size = in.readVInt(); versions = new ObjectIntHashMap<>(size); for (; size > 0; size--) { versions.addTo(JvmVersion.readJvmVersion(in), in.readVInt()); } threads = in.readVLong(); maxUptime = in.readVLong(); heapUsed = in.readVLong(); heapMax = in.readVLong(); }
Example 12
Source File: FieldStats.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void readFrom(StreamInput in) throws IOException { maxDoc = in.readVLong(); docCount = in.readLong(); sumDocFreq = in.readLong(); sumTotalTermFreq = in.readLong(); }
Example 13
Source File: JvmStats.java From crate with Apache License 2.0 | 5 votes |
public MemoryPool(StreamInput in) throws IOException { name = in.readString(); used = in.readVLong(); max = in.readVLong(); peakUsed = in.readVLong(); peakMax = in.readVLong(); }
Example 14
Source File: BulkResponse.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); responses = new BulkItemResponse[in.readVInt()]; for (int i = 0; i < responses.length; i++) { responses[i] = BulkItemResponse.readBulkItem(in); } tookInMillis = in.readVLong(); }
Example 15
Source File: SignificantLongTerms.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void readFrom(StreamInput in) throws IOException { subsetDf = in.readVLong(); supersetDf = in.readVLong(); term = in.readLong(); score = in.readDouble(); aggregations = InternalAggregations.readAggregations(in); }
Example 16
Source File: ClusterStatsNodes.java From Elasticsearch with Apache License 2.0 | 5 votes |
@Override public void readFrom(StreamInput in) throws IOException { count = in.readVInt(); cpuPercent = in.readVInt(); totalOpenFileDescriptors = in.readVLong(); minOpenFileDescriptors = in.readLong(); maxOpenFileDescriptors = in.readLong(); }
Example 17
Source File: ClearFilterJoinCacheNodeResponse.java From siren-join with GNU Affero General Public License v3.0 | 4 votes |
@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); timestamp = in.readVLong(); }
Example 18
Source File: Variance.java From Elasticsearch with Apache License 2.0 | 4 votes |
@Override public void readFrom(StreamInput in) throws IOException { sumOfSqrs = in.readDouble(); sum = in.readDouble(); count = in.readVLong(); }
Example 19
Source File: GetBlobHeadRequest.java From Elasticsearch with Apache License 2.0 | 4 votes |
@Override public void readFrom(StreamInput in) throws IOException { super.readFrom(in); endPos = in.readVLong(); }
Example 20
Source File: InternalGeoHashGrid.java From Elasticsearch with Apache License 2.0 | 4 votes |
@Override public void readFrom(StreamInput in) throws IOException { geohashAsLong = in.readLong(); docCount = in.readVLong(); aggregations = InternalAggregations.readAggregations(in); }