APISonar


org.elasticsearch.index.snapshots.IndexShardSnapshotStatus.time

> org > elasticsearch > index > snapshots > IndexShardSnapshotStatus > time
org APIs elasticsearch APIs index APIs snapshots APIs IndexShardSnapshotStatus APIs time APIs

Example 1
SnapshotStats(IndexShardSnapshotStatus indexShardStatus) {
        startTime = indexShardStatus.startTime();
        time = indexShardStatus.time();
        numberOfFiles = indexShardStatus.numberOfFiles();
        processedFiles = indexShardStatus.processedFiles();
        totalSize = indexShardStatus.totalSize();
        processedSize = indexShardStatus.processedSize();
    }
Example 2
public IndexShardSnapshotStatus getShardSnapshotStatus(SnapshotId snapshotId, Version version, IndexId indexId, ShardId shardId) {
        Context context = new Context(snapshotId, version, indexId, shardId);
        BlobStoreIndexShardSnapshot snapshot = context.loadSnapshot();
        IndexShardSnapshotStatus status = new IndexShardSnapshotStatus();
        status.updateStage(IndexShardSnapshotStatus.Stage.DONE);
        status.startTime(snapshot.startTime());
        status.files(snapshot.numberOfFiles(), snapshot.totalSize());
        // The snapshot is done which means the number of processed files is the same as total
        status.processedFiles(snapshot.numberOfFiles(), snapshot.totalSize());
        status.time(snapshot.time());
        return status;
    }