protected void initialize( BlobStore blobStore, ClusterName clusterName, @Nullable ByteSizeValue defaultChunkSize) throws IOException { this.blobStore = blobStore; this.chunkSize = componentSettings.getAsBytesSize("chunk_size", defaultChunkSize); this.basePath = BlobPath.cleanPath().add(clusterName.value()); this.metaDataBlobContainer = blobStore.immutableBlobContainer(basePath.add("metadata")); this.currentIndex = findLatestIndex(); this.compress = componentSettings.getAsBoolean("compress", true); logger.debug("Latest metadata found at index [" + currentIndex + "]"); }
@Override public void reset() throws Exception { blobStore.delete(BlobPath.cleanPath()); }