@ThreadSafe public final class RetryHandlingTableMasterClient extends AbstractMasterClient implements TableMasterClient
AbstractClient.RpcCallable<V>
TableMasterClient.Factory
mAlwaysEnableTLS, mChannel, mClosed, mConnected, mContext, mServerAddress, mServiceVersion, mVersionService
Constructor and Description |
---|
RetryHandlingTableMasterClient(MasterClientContext conf)
Creates a new block master client.
|
Modifier and Type | Method and Description |
---|---|
protected void |
afterConnect()
This method is called after the connection is made to the remote.
|
SyncStatus |
attachDatabase(String udbType,
String udbConnectionUri,
String udbDbName,
String dbName,
Map<String,String> configuration,
boolean ignoreSyncErrors)
Attaches an existing database.
|
boolean |
detachDatabase(String dbName)
Detaches an existing database in the catalog master.
|
List<String> |
getAllDatabases()
Get a list of all database names.
|
List<String> |
getAllTables(String databaseName)
Get a list of all table names.
|
List<TransformJobInfo> |
getAllTransformJobInfo() |
Database |
getDatabase(String databaseName)
Get database metadata.
|
Map<String,List<ColumnStatisticsInfo>> |
getPartitionColumnStatistics(String databaseName,
String tableName,
List<String> partitionNames,
List<String> columnNames)
Get column statistics for selected partition and column.
|
List<String> |
getPartitionNames(String databaseName,
String tableName)
Get partition names with given database name and table name.
|
protected ServiceType |
getRemoteServiceType() |
protected String |
getServiceName() |
protected long |
getServiceVersion() |
TableInfo |
getTable(String databaseName,
String tableName)
Get table metadata.
|
List<ColumnStatisticsInfo> |
getTableColumnStatistics(String databaseName,
String tableName,
List<String> columnNames)
Get table column statistics with given database name,
table name and list of column names.
|
TransformJobInfo |
getTransformJobInfo(long jobId) |
List<Partition> |
readTable(String databaseName,
String tableName,
Constraint constraint)
Returns metadata for reading a table given constraints.
|
SyncStatus |
syncDatabase(String dbName)
Syncs an existing database in the catalog master.
|
long |
transformTable(String dbName,
String tableName,
String definition)
Transforms a table.
|
afterDisconnect, beforeConnect, getConfAddress, queryGrpcServerAddress
beforeDisconnect, checkVersion, close, connect, connectWithRuntimeException, createChannel, disconnect, getRemoteHostName, getRemoteServiceVersion, getRemoteSockAddress, isClosed, isConnected, retryRPC, retryRPC
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connect, disconnect, getConfAddress, getRemoteHostName, getRemoteSockAddress, isClosed, isConnected
public RetryHandlingTableMasterClient(MasterClientContext conf)
conf
- master client configurationprotected ServiceType getRemoteServiceType()
getRemoteServiceType
in class AbstractClient
protected String getServiceName()
getServiceName
in class AbstractClient
protected long getServiceVersion()
getServiceVersion
in class AbstractClient
protected void afterConnect()
AbstractClient
afterConnect
in class AbstractClient
public List<String> getAllDatabases() throws AlluxioStatusException
TableMasterClient
getAllDatabases
in interface TableMasterClient
AlluxioStatusException
public Database getDatabase(String databaseName) throws AlluxioStatusException
TableMasterClient
getDatabase
in interface TableMasterClient
databaseName
- database nameAlluxioStatusException
public List<String> getAllTables(String databaseName) throws AlluxioStatusException
TableMasterClient
getAllTables
in interface TableMasterClient
databaseName
- database nameAlluxioStatusException
public TableInfo getTable(String databaseName, String tableName) throws AlluxioStatusException
TableMasterClient
getTable
in interface TableMasterClient
databaseName
- database nametableName
- table nameAlluxioStatusException
public SyncStatus attachDatabase(String udbType, String udbConnectionUri, String udbDbName, String dbName, Map<String,String> configuration, boolean ignoreSyncErrors) throws AlluxioStatusException
TableMasterClient
attachDatabase
in interface TableMasterClient
udbType
- the database typeudbConnectionUri
- the udb connection uriudbDbName
- the database name in the udbdbName
- the database name in Alluxioconfiguration
- the configuration mapignoreSyncErrors
- will ignore sync errors if trueAlluxioStatusException
public boolean detachDatabase(String dbName) throws AlluxioStatusException
TableMasterClient
detachDatabase
in interface TableMasterClient
dbName
- database nameAlluxioStatusException
public SyncStatus syncDatabase(String dbName) throws AlluxioStatusException
TableMasterClient
syncDatabase
in interface TableMasterClient
dbName
- database nameAlluxioStatusException
public List<Partition> readTable(String databaseName, String tableName, Constraint constraint) throws AlluxioStatusException
TableMasterClient
readTable
in interface TableMasterClient
databaseName
- database nametableName
- table nameconstraint
- constraint on the columnsAlluxioStatusException
public List<ColumnStatisticsInfo> getTableColumnStatistics(String databaseName, String tableName, List<String> columnNames) throws AlluxioStatusException
TableMasterClient
getTableColumnStatistics
in interface TableMasterClient
databaseName
- database nametableName
- table namecolumnNames
- column namesAlluxioStatusException
public List<String> getPartitionNames(String databaseName, String tableName) throws AlluxioStatusException
TableMasterClient
getPartitionNames
in interface TableMasterClient
databaseName
- database nametableName
- table nameAlluxioStatusException
public Map<String,List<ColumnStatisticsInfo>> getPartitionColumnStatistics(String databaseName, String tableName, List<String> partitionNames, List<String> columnNames) throws AlluxioStatusException
TableMasterClient
getPartitionColumnStatistics
in interface TableMasterClient
databaseName
- database nametableName
- table namepartitionNames
- partition namescolumnNames
- column namesMap<String partitionName, Map<String columnName,
columnStatistics>>
AlluxioStatusException
public long transformTable(String dbName, String tableName, String definition) throws AlluxioStatusException
TableMasterClient
transformTable
in interface TableMasterClient
dbName
- the database nametableName
- the table namedefinition
- the transformation definitionAlluxioStatusException
public TransformJobInfo getTransformJobInfo(long jobId) throws AlluxioStatusException
getTransformJobInfo
in interface TableMasterClient
jobId
- the transformation job's IDAlluxioStatusException
public List<TransformJobInfo> getAllTransformJobInfo() throws AlluxioStatusException
getAllTransformJobInfo
in interface TableMasterClient
AlluxioStatusException
Copyright © 2023. All Rights Reserved.