public class AlluxioCatalog extends Object implements Journaled
Constructor and Description |
---|
AlluxioCatalog()
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
SyncStatus |
attachDatabase(JournalContext journalContext,
String udbType,
String udbConnectionUri,
String udbDbName,
String dbName,
Map<String,String> map,
boolean ignoreSyncErrors)
Attaches an udb database to Alluxio catalog.
|
void |
completeTransformTable(JournalContext journalContext,
String dbName,
String tableName,
String definition,
Map<String,Layout> transformedLayouts)
Completes table transformation by updating the layouts of the table's partitions.
|
boolean |
detachDatabase(JournalContext journalContext,
String dbName)
Removes an existing database.
|
List<String> |
getAllDatabases()
Get all databases.
|
List<String> |
getAllTables(String dbName)
Get a list of tables in a database.
|
CheckpointName |
getCheckpointName() |
Database |
getDatabase(String dbName)
Get Database by its name.
|
Iterator<Journal.JournalEntry> |
getJournalEntryIterator() |
LayoutRegistry |
getLayoutRegistry() |
Map<String,ColumnStatisticsList> |
getPartitionColumnStatistics(String dbName,
String tableName,
List<String> partNames,
List<String> colNames)
Returns the statistics for the specified table.
|
Table |
getTable(String dbName,
String tableName)
Get a table object by name.
|
List<ColumnStatisticsInfo> |
getTableColumnStatistics(String dbName,
String tableName,
List<String> colNames)
Returns the statistics for the specified table.
|
List<TransformPlan> |
getTransformPlan(String dbName,
String tableName,
TransformDefinition definition) |
boolean |
processJournalEntry(Journal.JournalEntry entry)
Attempts to apply a journal entry.
|
List<Partition> |
readTable(String dbName,
String tableName,
Constraint constraint)
Returns the partitions based on a constraint for the specified table.
|
void |
resetState()
Resets the object's journaled state.
|
SyncStatus |
syncDatabase(JournalContext journalContext,
String dbName)
Syncs a database.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyAndJournal, restoreFromCheckpoint, writeToCheckpoint
public LayoutRegistry getLayoutRegistry()
public SyncStatus attachDatabase(JournalContext journalContext, String udbType, String udbConnectionUri, String udbDbName, String dbName, Map<String,String> map, boolean ignoreSyncErrors) throws IOException
journalContext
- journal contextudbType
- the database typeudbConnectionUri
- the udb connection uriudbDbName
- the database name in the udbdbName
- the database name in Alluxiomap
- the configurationignoreSyncErrors
- if true, will ignore syncing errors during the attachIOException
public SyncStatus syncDatabase(JournalContext journalContext, String dbName) throws IOException
journalContext
- journal contextdbName
- database nameIOException
public boolean detachDatabase(JournalContext journalContext, String dbName) throws IOException
journalContext
- journal contextdbName
- the database nameIOException
public Table getTable(String dbName, String tableName) throws IOException
dbName
- the database nametableName
- the table nameIOException
public List<String> getAllDatabases() throws IOException
IOException
public Database getDatabase(String dbName) throws IOException
dbName
- database nameIOException
public List<String> getAllTables(String dbName) throws IOException
dbName
- database nameIOException
public List<ColumnStatisticsInfo> getTableColumnStatistics(String dbName, String tableName, List<String> colNames) throws IOException
dbName
- the database nametableName
- the table namecolNames
- column namesIOException
public Map<String,ColumnStatisticsList> getPartitionColumnStatistics(String dbName, String tableName, List<String> partNames, List<String> colNames) throws IOException
dbName
- the database nametableName
- the table namepartNames
- partition namescolNames
- column namesIOException
public List<Partition> readTable(String dbName, String tableName, Constraint constraint) throws IOException
dbName
- the database nametableName
- the table nameconstraint
- the column contraintIOException
public void completeTransformTable(JournalContext journalContext, String dbName, String tableName, String definition, Map<String,Layout> transformedLayouts) throws IOException
journalContext
- the journal contextdbName
- the database nametableName
- the table namedefinition
- the transformation definitiontransformedLayouts
- map from partition spec to the transformed layoutsIOException
public List<TransformPlan> getTransformPlan(String dbName, String tableName, TransformDefinition definition) throws IOException
dbName
- the database nametableName
- the table namedefinition
- the transformation definitionIOException
public boolean processJournalEntry(Journal.JournalEntry entry)
Journaled
processJournalEntry
in interface Journaled
entry
- the entry to applypublic void resetState()
Journaled
resetState
in interface Journaled
public Iterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator
in interface JournalEntryIterable
Iterator
that iterates all the journal entriespublic CheckpointName getCheckpointName()
getCheckpointName
in interface Checkpointed
Copyright © 2023. All Rights Reserved.