congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
StreamInput.readMap
Code IndexAdd Tabnine to your IDE (free)

How to use
readMap
method
in
org.elasticsearch.common.io.stream.StreamInput

Best Java code snippets using org.elasticsearch.common.io.stream.StreamInput.readMap (Showing top 20 results out of 315)

origin: floragunncom/search-guard

public User(final StreamInput in) throws IOException {
  super();
  name = in.readString();
  roles.addAll(in.readList(StreamInput::readString));
  requestedTenant = in.readString();
  attributes = in.readMap(StreamInput::readString, StreamInput::readString);
}

origin: org.elasticsearch/elasticsearch

@SuppressWarnings("unchecked")
DiffableStringMap(final StreamInput in) throws IOException {
  this((Map<String, String>) (Map) in.readMap());
}
origin: org.elasticsearch/elasticsearch

public AdaptiveSelectionStats(StreamInput in) throws IOException {
  this.clientOutgoingConnections = in.readMap(StreamInput::readString, StreamInput::readLong);
  this.nodeComputedStats = in.readMap(StreamInput::readString, ResponseCollectorService.ComputedNodeStats::new);
}
origin: org.elasticsearch/elasticsearch

private static Map<String, FieldCapabilities> readField(StreamInput in) throws IOException {
  return in.readMap(StreamInput::readString, FieldCapabilities::new);
}
origin: org.elasticsearch/elasticsearch

public PersistentTasksCustomMetaData(StreamInput in) throws IOException {
  lastAllocationId = in.readLong();
  tasks = in.readMap(StreamInput::readString, PersistentTask::new);
}
origin: org.elasticsearch/elasticsearch

WriteableIngestDocument(StreamInput in) throws IOException {
  Map<String, Object> sourceAndMetadata = in.readMap();
  Map<String, Object> ingestMetadata = in.readMap();
  if (in.getVersion().before(Version.V_6_0_0_beta1)) {
    ingestMetadata.computeIfPresent("timestamp", (k, o) -> {
      Date date = (Date) o;
      return date.toInstant().atZone(ZoneId.systemDefault());
    });
  }
  this.ingestDocument = new IngestDocument(sourceAndMetadata, ingestMetadata);
}
origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
protected AbstractAggregationBuilder(StreamInput in) throws IOException {
  super(in.readString());
  factoriesBuilder = new AggregatorFactories.Builder(in);
  metaData = in.readMap();
}
origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
@SuppressWarnings("unchecked")
private void read(StreamInput in) throws IOException {
  fields = in.readMap(StreamInput::readString, MultiValuesSourceFieldConfig::new);
  valueType = in.readOptionalWriteable(ValueType::readFromStream);
  format = in.readOptionalString();
}
origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
protected PipelineAggregator(StreamInput in) throws IOException {
  name = in.readString();
  bucketsPaths = in.readStringArray();
  metaData = in.readMap();
}
origin: org.elasticsearch/elasticsearch

public PrimaryContext(StreamInput in) throws IOException {
  clusterStateVersion = in.readVLong();
  checkpoints = in.readMap(StreamInput::readString, CheckpointState::new);
  routingTable = IndexShardRoutingTable.Builder.readFrom(in);
}
origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
protected InternalAggregation(StreamInput in) throws IOException {
  name = in.readString();
  metaData = in.readMap();
  pipelineAggregators = in.readNamedWriteableList(PipelineAggregator.class);
}
origin: org.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  this.indexName = in.readString();
  this.responseMap =
    in.readMap(StreamInput::readString, FieldCapabilities::new);
}
origin: org.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  totalStats = Stats.readStats(in);
  if (in.readBoolean()) {
    typeStats = in.readMap(StreamInput::readString, Stats::readStats);
  }
}
origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
protected AbstractPipelineAggregationBuilder(StreamInput in, String type) throws IOException {
  this(in.readString(), type, in.readStringArray());
  metaData = in.readMap();
}
origin: org.elasticsearch/elasticsearch

public CompositeAggregationBuilder(StreamInput in) throws IOException {
  super(in);
  int num = in.readVInt();
  this.sources = new ArrayList<>(num);
  for (int i = 0; i < num; i++) {
    CompositeValuesSourceBuilder<?> builder = CompositeValuesSourceParserHelper.readFrom(in);
    sources.add(builder);
  }
  this.size = in.readVInt();
  if (in.readBoolean()) {
    this.after = in.readMap();
  }
}
origin: org.elasticsearch/elasticsearch

public SearchStats(StreamInput in) throws IOException {
  totalStats = Stats.readStats(in);
  openContexts = in.readVLong();
  if (in.readBoolean()) {
    groupStats = in.readMap(StreamInput::readString, Stats::readStats);
  }
}
origin: org.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  this.responseMap =
    in.readMap(StreamInput::readString, FieldCapabilitiesResponse::readField);
  if (in.getVersion().onOrAfter(Version.V_5_5_0)) {
    indexResponses = in.readList(FieldCapabilitiesIndexResponse::new);
  } else {
    indexResponses = Collections.emptyList();
  }
}
origin: org.elasticsearch/elasticsearch

public ClusterInfo(StreamInput in) throws IOException {
  Map<String, DiskUsage> leastMap = in.readMap(StreamInput::readString, DiskUsage::new);
  Map<String, DiskUsage> mostMap = in.readMap(StreamInput::readString, DiskUsage::new);
  Map<String, Long> sizeMap = in.readMap(StreamInput::readString, StreamInput::readLong);
  Map<ShardRouting, String> routingMap = in.readMap(ShardRouting::new, StreamInput::readString);
  ImmutableOpenMap.Builder<String, DiskUsage> leastBuilder = ImmutableOpenMap.builder();
  this.leastAvailableSpaceUsage = leastBuilder.putAll(leastMap).build();
  ImmutableOpenMap.Builder<String, DiskUsage> mostBuilder = ImmutableOpenMap.builder();
  this.mostAvailableSpaceUsage = mostBuilder.putAll(mostMap).build();
  ImmutableOpenMap.Builder<String, Long> sizeBuilder = ImmutableOpenMap.builder();
  this.shardSizes = sizeBuilder.putAll(sizeMap).build();
  ImmutableOpenMap.Builder<ShardRouting, String> routingBuilder = ImmutableOpenMap.builder();
  this.routingToDataPath = routingBuilder.putAll(routingMap).build();
}
origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
public ScriptedMetricAggregationBuilder(StreamInput in) throws IOException {
  super(in);
  initScript = in.readOptionalWriteable(Script::new);
  mapScript = in.readOptionalWriteable(Script::new);
  combineScript = in.readOptionalWriteable(Script::new);
  reduceScript = in.readOptionalWriteable(Script::new);
  if (in.readBoolean()) {
    params = in.readMap();
  }
}
origin: org.elasticsearch/elasticsearch

/**
 * Reads a {@link StoredScriptSource} from a stream.  Version 5.3+ will read
 * all of the lang, source, and options parameters.  For versions prior to 5.3,
 * only the source parameter will be read in as a bytes reference.
 */
public StoredScriptSource(StreamInput in) throws IOException {
  if (in.getVersion().onOrAfter(Version.V_5_3_0)) {
    this.lang = in.readString();
    this.source = in.readString();
    @SuppressWarnings("unchecked")
    Map<String, String> options = (Map<String, String>)(Map)in.readMap();
    this.options = options;
  } else {
    this.lang = null;
    this.source = in.readBytesReference().utf8ToString();
    this.options = null;
  }
}
org.elasticsearch.common.io.streamStreamInputreadMap

Javadoc

Read a Map of K-type keys to V-type Lists.
 
Map<String, List<String>> map = in.readMapOfLists(StreamInput::readString, StreamInput::readString); 

Popular methods of StreamInput

  • readString
  • readVInt
    Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take
  • readBoolean
  • readOptionalString
  • readVLong
    Reads a long stored in variable-length format. Reads between one and ten bytes. Smaller values take
  • readInt
    Reads four bytes and returns an int.
  • readBytesReference
    Reads a bytes reference from this stream, might hold an actual reference to the underlying bytes of
  • getVersion
    The version of the node on the other side of this stream.
  • readLong
    Reads eight bytes and returns a long.
  • readOptionalWriteable
  • readStringArray
  • readByte
    Reads and returns a single byte.
  • readStringArray,
  • readByte,
  • readGenericValue,
  • readNamedWriteable,
  • readBytesRef,
  • readFloat,
  • readOptionalBytesReference,
  • read,
  • readList

Popular in Java

  • Start an intent from android
  • setContentView (Activity)
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Permission (java.security)
    Legacy security code; do not use.
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now