@Deprecated @ThreadSafe public class AdminService extends java.lang.Object implements DistributedStorageAdmin
Constructor and Description |
---|
AdminService(DistributedStorageAdmin admin)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addNewColumnToTable(java.lang.String namespace,
java.lang.String table,
java.lang.String columnName,
DataType columnType)
Deprecated.
Adds a new column to an existing table.
|
void |
addRawColumnToTable(java.lang.String namespace,
java.lang.String table,
java.lang.String columnName,
DataType columnType)
Deprecated.
Add a column in the table without updating the metadata table in ScalarDB.
|
void |
close()
Deprecated.
Closes connections to the storage.
|
void |
createIndex(java.lang.String namespace,
java.lang.String table,
java.lang.String columnName,
java.util.Map<java.lang.String,java.lang.String> options)
Deprecated.
Creates a secondary index for the specified column of the specified table.
|
void |
createNamespace(java.lang.String namespace,
java.util.Map<java.lang.String,java.lang.String> options)
Deprecated.
Creates a namespace.
|
void |
createTable(java.lang.String namespace,
java.lang.String table,
TableMetadata metadata,
java.util.Map<java.lang.String,java.lang.String> options)
Deprecated.
Creates a new table.
|
void |
dropIndex(java.lang.String namespace,
java.lang.String table,
java.lang.String columnName)
Deprecated.
Drops a secondary index for the specified column of the specified table.
|
void |
dropNamespace(java.lang.String namespace)
Deprecated.
Drops the specified namespace.
|
void |
dropTable(java.lang.String namespace,
java.lang.String table)
Deprecated.
Drops the specified table.
|
TableMetadata |
getImportTableMetadata(java.lang.String namespace,
java.lang.String table,
java.util.Map<java.lang.String,DataType> overrideColumnsType)
Deprecated.
Get import table metadata in the ScalarDB format.
|
java.util.Set<java.lang.String> |
getNamespaceNames()
Deprecated.
Returns the names of the existing namespaces.
|
java.util.Set<java.lang.String> |
getNamespaceTableNames(java.lang.String namespace)
Deprecated.
Returns the names of the table belonging to the given namespace.
|
StorageInfo |
getStorageInfo(java.lang.String namespace)
Deprecated.
Returns the storage information.
|
TableMetadata |
getTableMetadata(java.lang.String namespace,
java.lang.String table)
Deprecated.
Retrieves the table metadata of the specified table.
|
void |
importTable(java.lang.String namespace,
java.lang.String table,
java.util.Map<java.lang.String,java.lang.String> options,
java.util.Map<java.lang.String,DataType> overrideColumnsType)
Deprecated.
Imports an existing table that is not managed by ScalarDB.
|
boolean |
namespaceExists(java.lang.String namespace)
Deprecated.
Returns true if the namespace exists.
|
void |
repairTable(java.lang.String namespace,
java.lang.String table,
TableMetadata metadata,
java.util.Map<java.lang.String,java.lang.String> options)
Deprecated.
Repairs a table which may be in an unknown state.
|
void |
truncateTable(java.lang.String namespace,
java.lang.String table)
Deprecated.
Truncates the specified table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getImportTableMetadata
addNewColumnToTable, createIndex, createIndex, createIndex, createNamespace, createNamespace, createNamespace, createTable, createTable, createTable, dropIndex, dropNamespace, dropTable, importTable, indexExists, tableExists
@Inject public AdminService(DistributedStorageAdmin admin)
public void createNamespace(java.lang.String namespace, java.util.Map<java.lang.String,java.lang.String> options) throws ExecutionException
Admin
createNamespace
in interface Admin
namespace
- the namespace to createoptions
- namespace creation optionsExecutionException
- if the operation failspublic void createTable(java.lang.String namespace, java.lang.String table, TableMetadata metadata, java.util.Map<java.lang.String,java.lang.String> options) throws ExecutionException
Admin
createTable
in interface Admin
namespace
- a namespace already createdtable
- a table to createmetadata
- a metadata to createoptions
- options to createExecutionException
- if the operation failspublic void dropTable(java.lang.String namespace, java.lang.String table) throws ExecutionException
Admin
dropTable
in interface Admin
namespace
- a namespace to droptable
- a table to dropExecutionException
- if the operation failspublic void dropNamespace(java.lang.String namespace) throws ExecutionException
Admin
dropNamespace
in interface Admin
namespace
- a namespace to dropExecutionException
- if the operation failspublic void truncateTable(java.lang.String namespace, java.lang.String table) throws ExecutionException
Admin
truncateTable
in interface Admin
namespace
- a namespace to truncatetable
- a table to truncateExecutionException
- if the operation failspublic void createIndex(java.lang.String namespace, java.lang.String table, java.lang.String columnName, java.util.Map<java.lang.String,java.lang.String> options) throws ExecutionException
Admin
createIndex
in interface Admin
namespace
- a namespace to create a secondary indextable
- a table to create a secondary indexcolumnName
- a name of the target columnoptions
- options to create a secondary indexExecutionException
- if the operation failspublic void dropIndex(java.lang.String namespace, java.lang.String table, java.lang.String columnName) throws ExecutionException
Admin
dropIndex
in interface Admin
namespace
- a namespace to drop a secondary indextable
- a table to drop a secondary indexcolumnName
- a name of the target columnExecutionException
- if the operation failspublic TableMetadata getTableMetadata(java.lang.String namespace, java.lang.String table) throws ExecutionException
Admin
getTableMetadata
in interface Admin
namespace
- a namespace to retrievetable
- a table to retrieveExecutionException
- if the operation failspublic java.util.Set<java.lang.String> getNamespaceTableNames(java.lang.String namespace) throws ExecutionException
Admin
getNamespaceTableNames
in interface Admin
namespace
- a namespaceExecutionException
- if the operation failspublic boolean namespaceExists(java.lang.String namespace) throws ExecutionException
Admin
namespaceExists
in interface Admin
namespace
- a namespaceExecutionException
- if the operation failspublic void repairTable(java.lang.String namespace, java.lang.String table, TableMetadata metadata, java.util.Map<java.lang.String,java.lang.String> options) throws ExecutionException
Admin
repairTable
in interface Admin
namespace
- an existing namespacetable
- an existing tablemetadata
- the metadata associated to the table to repairoptions
- options to repairExecutionException
- if the operation failspublic void addNewColumnToTable(java.lang.String namespace, java.lang.String table, java.lang.String columnName, DataType columnType) throws ExecutionException
Admin
addNewColumnToTable
in interface Admin
namespace
- the table namespacetable
- the table namecolumnName
- the name of the new columncolumnType
- the type of the new columnExecutionException
- if the operation failspublic TableMetadata getImportTableMetadata(java.lang.String namespace, java.lang.String table, java.util.Map<java.lang.String,DataType> overrideColumnsType) throws ExecutionException
DistributedStorageAdmin
getImportTableMetadata
in interface DistributedStorageAdmin
namespace
- namespace name of import tabletable
- import table nameoverrideColumnsType
- a map of column data type by column name. Only set the column for
which you want to override the default data type mapping.ExecutionException
- if the operation failspublic void addRawColumnToTable(java.lang.String namespace, java.lang.String table, java.lang.String columnName, DataType columnType) throws ExecutionException
DistributedStorageAdmin
addRawColumnToTable
in interface DistributedStorageAdmin
namespace
- namespace name of import tabletable
- import table namecolumnName
- name of the column to be addedcolumnType
- type of the column to be addedExecutionException
- if the operation failspublic void importTable(java.lang.String namespace, java.lang.String table, java.util.Map<java.lang.String,java.lang.String> options, java.util.Map<java.lang.String,DataType> overrideColumnsType) throws ExecutionException
Admin
importTable
in interface Admin
namespace
- an existing namespacetable
- an existing tableoptions
- options to importoverrideColumnsType
- a map of column data type by column name. Only set the column for
which you want to override the default data type mapping.ExecutionException
- if the operation failspublic java.util.Set<java.lang.String> getNamespaceNames() throws ExecutionException
Admin
getNamespaceNames
in interface Admin
ExecutionException
- if the operation failspublic StorageInfo getStorageInfo(java.lang.String namespace) throws ExecutionException
DistributedStorageAdmin
getStorageInfo
in interface DistributedStorageAdmin
namespace
- the namespace to get the storage information forExecutionException
- if the operation failspublic void close()
DistributedStorageAdmin
close
in interface DistributedStorageAdmin
close
in interface java.lang.AutoCloseable