Java Code Examples for org.elasticsearch.common.io.stream.StreamInput#readOptionalWriteable()
The following examples show how to use
org.elasticsearch.common.io.stream.StreamInput#readOptionalWriteable() .
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: JoinPhase.java From crate with Apache License 2.0 | 6 votes |
JoinPhase(StreamInput in) throws IOException { super(in); distributionInfo = new DistributionInfo(in); int numExecutionNodes = in.readVInt(); if (numExecutionNodes > 0) { executionNodes = new HashSet<>(numExecutionNodes); for (int i = 0; i < numExecutionNodes; i++) { executionNodes.add(in.readString()); } } else { executionNodes = null; } leftMergePhase = in.readOptionalWriteable(MergePhase::new); rightMergePhase = in.readOptionalWriteable(MergePhase::new); numLeftOutputs = in.readVInt(); numRightOutputs = in.readVInt(); if (in.readBoolean()) { joinCondition = Symbols.fromStream(in); } else { joinCondition = null; } joinType = JoinType.values()[in.readVInt()]; }
Example 2
Source File: AddFeaturesToSetAction.java From elasticsearch-learning-to-rank with Apache License 2.0 | 5 votes |
public AddFeaturesToSetRequest(StreamInput in) throws IOException { super(in); store = in.readString(); features = in.readList(StoredFeature::new); if (in.readBoolean()) { featureNameQuery = in.readOptionalString(); } merge = in.readBoolean(); featureSet = in.readString(); routing = in.readOptionalString(); validation = in.readOptionalWriteable(FeatureValidation::new); }
Example 3
Source File: CreateModelFromSetAction.java From elasticsearch-learning-to-rank with Apache License 2.0 | 5 votes |
public CreateModelFromSetRequest(StreamInput in) throws IOException { super(in); store = in.readString(); featureSetName = in.readString(); expectedSetVersion = in.readOptionalLong(); modelName = in.readString(); definition = new StoredLtrModel.LtrModelDefinition(in); routing = in.readOptionalString(); validation = in.readOptionalWriteable(FeatureValidation::new); }
Example 4
Source File: FeatureStoreAction.java From elasticsearch-learning-to-rank with Apache License 2.0 | 5 votes |
public FeatureStoreRequest(StreamInput in) throws IOException { super(in); store = in.readString(); routing = in.readOptionalString(); action = Action.values()[in.readVInt()]; storableElement = in.readNamedWriteable(StorableElement.class); validation = in.readOptionalWriteable(FeatureValidation::new); }
Example 5
Source File: ExtendedOsStats.java From crate with Apache License 2.0 | 5 votes |
public ExtendedOsStats(StreamInput in) throws IOException { timestamp = in.readLong(); uptime = in.readLong(); loadAverage = in.readDoubleArray(); cpu = in.readOptionalWriteable(Cpu::new); osStats = in.readOptionalWriteable(OsStats::new); }
Example 6
Source File: UsersMetaData.java From crate with Apache License 2.0 | 5 votes |
public UsersMetaData(StreamInput in) throws IOException { int numUsers = in.readVInt(); users = new HashMap<>(numUsers); for (int i = 0; i < numUsers; i++) { String userName = in.readString(); SecureHash secureHash = in.readOptionalWriteable(SecureHash::readFrom); users.put(userName, secureHash); } }
Example 7
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 8
Source File: NodeStatsContext.java From crate with Apache License 2.0 | 5 votes |
public NodeStatsContext(StreamInput in, boolean complete) throws IOException { this.complete = complete; this.id = DataTypes.STRING.readValueFrom(in); this.name = DataTypes.STRING.readValueFrom(in); this.hostname = DataTypes.STRING.readValueFrom(in); this.timestamp = in.readLong(); this.version = in.readBoolean() ? Version.readVersion(in) : null; this.build = in.readBoolean() ? Build.readBuild(in) : null; this.restUrl = DataTypes.STRING.readValueFrom(in); this.pgPort = in.readOptionalVInt(); this.httpPort = in.readOptionalVInt(); this.transportPort = in.readOptionalVInt(); this.jvmStats = in.readOptionalWriteable(JvmStats::new); this.osInfo = in.readOptionalWriteable(OsInfo::new); this.processStats = in.readOptionalWriteable(ProcessStats::new); this.osStats = in.readOptionalWriteable(OsStats::new); this.fsInfo = in.readOptionalWriteable(FsInfo::new); this.extendedOsStats = in.readOptionalWriteable(ExtendedOsStats::new); this.threadPools = in.readOptionalWriteable(ThreadPoolStats::new); this.httpStats = in.readOptionalWriteable(HttpStats::new); this.psqlStats = in.readOptionalWriteable(ConnectionStats::new); this.openTransportConnections = in.readLong(); this.clusterStateVersion = in.readLong(); this.osName = DataTypes.STRING.readValueFrom(in); this.osArch = DataTypes.STRING.readValueFrom(in); this.osVersion = DataTypes.STRING.readValueFrom(in); this.javaVersion = DataTypes.STRING.readValueFrom(in); this.jvmName = DataTypes.STRING.readValueFrom(in); this.jvmVendor = DataTypes.STRING.readValueFrom(in); this.jvmVersion = DataTypes.STRING.readValueFrom(in); }
Example 9
Source File: MultiValuesSourceAggregationBuilder.java From elasticsearch-linear-regression with Apache License 2.0 | 5 votes |
/** * Read from a stream. */ @SuppressWarnings("unchecked") private void read(StreamInput in) throws IOException { fields = (ArrayList<String>) in.readGenericValue(); valueType = in.readOptionalWriteable(ValueType::readFromStream); format = in.readOptionalString(); missingMap = in.readMap(); }
Example 10
Source File: NodeAllocationResult.java From crate with Apache License 2.0 | 5 votes |
public NodeAllocationResult(StreamInput in) throws IOException { node = new DiscoveryNode(in); shardStoreInfo = in.readOptionalWriteable(ShardStoreInfo::new); canAllocateDecision = in.readOptionalWriteable(Decision::readFrom); nodeDecision = AllocationDecision.readFrom(in); weightRanking = in.readVInt(); }
Example 11
Source File: ThreadPool.java From crate with Apache License 2.0 | 5 votes |
public Info(StreamInput in) throws IOException { name = in.readString(); type = ThreadPoolType.fromType(in.readString()); min = in.readInt(); max = in.readInt(); keepAlive = in.readOptionalTimeValue(); queueSize = in.readOptionalWriteable(SizeValue::new); }
Example 12
Source File: MoveDecision.java From crate with Apache License 2.0 | 5 votes |
public MoveDecision(StreamInput in) throws IOException { super(in); allocationDecision = in.readOptionalWriteable(AllocationDecision::readFrom); canRemainDecision = in.readOptionalWriteable(Decision::readFrom); clusterRebalanceDecision = in.readOptionalWriteable(Decision::readFrom); currentNodeRanking = in.readVInt(); }
Example 13
Source File: AlterUserRequest.java From crate with Apache License 2.0 | 4 votes |
public AlterUserRequest(StreamInput in) throws IOException { super(in); userName = in.readString(); secureHash = in.readOptionalWriteable(SecureHash::readFrom); }
Example 14
Source File: CommonStats.java From crate with Apache License 2.0 | 4 votes |
public CommonStats(StreamInput in) throws IOException { docs = in.readOptionalWriteable(DocsStats::new); store = in.readOptionalWriteable(StoreStats::new); }
Example 15
Source File: WindowFrameDefinition.java From crate with Apache License 2.0 | 4 votes |
public WindowFrameDefinition(StreamInput in) throws IOException { mode = in.readEnum(Mode.class); start = new FrameBoundDefinition(in); end = in.readOptionalWriteable(FrameBoundDefinition::new); }
Example 16
Source File: AbstractAllocationDecision.java From crate with Apache License 2.0 | 4 votes |
protected AbstractAllocationDecision(StreamInput in) throws IOException { targetNode = in.readOptionalWriteable(DiscoveryNode::new); nodeDecisions = in.readBoolean() ? Collections.unmodifiableList(in.readList(NodeAllocationResult::new)) : null; }
Example 17
Source File: ActionTransportException.java From crate with Apache License 2.0 | 4 votes |
public ActionTransportException(StreamInput in) throws IOException { super(in); address = in.readOptionalWriteable(TransportAddress::new); action = in.readOptionalString(); }
Example 18
Source File: TransportService.java From crate with Apache License 2.0 | 4 votes |
public HandshakeResponse(StreamInput in) throws IOException { discoveryNode = in.readOptionalWriteable(DiscoveryNode::new); clusterName = new ClusterName(in); version = Version.readVersion(in); }
Example 19
Source File: ConnectTransportException.java From crate with Apache License 2.0 | 4 votes |
public ConnectTransportException(StreamInput in) throws IOException { super(in); node = in.readOptionalWriteable(DiscoveryNode::new); }
Example 20
Source File: NodeStats.java From crate with Apache License 2.0 | 4 votes |
public NodeStats(StreamInput in) throws IOException { super(in); timestamp = in.readVLong(); fs = in.readOptionalWriteable(FsInfo::new); }