The administrative client for Fluss, which supports managing and inspecting tables, servers, configurations and ACLs. @since 0.1
| 84 | * @since 0.1 |
| 85 | */ |
| 86 | @PublicEvolving |
| 87 | public interface Admin extends AutoCloseable { |
| 88 | |
| 89 | /** Get the current server node information. asynchronously. */ |
| 90 | CompletableFuture<List<ServerNode>> getServerNodes(); |
| 91 | |
| 92 | /** |
| 93 | * Get the latest table schema of the given table asynchronously. |
| 94 | * |
| 95 | * <p>The following exceptions can be anticipated when calling {@code get()} on returned future. |
| 96 | * |
| 97 | * <ul> |
| 98 | * <li>{@link TableNotExistException} if the table does not exist. |
| 99 | * </ul> |
| 100 | * |
| 101 | * @param tablePath the table path of the table. |
| 102 | */ |
| 103 | CompletableFuture<SchemaInfo> getTableSchema(TablePath tablePath); |
| 104 | |
| 105 | /** |
| 106 | * Get the specific table schema of the given table by schema id asynchronously. |
| 107 | * |
| 108 | * <p>The following exceptions can be anticipated when calling {@code get()} on returned future. |
| 109 | * |
| 110 | * <ul> |
| 111 | * <li>{@link TableNotExistException} if the table does not exist. |
| 112 | * <li>{@link SchemaNotExistException} if the schema does not exist. |
| 113 | * </ul> |
| 114 | * |
| 115 | * @param tablePath the table path of the table. |
| 116 | */ |
| 117 | CompletableFuture<SchemaInfo> getTableSchema(TablePath tablePath, int schemaId); |
| 118 | |
| 119 | /** |
| 120 | * Create a new database asynchronously. |
| 121 | * |
| 122 | * <p>The following exceptions can be anticipated when calling {@code get()} on returned future. |
| 123 | * |
| 124 | * <ul> |
| 125 | * <li>{@link DatabaseAlreadyExistException} if the database already exists and {@code |
| 126 | * ignoreIfExists} is false. |
| 127 | * </ul> |
| 128 | * |
| 129 | * @param databaseName The name of the database to create. |
| 130 | * @param databaseDescriptor The descriptor of the database to create. |
| 131 | * @param ignoreIfExists Flag to specify behavior when a database with the given name already |
| 132 | * exists: if set to false, throw a DatabaseAlreadyExistException, if set to true, do |
| 133 | * nothing. |
| 134 | * @throws InvalidDatabaseException if the database name is invalid, e.g., contains illegal |
| 135 | * characters, or exceeds the maximum length. |
| 136 | */ |
| 137 | CompletableFuture<Void> createDatabase( |
| 138 | String databaseName, DatabaseDescriptor databaseDescriptor, boolean ignoreIfExists); |
| 139 | |
| 140 | /** |
| 141 | * Get the database with the given database name asynchronously. |
| 142 | * |
| 143 | * <p>The following exceptions can be anticipated when calling {@code get()} on returned future. |
no outgoing calls
no test coverage detected