org.elasticsearch.cluster.ClusterState.readFrom()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中org.elasticsearch.cluster.ClusterState.readFrom()方法的一些代码示例,展示了ClusterState.readFrom()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ClusterState.readFrom()方法的具体详情如下:
包路径:org.elasticsearch.cluster.ClusterState
类名称:ClusterState
方法名:readFrom

ClusterState.readFrom介绍

暂无

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  this.state = ClusterState.readFrom(in, null);
}

代码示例来源:origin: org.elasticsearch/elasticsearch

/**
   * @param data      input bytes
   * @param localNode used to set the local node in the cluster state.
   */
  public static ClusterState fromBytes(byte[] data, DiscoveryNode localNode, NamedWriteableRegistry registry) throws IOException {
    StreamInput in = new NamedWriteableAwareStreamInput(StreamInput.wrap(data), registry);
    return readFrom(in, localNode);
  }
}

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
    super.readFrom(in);
    state = ClusterState.readFrom(in, null);
    explanations = RoutingExplanations.readFrom(in);
  } else {
    state = ClusterState.readFrom(in, null);
    acknowledged = in.readBoolean();
    explanations = RoutingExplanations.readFrom(in);
  }
}

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  clusterName = new ClusterName(in);
  if (in.getVersion().onOrAfter(Version.V_6_6_0)) {
    clusterState = in.readOptionalWriteable(innerIn -> ClusterState.readFrom(innerIn, null));
  } else {
    clusterState = ClusterState.readFrom(in, null);
  }
  if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha1)) {
    totalCompressedSize = new ByteSizeValue(in);
  } else {
    // in a mixed cluster, if a pre 6.0 node processes the get cluster state
    // request, then a compressed size won't be returned, so just return 0;
    // its a temporary situation until all nodes in the cluster have been upgraded,
    // at which point the correct cluster state size will always be reported
    totalCompressedSize = new ByteSizeValue(0L);
  }
  if (in.getVersion().onOrAfter(Version.V_6_6_0)) {
    waitForTimedOut = in.readBoolean();
  }
}

代码示例来源:origin: org.elasticsearch/elasticsearch

incomingState = ClusterState.readFrom(in, transportService.getLocalNode());
fullClusterStateReceivedCount.incrementAndGet();
logger.debug("received full cluster state version [{}] with size [{}]", incomingState.version(),

代码示例来源:origin: harbby/presto-connectors

/**
 * @param in                 input stream
 * @param localNode          used to set the local node in the cluster state. can be null.
 */
public static ClusterState readFrom(StreamInput in, @Nullable DiscoveryNode localNode) throws IOException {
  return PROTO.readFrom(in, localNode);
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  this.state = ClusterState.readFrom(in, null);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  this.state = ClusterState.readFrom(in, null);
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  this.state = ClusterState.readFrom(in, null);
}

代码示例来源:origin: harbby/presto-connectors

@Override
public ClusterState readFrom(StreamInput in) throws IOException {
  return readFrom(in, nodes.localNode());
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

/**
   * @param data      input bytes
   * @param localNode used to set the local node in the cluster state.
   */
  public static ClusterState fromBytes(byte[] data, DiscoveryNode localNode, NamedWriteableRegistry registry) throws IOException {
    StreamInput in = new NamedWriteableAwareStreamInput(StreamInput.wrap(data), registry);
    return readFrom(in, localNode);
  }
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  clusterName = new ClusterName(in);
  clusterState = ClusterState.readFrom(in, null);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
   * @param data      input bytes
   * @param localNode used to set the local node in the cluster state.
   */
  public static ClusterState fromBytes(byte[] data, DiscoveryNode localNode, NamedWriteableRegistry registry) throws IOException {
    StreamInput in = new NamedWriteableAwareStreamInput(StreamInput.wrap(data), registry);
    return readFrom(in, localNode);
  }
}

代码示例来源:origin: apache/servicemix-bundles

/**
   * @param data      input bytes
   * @param localNode used to set the local node in the cluster state.
   */
  public static ClusterState fromBytes(byte[] data, DiscoveryNode localNode, NamedWriteableRegistry registry) throws IOException {
    StreamInput in = new NamedWriteableAwareStreamInput(StreamInput.wrap(data), registry);
    return readFrom(in, localNode);
  }
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  state = ClusterState.readFrom(in, null);
  readAcknowledged(in);
  explanations = RoutingExplanations.readFrom(in);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
    super.readFrom(in);
    state = ClusterState.readFrom(in, null);
    explanations = RoutingExplanations.readFrom(in);
  } else {
    state = ClusterState.readFrom(in, null);
    acknowledged = in.readBoolean();
    explanations = RoutingExplanations.readFrom(in);
  }
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public void readFrom(StreamInput in) throws IOException {
  if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
    super.readFrom(in);
    state = ClusterState.readFrom(in, null);
    explanations = RoutingExplanations.readFrom(in);
  } else {
    state = ClusterState.readFrom(in, null);
    acknowledged = in.readBoolean();
    explanations = RoutingExplanations.readFrom(in);
  }
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  clusterName = new ClusterName(in);
  clusterState = ClusterState.readFrom(in, null);
  if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha1)) {
    totalCompressedSize = new ByteSizeValue(in);
  } else {
    // in a mixed cluster, if a pre 6.0 node processes the get cluster state
    // request, then a compressed size won't be returned, so just return 0;
    // its a temporary situation until all nodes in the cluster have been upgraded,
    // at which point the correct cluster state size will always be reported
    totalCompressedSize = new ByteSizeValue(0L);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  clusterName = new ClusterName(in);
  clusterState = ClusterState.readFrom(in, null);
  if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha1)) {
    totalCompressedSize = new ByteSizeValue(in);
  } else {
    // in a mixed cluster, if a pre 6.0 node processes the get cluster state
    // request, then a compressed size won't be returned, so just return 0;
    // its a temporary situation until all nodes in the cluster have been upgraded,
    // at which point the correct cluster state size will always be reported
    totalCompressedSize = new ByteSizeValue(0L);
  }
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

incomingState = ClusterState.readFrom(in, clusterStateSupplier.get().nodes().getLocalNode());
logger.debug("received full cluster state version [{}] with size [{}]", incomingState.version(),
  request.bytes().length());

相关文章