public void takeSnapshot()

in adapters/base/src/main/java/org/apache/cassandra/sidecar/adapters/base/CassandraStorageOperations.java [69:100]


    public void takeSnapshot(@NotNull String tag, @NotNull String keyspace, @NotNull String table,
                             @Nullable Map<String, String> options)
    {
        requireNonNull(tag, "snapshot tag must be non-null");
        requireNonNull(keyspace, "keyspace for the  must be non-null");
        requireNonNull(table, "table must be non-null");
        try
        {
            jmxClient.proxy(StorageJmxOperations.class, STORAGE_SERVICE_OBJ_NAME)
                     .takeSnapshot(tag, options, keyspace + "." + table);
        }
        catch (IOException e)
        {
            String errorMessage = e.getMessage();
            if (errorMessage != null)
            {
                if (errorMessage.contains("Snapshot " + tag + " already exists"))
                {
                    throw new SnapshotAlreadyExistsException(e);
                }
                else if (errorMessage.contains("Keyspace " + keyspace + " does not exist"))
                {
                    throw new IllegalArgumentException(e);
                }
                else if (errorMessage.contains("Cannot snapshot until bootstrap completes"))
                {
                    throw new NodeBootstrappingException(e);
                }
            }
            throw new RuntimeException(e);
        }
    }