当前位置: 首页>>代码示例>>Java>>正文


Java ShardId.readShardId方法代码示例

本文整理汇总了Java中org.elasticsearch.index.shard.ShardId.readShardId方法的典型用法代码示例。如果您正苦于以下问题:Java ShardId.readShardId方法的具体用法?Java ShardId.readShardId怎么用?Java ShardId.readShardId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.elasticsearch.index.shard.ShardId的用法示例。


在下文中一共展示了ShardId.readShardId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public SnapshotsInProgress readFrom(StreamInput in) throws IOException {
    Entry[] entries = new Entry[in.readVInt()];
    for (int i = 0; i < entries.length; i++) {
        SnapshotId snapshotId = SnapshotId.readSnapshotId(in);
        boolean includeGlobalState = in.readBoolean();
        State state = State.fromValue(in.readByte());
        int indices = in.readVInt();
        List<String> indexBuilder = new ArrayList<>();
        for (int j = 0; j < indices; j++) {
            indexBuilder.add(in.readString());
        }
        long startTime = in.readLong();
        ImmutableMap.Builder<ShardId, ShardSnapshotStatus> builder = ImmutableMap.builder();
        int shards = in.readVInt();
        for (int j = 0; j < shards; j++) {
            ShardId shardId = ShardId.readShardId(in);
            String nodeId = in.readOptionalString();
            State shardState = State.fromValue(in.readByte());
            builder.put(shardId, new ShardSnapshotStatus(nodeId, shardState));
        }
        entries[i] = new Entry(snapshotId, includeGlobalState, state, Collections.unmodifiableList(indexBuilder), startTime, builder.build());
    }
    return new SnapshotsInProgress(entries);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:26,代码来源:SnapshotsInProgress.java

示例2: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    int numberOfSnapshots = in.readVInt();
    Map<Snapshot, Map<ShardId, SnapshotIndexShardStatus>> snapshotMapBuilder = new HashMap<>(numberOfSnapshots);
    for (int i = 0; i < numberOfSnapshots; i++) {
        Snapshot snapshot = new Snapshot(in);
        int numberOfShards = in.readVInt();
        Map<ShardId, SnapshotIndexShardStatus> shardMapBuilder = new HashMap<>(numberOfShards);
        for (int j = 0; j < numberOfShards; j++) {
            ShardId shardId =  ShardId.readShardId(in);
            SnapshotIndexShardStatus status = SnapshotIndexShardStatus.readShardSnapshotStatus(in);
            shardMapBuilder.put(shardId, status);
        }
        snapshotMapBuilder.put(snapshot, unmodifiableMap(shardMapBuilder));
    }
    status = unmodifiableMap(snapshotMapBuilder);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:19,代码来源:TransportNodesSnapshotsStatus.java

示例3: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    if (in.readBoolean()) {
        internalShardId = ShardId.readShardId(in);
    }
    index = in.readOptionalString();
    // no need to pass threading over the network, they are always false when coming throw a thread pool
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:SingleShardRequest.java

示例4: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    shardId = ShardId.readShardId(in);
    expectedCommitId = new Engine.CommitId(in);
    syncId = in.readString();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:SyncedFlushService.java

示例5: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    recoveryId = in.readLong();
    shardId = ShardId.readShardId(in);
    currentOffset = in.readLong();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:8,代码来源:RecoveryCheckTranslogOffsetRequest.java

示例6: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    recoveryId = in.readLong();
    shardId = ShardId.readShardId(in);
    clusterStateVersion = in.readVLong();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:RecoveryWaitForClusterStateRequest.java

示例7: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public synchronized void readFrom(StreamInput in) throws IOException {
    timer.readFrom(in);
    stage = Stage.fromId(in.readByte());
    shardId = ShardId.readShardId(in);
    recoverySource = RecoverySource.readFrom(in);
    targetNode = new DiscoveryNode(in);
    sourceNode = in.readOptionalWriteable(DiscoveryNode::new);
    index.readFrom(in);
    translog.readFrom(in);
    verifyIndex.readFrom(in);
    primary = in.readBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:RecoveryState.java

示例8: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    recoveryId = in.readLong();
    shardId = ShardId.readShardId(in);
    sourceNode = new DiscoveryNode(in);
    targetNode = new DiscoveryNode(in);
    metadataSnapshot = new Store.MetadataSnapshot(in);
    primaryRelocation = in.readBoolean();
    if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha1_UNRELEASED)) {
        startingSeqNo = in.readLong();
    } else {
        startingSeqNo = SequenceNumbersService.UNASSIGNED_SEQ_NO;
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:16,代码来源:StartRecoveryRequest.java

示例9: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    recoveryId = in.readLong();
    shardId = ShardId.readShardId(in);
    int size = in.readVInt();
    phase1FileNames = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        phase1FileNames.add(in.readString());
    }

    size = in.readVInt();
    phase1FileSizes = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        phase1FileSizes.add(in.readVLong());
    }

    size = in.readVInt();
    phase1ExistingFileNames = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        phase1ExistingFileNames.add(in.readString());
    }

    size = in.readVInt();
    phase1ExistingFileSizes = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        phase1ExistingFileSizes.add(in.readVLong());
    }
    totalTranslogOps = in.readVInt();
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:31,代码来源:RecoveryFilesInfoRequest.java

示例10: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    clusterName = new ClusterName(in);
    indexUUID = in.readString();
    shardId = ShardId.readShardId(in);
    timeout = new TimeValue(in.readLong(), TimeUnit.MILLISECONDS);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:IndicesStore.java

示例11: SearchShardTarget

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
public SearchShardTarget(StreamInput in) throws IOException {
    if (in.readBoolean()) {
        nodeId = in.readText();
    } else {
        nodeId = null;
    }
    shardId = ShardId.readShardId(in);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:SearchShardTarget.java

示例12: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的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);
    }

}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:13,代码来源:ShardUpgradeResult.java

示例13: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    shardId = ShardId.readShardId(in);
    allocationId = in.readString();
    primaryTerm = in.readVLong();
    message = in.readString();
    failure = in.readException();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:ShardStateAction.java

示例14: readFrom

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    recoveryId = in.readLong();
    shardId = ShardId.readShardId(in);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:7,代码来源:RecoveryFinalizeRecoveryRequest.java

示例15: ShardRouting

import org.elasticsearch.index.shard.ShardId; //导入方法依赖的package包/类
public ShardRouting(StreamInput in) throws IOException {
    this(ShardId.readShardId(in), in);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:4,代码来源:ShardRouting.java


注:本文中的org.elasticsearch.index.shard.ShardId.readShardId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。