Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Snapshot Tool from 8.0+ #50784

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions test/fixtures/minio-fixture/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,3 @@ services:
ports:
- "9000"
command: ["server", "/minio/data"]

minio-fixture-for-snapshot-tool:
build:
context: .
args:
bucket: "bucket"
accessKey: "sn_tool_access_key"
secretKey: "sn_tool_secret_key"
dockerfile: Dockerfile
ports:
- "9000"
command: ["server", "/minio/data"]
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.elasticsearch.common.blobstore.BlobContainer;
import org.elasticsearch.common.blobstore.BlobMetaData;
import org.elasticsearch.common.blobstore.BlobPath;
import org.elasticsearch.common.blobstore.BlobStore;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
Expand All @@ -53,7 +52,6 @@
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.threadpool.ThreadPool;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
Expand All @@ -64,11 +62,8 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -246,46 +241,6 @@ private static void assertSnapshotUUIDs(BlobStoreRepository repository, Reposito
count, lessThanOrEqualTo(maxShardCountsExpected.get(indexId)))));
}

public static long createDanglingIndex(BlobStoreRepository repository, String name, Set<String> files)
throws InterruptedException, ExecutionException {
final PlainActionFuture<Void> future = PlainActionFuture.newFuture();
final AtomicLong totalSize = new AtomicLong();
repository.threadPool().generic().execute(ActionRunnable.run(future, () -> {
final BlobStore blobStore = repository.blobStore();
BlobContainer container =
blobStore.blobContainer(repository.basePath().add("indices").add(name));
for (String file : files) {
int size = randomIntBetween(0, 10);
totalSize.addAndGet(size);
container.writeBlob(file, new ByteArrayInputStream(new byte[size]), size, false);
}
}));
future.get();
return totalSize.get();
}

public static void assertCorruptionVisible(BlobStoreRepository repository, Map<String, Set<String>> indexToFiles) {
final PlainActionFuture<Boolean> future = PlainActionFuture.newFuture();
repository.threadPool().generic().execute(ActionRunnable.supply(future, () -> {
final BlobStore blobStore = repository.blobStore();
for (String index : indexToFiles.keySet()) {
if (blobStore.blobContainer(repository.basePath().add("indices"))
.children().containsKey(index) == false) {
return false;
}
for (String file : indexToFiles.get(index)) {
try (InputStream ignored =
blobStore.blobContainer(repository.basePath().add("indices").add(index)).readBlob(file)) {
} catch (NoSuchFileException e) {
return false;
}
}
}
return true;
}));
assertTrue(future.actionGet());
}

public static void assertBlobsByPrefix(BlobStoreRepository repository, BlobPath path, String prefix, Map<String, BlobMetaData> blobs) {
final PlainActionFuture<Map<String, BlobMetaData>> future = PlainActionFuture.newFuture();
repository.threadPool().generic().execute(
Expand Down
203 changes: 0 additions & 203 deletions x-pack/snapshot-tool/build.gradle

This file was deleted.

1 change: 0 additions & 1 deletion x-pack/snapshot-tool/licenses/api-common-1.8.1.jar.sha1

This file was deleted.

27 changes: 0 additions & 27 deletions x-pack/snapshot-tool/licenses/api-common-LICENSE.txt

This file was deleted.

Empty file.
Loading