public class ListDatabasesCommand extends AbstractTableCommand
SHOW TABLES or SHOW DATABASES query
would return but makes it easier to query on a local machine what the Alluxio catalog
currently stores without needing to boot up a presto instance.mClient, mConfASYNC_OPTION, DEFAULT_ACTIVE_JOBS, mActiveJobs, mSubmittedJobAttemptsmFileSystem, mFsContext| Constructor and Description |
|---|
ListDatabasesCommand(AlluxioConfiguration conf,
TableMasterClient client,
FileSystemContext fsContext)
Creates a new instance of
ListDatabasesCommand. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCommandName() |
java.lang.String |
getDescription() |
java.lang.String |
getUsage() |
int |
listDatabases()
Print attached databases to stdout.
|
int |
listTable(java.lang.String db,
java.lang.String tableName)
Print table information to stdout.
|
int |
listTables(java.lang.String db)
Print list of tables stdout.
|
int |
run(org.apache.commons.cli.CommandLine cl) |
void |
validateArgs(org.apache.commons.cli.CommandLine cl) |
drain, getCompletedCmdCount, getCompletedCount, getFailedCmdCount, getFailedCount, getFailedFiles, postProcessing, processFailures, submit, waitForCmd, waitJobprocessHeader, runPlainPath, runWildCardCmdclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getOptions, getSubCommands, hasSubCommand, parseAndValidateArgspublic ListDatabasesCommand(AlluxioConfiguration conf, TableMasterClient client, FileSystemContext fsContext)
ListDatabasesCommand.conf - alluxio configurationclient - the table master clientfsContext - the filesystem of Alluxiopublic java.lang.String getCommandName()
getCommandName in interface CommandgetCommandName in class AbstractTableCommandpublic java.lang.String getDescription()
public java.lang.String getUsage()
public void validateArgs(org.apache.commons.cli.CommandLine cl)
throws InvalidArgumentException
validateArgs in interface CommandvalidateArgs in class AbstractTableCommandInvalidArgumentExceptionpublic int run(org.apache.commons.cli.CommandLine cl)
throws AlluxioException,
java.io.IOException
run in interface Commandrun in class AbstractTableCommandAlluxioExceptionjava.io.IOExceptionpublic int listDatabases()
throws AlluxioStatusException,
java.io.IOException
AlluxioStatusExceptionjava.io.IOExceptionpublic int listTables(java.lang.String db)
throws AlluxioStatusException
db - the database to list the tables ofAlluxioStatusExceptionpublic int listTable(java.lang.String db,
java.lang.String tableName)
throws AlluxioStatusException
db - the database the table exists intableName - the name of the table to dump information forAlluxioStatusExceptionCopyright © 2022. All Rights Reserved.