本文整理汇总了Java中org.elasticsearch.Version.readVersion方法的典型用法代码示例。如果您正苦于以下问题:Java Version.readVersion方法的具体用法?Java Version.readVersion怎么用?Java Version.readVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.Version
的用法示例。
在下文中一共展示了Version.readVersion方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
version = Version.readVersion(in);
build = Build.readBuild(in);
if (in.readBoolean()) {
totalIndexingBuffer = new ByteSizeValue(in.readLong());
} else {
totalIndexingBuffer = null;
}
if (in.readBoolean()) {
settings = Settings.readSettingsFromStream(in);
}
os = in.readOptionalWriteable(OsInfo::new);
process = in.readOptionalWriteable(ProcessInfo::new);
jvm = in.readOptionalWriteable(JvmInfo::new);
threadPool = in.readOptionalWriteable(ThreadPoolInfo::new);
transport = in.readOptionalWriteable(TransportInfo::new);
http = in.readOptionalWriteable(HttpInfo::new);
plugins = in.readOptionalWriteable(PluginsAndModules::new);
ingest = in.readOptionalWriteable(IngestInfo::new);
}
示例2: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
id = in.readString();
int assignmentsSize = in.readVInt();
if (assignmentsSize > 0) {
updateAssignments = new Symbol[assignmentsSize];
for (int i = 0; i < assignmentsSize; i++) {
updateAssignments[i] = Symbol.fromStream(in);
}
}
int missingAssignmentsSize = in.readVInt();
if (missingAssignmentsSize > 0) {
this.insertValues = new Object[missingAssignmentsSize];
for (int i = 0; i < missingAssignmentsSize; i++) {
insertValues[i] = insertValuesStreamer[i].readValueFrom(in);
}
}
this.version = Version.readVersion(in).id;
versionType = VersionType.fromValue(in.readByte());
opType = IndexRequest.OpType.fromId(in.readByte());
if (in.readBoolean()) {
source = in.readBytesReference();
}
}
示例3: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
discoveryNode = in.readOptionalWriteable(DiscoveryNode::new);
clusterName = new ClusterName(in);
version = Version.readVersion(in);
}
示例4: DiscoveryNode
import org.elasticsearch.Version; //导入方法依赖的package包/类
/**
* Creates a new {@link DiscoveryNode} by reading from the stream provided as argument
* @param in the stream
* @throws IOException if there is an error while reading from the stream
*/
public DiscoveryNode(StreamInput in) throws IOException {
this.nodeName = in.readString().intern();
this.nodeId = in.readString().intern();
this.ephemeralId = in.readString().intern();
this.hostName = in.readString().intern();
this.hostAddress = in.readString().intern();
if (in.getVersion().onOrAfter(Version.V_5_0_3_UNRELEASED)) {
this.address = new TransportAddress(in);
} else {
// we need to do this to preserve the host information during pinging and joining of a master. Since the version of the
// DiscoveryNode is set to Version#minimumCompatibilityVersion(), the host information gets lost as we do not serialize the
// hostString for the address
this.address = new TransportAddress(in, hostName);
}
int size = in.readVInt();
this.attributes = new HashMap<>(size);
for (int i = 0; i < size; i++) {
this.attributes.put(in.readString(), in.readString());
}
int rolesSize = in.readVInt();
this.roles = EnumSet.noneOf(Role.class);
for (int i = 0; i < rolesSize; i++) {
int ordinal = in.readVInt();
if (ordinal < 0 || ordinal >= Role.values().length) {
throw new IOException("Unknown Role ordinal [" + ordinal + "]");
}
this.roles.add(Role.values()[ordinal]);
}
this.version = Version.readVersion(in);
}
示例5: SnapshotInfo
import org.elasticsearch.Version; //导入方法依赖的package包/类
/**
* Constructs snapshot information from stream input
*/
public SnapshotInfo(final StreamInput in) throws IOException {
snapshotId = new SnapshotId(in);
int size = in.readVInt();
List<String> indicesListBuilder = new ArrayList<>();
for (int i = 0; i < size; i++) {
indicesListBuilder.add(in.readString());
}
indices = Collections.unmodifiableList(indicesListBuilder);
state = SnapshotState.fromValue(in.readByte());
reason = in.readOptionalString();
startTime = in.readVLong();
endTime = in.readVLong();
totalShards = in.readVInt();
successfulShards = in.readVInt();
size = in.readVInt();
if (size > 0) {
List<SnapshotShardFailure> failureBuilder = new ArrayList<>();
for (int i = 0; i < size; i++) {
failureBuilder.add(SnapshotShardFailure.readSnapshotShardFailure(in));
}
shardFailures = Collections.unmodifiableList(failureBuilder);
} else {
shardFailures = Collections.emptyList();
}
if (in.getVersion().before(VERSION_INCOMPATIBLE_INTRODUCED)) {
version = Version.readVersion(in);
} else {
version = in.readBoolean() ? Version.readVersion(in) : null;
}
}
示例6: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int size = in.readVInt();
versions = new HashMap<>();
for (int i=0; i<size; i++) {
String index = in.readString();
Version upgradeVersion = Version.readVersion(in);
String oldestLuceneSegment = in.readString();
versions.put(index, new Tuple<>(upgradeVersion, oldestLuceneSegment));
}
readTimeout(in);
}
示例7: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
shardId = ShardId.readShardId(in);
primary = in.readBoolean();
upgradeVersion = Version.readVersion(in);
try {
oldestLuceneSegment = org.apache.lucene.util.Version.parse(in.readString());
} catch (ParseException ex) {
throw new IOException("failed to parse lucene version [" + oldestLuceneSegment + "]", ex);
}
}
示例8: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int size = in.readVInt();
versions = new HashMap<>();
for (int i=0; i<size; i++) {
String index = in.readString();
Version upgradeVersion = Version.readVersion(in);
String oldestLuceneSegment = in.readString();
versions.put(index, new Tuple<>(upgradeVersion, oldestLuceneSegment));
}
}
示例9: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
nodeName = in.readString();
version = Version.readVersion(in);
clusterName = new ClusterName(in);
clusterUuid = in.readString();
build = Build.readBuild(in);
available = in.readBoolean();
}
示例10: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
nodeName = in.readString().intern();
nodeId = in.readString().intern();
hostName = in.readString().intern();
hostAddress = in.readString().intern();
address = TransportAddressSerializers.addressFromStream(in);
int size = in.readVInt();
ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
for (int i = 0; i < size; i++) {
builder.put(in.readString().intern(), in.readString().intern());
}
attributes = builder.build();
version = Version.readVersion(in);
}
示例11: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
name = in.readString();
int size = in.readVInt();
List<String> indicesListBuilder = new ArrayList<>();
for (int i = 0; i < size; i++) {
indicesListBuilder.add(in.readString());
}
indices = Collections.unmodifiableList(indicesListBuilder);
state = SnapshotState.fromValue(in.readByte());
reason = in.readOptionalString();
startTime = in.readVLong();
endTime = in.readVLong();
totalShards = in.readVInt();
successfulShards = in.readVInt();
size = in.readVInt();
if (size > 0) {
List<SnapshotShardFailure> failureBuilder = new ArrayList<>();
for (int i = 0; i < size; i++) {
failureBuilder.add(SnapshotShardFailure.readSnapshotShardFailure(in));
}
shardFailures = Collections.unmodifiableList(failureBuilder);
} else {
shardFailures = Collections.emptyList();
}
version = Version.readVersion(in);
}
示例12: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int size = in.readVInt();
versions = newHashMap();
for (int i=0; i<size; i++) {
String index = in.readString();
Version upgradeVersion = Version.readVersion(in);
String oldestLuceneSegment = in.readString();
versions.put(index, new Tuple<>(upgradeVersion, oldestLuceneSegment));
}
readTimeout(in);
}
示例13: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int size = in.readVInt();
versions = newHashMap();
for (int i=0; i<size; i++) {
String index = in.readString();
Version upgradeVersion = Version.readVersion(in);
String oldestLuceneSegment = in.readString();
versions.put(index, new Tuple<>(upgradeVersion, oldestLuceneSegment));
}
}
示例14: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
version = Version.readVersion(in);
build = Build.readBuild(in);
if (in.readBoolean()) {
ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
int size = in.readVInt();
for (int i = 0; i < size; i++) {
builder.put(in.readString(), in.readString());
}
serviceAttributes = builder.build();
}
if (in.readBoolean()) {
settings = Settings.readSettingsFromStream(in);
}
if (in.readBoolean()) {
os = OsInfo.readOsInfo(in);
}
if (in.readBoolean()) {
process = ProcessInfo.readProcessInfo(in);
}
if (in.readBoolean()) {
jvm = JvmInfo.readJvmInfo(in);
}
if (in.readBoolean()) {
threadPool = ThreadPoolInfo.readThreadPoolInfo(in);
}
if (in.readBoolean()) {
transport = TransportInfo.readTransportInfo(in);
}
if (in.readBoolean()) {
http = HttpInfo.readHttpInfo(in);
}
if (in.readBoolean()) {
plugins = new PluginsAndModules();
plugins.readFrom(in);
}
}
示例15: readFrom
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
version = Version.readVersion(in);
}