public class DefaultTableMaster extends CoreMaster implements TableMaster, DelegatingJournaled
mBackupManager, mJournalSystem, mPort, mSafeModeManager, mStartTimeMs
mClock, mMasterContext
Constructor and Description |
---|
DefaultTableMaster(CoreMasterContext context,
JobMasterClient jobMasterClient)
Constructor for DefaultTableMaster.
|
Modifier and Type | Method and Description |
---|---|
boolean |
attachDatabase(String udbType,
String udbConnectionUri,
String udbDbName,
String dbName,
Map<String,String> configuration)
Attach an existing database to the catalog.
|
void |
close()
Closes the server.
|
boolean |
detachDatabase(String dbName)
Remove an existing database in the catalog.
|
List<String> |
getAllDatabases()
Get a listing of all databases.
|
List<String> |
getAllTables(String databaseName)
Get a listing of all tables in a database.
|
List<TransformJobInfo> |
getAllTransformJobInfo() |
Database |
getDatabase(String dbName)
Gets a database object.
|
Journaled |
getDelegate() |
Set<Class<? extends Server>> |
getDependencies() |
String |
getName() |
Map<String,ColumnStatisticsList> |
getPartitionColumnStatistics(String dbName,
String tableName,
List<String> partNamesList,
List<String> colNamesList)
Get statistics on the partitions.
|
Map<ServiceType,GrpcService> |
getServices() |
Table |
getTable(String dbName,
String tableName)
Get a table.
|
List<ColumnStatisticsInfo> |
getTableColumnStatistics(String dbName,
String tableName,
List<String> colNames)
Get statistics on the table.
|
TransformJobInfo |
getTransformJobInfo(long jobId) |
List<Partition> |
readTable(String dbName,
String tableName,
Constraint constraint)
Returns metadata for reading a table given constraints.
|
void |
start(Boolean isLeader)
Starts the Alluxio server.
|
void |
stop()
Stops the Alluxio server.
|
boolean |
syncDatabase(String dbName)
Syncs a database.
|
long |
transformTable(String dbName,
String tableName,
String definition)
Transforms a table to a new table.
|
createJournalContext, getExecutorService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createJournalContext
applyAndJournal, processJournalEntry, resetState, restoreFromCheckpoint, writeToCheckpoint
getCheckpointName
getJournalEntryIterator
applyAndJournal, getCheckpointName, getJournalEntryIterator, processJournalEntry, resetState, restoreFromCheckpoint, writeToCheckpoint
public DefaultTableMaster(CoreMasterContext context, JobMasterClient jobMasterClient)
context
- core master contextjobMasterClient
- the job master client for transformationpublic boolean attachDatabase(String udbType, String udbConnectionUri, String udbDbName, String dbName, Map<String,String> configuration) throws IOException
TableMaster
attachDatabase
in interface TableMaster
udbType
- the database typeudbConnectionUri
- the udb connection uriudbDbName
- the database name in the udbdbName
- the database name in Alluxioconfiguration
- the configurationIOException
public boolean detachDatabase(String dbName) throws IOException
TableMaster
detachDatabase
in interface TableMaster
dbName
- the database name to removeIOException
public List<String> getAllDatabases() throws IOException
TableMaster
getAllDatabases
in interface TableMaster
IOException
public List<String> getAllTables(String databaseName) throws IOException
TableMaster
getAllTables
in interface TableMaster
databaseName
- database nameIOException
public Table getTable(String dbName, String tableName) throws IOException
TableMaster
getTable
in interface TableMaster
dbName
- database nametableName
- table nameIOException
public List<ColumnStatisticsInfo> getTableColumnStatistics(String dbName, String tableName, List<String> colNames) throws IOException
TableMaster
getTableColumnStatistics
in interface TableMaster
dbName
- database nametableName
- table namecolNames
- column namesIOException
public List<Partition> readTable(String dbName, String tableName, Constraint constraint) throws IOException
TableMaster
readTable
in interface TableMaster
dbName
- database nametableName
- table nameconstraint
- constraintIOException
public Map<String,ColumnStatisticsList> getPartitionColumnStatistics(String dbName, String tableName, List<String> partNamesList, List<String> colNamesList) throws IOException
TableMaster
getPartitionColumnStatistics
in interface TableMaster
dbName
- database nametableName
- table namepartNamesList
- partition namescolNamesList
- column namesIOException
public long transformTable(String dbName, String tableName, String definition) throws IOException
TableMaster
transformTable
in interface TableMaster
dbName
- the database nametableName
- the table namedefinition
- the transformation definitionIOException
public TransformJobInfo getTransformJobInfo(long jobId) throws IOException
getTransformJobInfo
in interface TableMaster
jobId
- the job IDIOException
public List<TransformJobInfo> getAllTransformJobInfo() throws IOException
getAllTransformJobInfo
in interface TableMaster
IOException
public boolean syncDatabase(String dbName) throws IOException
TableMaster
syncDatabase
in interface TableMaster
dbName
- the database nameIOException
public Database getDatabase(String dbName) throws IOException
TableMaster
getDatabase
in interface TableMaster
dbName
- the database nameIOException
public Set<Class<? extends Server>> getDependencies()
getDependencies
in interface Server<Boolean>
getDependencies
in class AbstractMaster
public String getName()
public Map<ServiceType,GrpcService> getServices()
getServices
in interface Server<Boolean>
public void start(Boolean isLeader) throws IOException
Server
start
in interface Server<Boolean>
start
in class AbstractMaster
isLeader
- the start optionsIOException
public void stop() throws IOException
Server
#start(T)
should be
cleaned up and shutdown.stop
in interface Server<Boolean>
stop
in class AbstractMaster
IOException
public void close() throws IOException
Server
close
in interface Server<Boolean>
close
in class AbstractMaster
IOException
public Journaled getDelegate()
getDelegate
in interface DelegatingJournaled
Copyright © 2023. All Rights Reserved.