@Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeVLong(fieldEvictions);
   out.writeVLong(fieldSize);
   out.writeVLong(filterSize);
   out.writeVLong(bloomSize);
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeByte(percolatorTypeId);
   out.writeVLong(requestedSize);
   out.writeVLong(count);
   out.writeVInt(matches.length);
   for (BytesRef match : matches) {
     out.writeBytesRef(match);
   }
   out.writeVLong(scores.length);
   for (float score : scores) {
     out.writeFloat(score);
   }
   out.writeVInt(hls.size());
   for (Map<String, HighlightField> hl : hls) {
     out.writeVInt(hl.size());
     for (Map.Entry<String, HighlightField> entry : hl.entrySet()) {
       out.writeString(entry.getKey());
       entry.getValue().writeTo(out);
     }
   }
   out.writeOptionalStreamable(aggregations);
   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);
     }
   }
 }
  @Override
  public void writeTo(StreamOutput out) throws IOException {
    shardId.writeTo(out);

    out.writeVInt(phase1FileNames.size());
    for (String phase1FileName : phase1FileNames) {
      out.writeUTF(phase1FileName);
    }

    out.writeVInt(phase1FileSizes.size());
    for (Long phase1FileSize : phase1FileSizes) {
      out.writeVLong(phase1FileSize);
    }

    out.writeVInt(phase1ExistingFileNames.size());
    for (String phase1ExistingFileName : phase1ExistingFileNames) {
      out.writeUTF(phase1ExistingFileName);
    }

    out.writeVInt(phase1ExistingFileSizes.size());
    for (Long phase1ExistingFileSize : phase1ExistingFileSizes) {
      out.writeVLong(phase1ExistingFileSize);
    }

    out.writeVLong(phase1TotalSize);
    out.writeVLong(phase1ExistingTotalSize);
  }
Example #4
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeVLong(heapInit);
   out.writeVLong(heapMax);
   out.writeVLong(nonHeapInit);
   out.writeVLong(nonHeapMax);
   out.writeVLong(directMemoryMax);
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeVLong(tookInMillis);
   out.writeVLong(count);
   out.writeVInt(matches.length);
   for (Match match : matches) {
     match.writeTo(out);
   }
 }
  @Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeVInt(phase1FileNames.size());
    for (String name : phase1FileNames) {
      out.writeUTF(name);
    }
    out.writeVInt(phase1FileSizes.size());
    for (long size : phase1FileSizes) {
      out.writeVLong(size);
    }

    out.writeVInt(phase1ExistingFileNames.size());
    for (String name : phase1ExistingFileNames) {
      out.writeUTF(name);
    }
    out.writeVInt(phase1ExistingFileSizes.size());
    for (long size : phase1ExistingFileSizes) {
      out.writeVLong(size);
    }

    out.writeVLong(phase1TotalSize);
    out.writeVLong(phase1ExistingTotalSize);
    out.writeVLong(phase1Time);
    out.writeVLong(phase1ThrottlingWaitTime);
    out.writeVLong(startTime);
    out.writeVInt(phase2Operations);
    out.writeVLong(phase2Time);
    out.writeVInt(phase3Operations);
    out.writeVLong(phase3Time);
  }
    @Override
    public void writeTo(StreamOutput out) throws IOException {
      out.writeVInt(versions.size());
      for (ObjectIntCursor<JvmVersion> v : versions) {
        v.key.writeTo(out);
        out.writeVInt(v.value);
      }

      out.writeVLong(threads);
      out.writeVLong(maxUptime);
      out.writeVLong(heapUsed);
      out.writeVLong(heapMax);
    }
Example #8
0
 @Override
 protected void doWriteTo(StreamOutput out) throws IOException {
   out.writeLong(docCountError);
   InternalOrder.Streams.writeOrder(order, out);
   writeSize(requiredSize, out);
   writeSize(shardSize, out);
   out.writeBoolean(showTermDocCountError);
   out.writeVLong(minDocCount);
   out.writeVLong(otherDocCount);
   out.writeVInt(buckets.size());
   for (InternalTerms.Bucket bucket : buckets) {
     bucket.writeTo(out);
   }
 }
 @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);
   if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_1_3_0)) {
     out.writeOptionalString(metaData.writtenBy() == null ? null : metaData.writtenBy().name());
   }
 }
  @Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeByte(comparatorType.id());
    out.writeVInt(requiredSize);
    out.writeVLong(missing);
    out.writeVLong(total);

    out.writeVInt(entries.size());
    for (LongEntry entry : entries) {
      out.writeLong(entry.term);
      out.writeVInt(entry.getCount());
    }
  }
  @Override
  public void writeTo(StreamOutput out) throws IOException {
    this.getShard().writeTo(out);
    out.writeBoolean(this.isPrimary());
    out.writeBoolean(this.isStillFetchingShardData());
    out.writeOptionalString(this.getAssignedNodeId());
    out.writeOptionalWriteable(this.getUnassignedInfo());
    out.writeVLong(allocationDelayMillis);
    out.writeVLong(remainingDelayMillis);

    out.writeVInt(this.nodeExplanations.size());
    for (NodeExplanation explanation : this.nodeExplanations.values()) {
      explanation.writeTo(out);
    }
  }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeUTF(index);
   out.writeVInt(shardId);
   out.writeByte(searchType.id());
   out.writeVInt(numberOfShards);
   if (scroll == null) {
     out.writeBoolean(false);
   } else {
     out.writeBoolean(true);
     scroll.writeTo(out);
   }
   out.writeBytesReference(source);
   out.writeBytesReference(extraSource);
   out.writeVInt(types.length);
   for (String type : types) {
     out.writeUTF(type);
   }
   if (filteringAliases != null) {
     out.writeVInt(filteringAliases.length);
     for (String index : filteringAliases) {
       out.writeUTF(index);
     }
   } else {
     out.writeVInt(0);
   }
   out.writeVLong(nowInMillis);
 }
  @Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    if (out.getVersion().before(Version.V_1_4_0)) {
      // term vector used to read & write the index twice, here and in the parent class
      out.writeString(index);
    }
    out.writeString(type);
    out.writeString(id);

    if (out.getVersion().onOrAfter(Version.V_1_4_0)) {
      out.writeBoolean(doc != null);
      if (doc != null) {
        out.writeBytesReference(doc);
      }
    }
    out.writeOptionalString(routing);
    out.writeOptionalString(preference);
    long longFlags = 0;
    for (Flag flag : flagsEnum) {
      longFlags |= (1 << flag.ordinal());
    }
    out.writeVLong(longFlags);
    if (selectedFields != null) {
      out.writeVInt(selectedFields.size());
      for (String selectedField : selectedFields) {
        out.writeString(selectedField);
      }
    } else {
      out.writeVInt(0);
    }
  }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeString(index);
   out.writeString(type);
   out.writeString(id);
   out.writeVLong(docVersion);
   final boolean docExists = isExists();
   out.writeBoolean(docExists);
   out.writeBoolean(artificial);
   out.writeVLong(tookInMillis);
   out.writeBoolean(hasTermVectors());
   if (hasTermVectors()) {
     out.writeBytesReference(headerRef);
     out.writeBytesReference(termVectors);
   }
 }
Example #15
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeVInt(count);
   out.writeVInt(cpuPercent);
   out.writeVLong(totalOpenFileDescriptors);
   out.writeLong(minOpenFileDescriptors);
   out.writeLong(maxOpenFileDescriptors);
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeString(name);
   out.writeVLong(length);
   out.writeString(checksum);
   out.writeString(writtenBy.toString());
   out.writeBytesRef(hash);
 }
Example #17
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeLong(term);
   out.writeVLong(getDocCount());
   if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1) && showDocCountError) {
     out.writeLong(docCountError);
   }
   aggregations.writeTo(out);
 }
Example #18
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeBytesRef(termBytes);
   out.writeVLong(getDocCount());
   if (showDocCountError) {
     out.writeLong(docCountError);
   }
   aggregations.writeTo(out);
 }
Example #19
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeVLong(timestamp);
   cpu.writeTo(out);
   mem.writeTo(out);
   swap.writeTo(out);
   if (out.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
     out.writeOptionalWriteable(cgroup);
   }
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeString(sourceNodeId);
   out.writeLong(transferId.getMostSignificantBits());
   out.writeLong(transferId.getLeastSignificantBits());
   out.writeVLong(currentPos);
   out.writeBytesReference(content);
   out.writeBoolean(isLast);
 }
  @Override
  public void writeTo(StreamOutput out) throws IOException {
    out.writeVLong(sizeInBytes);
    if (fields == null) {
      out.writeBoolean(false);
    } else {
      out.writeBoolean(true);
      out.writeVInt(fields.size());

      assert !fields.containsKey(null);
      final Object[] keys = fields.keys;
      final long[] values = fields.values;
      for (int i = 0; i < keys.length; i++) {
        if (keys[i] != null) {
          out.writeString((String) keys[i]);
          out.writeVLong(values[i]);
        }
      }
    }
  }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeUTF(name);
   out.writeVLong(length);
   if (checksum == null) {
     out.writeBoolean(false);
   } else {
     out.writeBoolean(true);
     out.writeUTF(checksum);
   }
 }
Example #23
0
 @Override
 protected void doWriteTo(StreamOutput out) throws IOException {
   if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
     out.writeLong(docCountError);
   }
   InternalOrder.Streams.writeOrder(order, out);
   ValueFormatterStreams.writeOptional(formatter, out);
   writeSize(requiredSize, out);
   if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta1)) {
     writeSize(shardSize, out);
     out.writeBoolean(showTermDocCountError);
   }
   out.writeVLong(minDocCount);
   if (out.getVersion().onOrAfter(Version.V_1_4_0)) {
     out.writeVLong(otherDocCount);
   }
   out.writeVInt(buckets.size());
   for (InternalTerms.Bucket bucket : buckets) {
     bucket.writeTo(out);
   }
 }
  @Override
  public void writeTo(StreamOutput out) throws IOException {
    out.writeUTF(name);
    out.writeByte(comparatorType.id());
    out.writeVInt(requiredSize);
    out.writeVLong(missing);

    out.writeVInt(entries.size());
    for (IntEntry entry : entries) {
      out.writeInt(entry.term);
      out.writeVInt(entry.count());
    }
  }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeString(name);
   InternalOrder.Streams.writeOrder(order, out);
   ValueFormatterStreams.writeOptional(valueFormatter, out);
   out.writeVInt(requiredSize);
   out.writeVInt(buckets.size());
   for (InternalTerms.Bucket bucket : buckets) {
     out.writeLong(((Bucket) bucket).term);
     out.writeVLong(bucket.getDocCount());
     ((InternalAggregations) bucket.getAggregations()).writeTo(out);
   }
 }
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   super.writeTo(out);
   out.writeVLong(timestamp);
   if (status == null) {
     out.writeBoolean(false);
   } else {
     out.writeBoolean(true);
     out.writeByte(status.value());
   }
   out.writeString(clusterUUID);
   nodesStats.writeTo(out);
   indicesStats.writeTo(out);
 }
  @Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    internalResponse.writeTo(out);
    out.writeVInt(totalShards);
    out.writeVInt(successfulShards);

    out.writeVInt(shardFailures.length);
    for (ShardSearchFailure shardSearchFailure : shardFailures) {
      shardSearchFailure.writeTo(out);
    }

    out.writeOptionalString(scrollId);
    out.writeVLong(tookInMillis);
  }
Example #28
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   totalStats.writeTo(out);
   out.writeVLong(openContexts);
   if (groupStats == null || groupStats.isEmpty()) {
     out.writeBoolean(false);
   } else {
     out.writeBoolean(true);
     out.writeVInt(groupStats.size());
     for (Map.Entry<String, Stats> entry : groupStats.entrySet()) {
       out.writeString(entry.getKey());
       entry.getValue().writeTo(out);
     }
   }
 }
Example #29
0
 @Override
 public void writeTo(StreamOutput out) throws IOException {
   out.writeString(name);
   if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) {
     out.writeLong(docCountError);
   }
   InternalOrder.Streams.writeOrder(order, out);
   ValueFormatterStreams.writeOptional(formatter, out);
   writeSize(requiredSize, out);
   if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta)) {
     writeSize(shardSize, out);
     out.writeBoolean(showTermDocCountError);
   }
   out.writeVLong(minDocCount);
   out.writeVInt(buckets.size());
   for (InternalTerms.Bucket bucket : buckets) {
     out.writeLong(((Bucket) bucket).term);
     out.writeVLong(bucket.getDocCount());
     if (out.getVersion().onOrAfter(Version.V_1_4_0_Beta) && showTermDocCountError) {
       out.writeLong(bucket.docCountError);
     }
     ((InternalAggregations) bucket.getAggregations()).writeTo(out);
   }
 }
Example #30
0
    @Override
    public void writeTo(StreamOutput out) throws IOException {
      out.writeVLong(queryCount);
      out.writeVLong(queryTimeInMillis);
      out.writeVLong(queryCurrent);

      out.writeVLong(fetchCount);
      out.writeVLong(fetchTimeInMillis);
      out.writeVLong(fetchCurrent);
    }