|
@@ -48,7 +48,10 @@ import org.elasticsearch.common.unit.TimeValue;
|
|
|
import org.elasticsearch.common.xcontent.XContentType;
|
|
|
import org.elasticsearch.repositories.fs.FsRepository;
|
|
|
import org.elasticsearch.rest.RestStatus;
|
|
|
+import org.elasticsearch.snapshots.SnapshotId;
|
|
|
import org.elasticsearch.snapshots.SnapshotInfo;
|
|
|
+import org.elasticsearch.snapshots.SnapshotShardFailure;
|
|
|
+import org.elasticsearch.snapshots.SnapshotState;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.util.HashMap;
|
|
@@ -496,7 +499,14 @@ public class SnapshotClientDocumentationIT extends ESRestHighLevelClientTestCase
|
|
|
// end::get-snapshots-execute
|
|
|
|
|
|
// tag::get-snapshots-response
|
|
|
- List<SnapshotInfo> snapshotsInfos = response.getSnapshots(); // <1>
|
|
|
+ List<SnapshotInfo> snapshotsInfos = response.getSnapshots();
|
|
|
+ SnapshotInfo snapshotInfo = snapshotsInfos.get(0);
|
|
|
+ RestStatus restStatus = snapshotInfo.status(); // <1>
|
|
|
+ SnapshotId snapshotId = snapshotInfo.snapshotId(); // <2>
|
|
|
+ SnapshotState snapshotState = snapshotInfo.state(); // <3>
|
|
|
+ List<SnapshotShardFailure> snapshotShardFailures = snapshotInfo.shardFailures(); // <4>
|
|
|
+ long startTime = snapshotInfo.startTime(); // <5>
|
|
|
+ long endTime = snapshotInfo.endTime(); // <6>
|
|
|
// end::get-snapshots-response
|
|
|
assertEquals(1, snapshotsInfos.size());
|
|
|
}
|