public class BeeLineOpts extends Object implements jline.console.completer.Completer
Modifier and Type | Class and Description |
---|---|
static interface |
BeeLineOpts.Env |
static interface |
BeeLineOpts.Ignore |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DELIMITER |
static char |
DEFAULT_DELIMITER_FOR_DSV |
static int |
DEFAULT_HEADER_INTERVAL |
static int |
DEFAULT_INCREMENTAL_BUFFER_ROWS |
static String |
DEFAULT_ISOLATION_LEVEL |
static int |
DEFAULT_MAX_COLUMN_WIDTH |
static int |
DEFAULT_MAX_HEIGHT |
static int |
DEFAULT_MAX_WIDTH |
static String |
DEFAULT_NULL_STRING |
static BeeLineOpts.Env |
env |
static String |
PROPERTY_NAME_EXIT |
static String |
PROPERTY_PREFIX |
static String |
URL_ENV_PREFIX |
Constructor and Description |
---|
BeeLineOpts(BeeLine beeLine,
Properties props) |
Modifier and Type | Method and Description |
---|---|
int |
complete(String buf,
int pos,
List cand) |
String |
getAuthType() |
boolean |
getAutoCommit() |
boolean |
getAutosave() |
boolean |
getColor() |
HiveConf |
getConf() |
boolean |
getConvertBinaryArrayToString() |
String |
getDelimiter() |
char |
getDelimiterForDSV() |
boolean |
getEntireLineAsCommand() |
static BeeLineOpts.Env |
getEnv() |
boolean |
getEscapeCRLF() |
boolean |
getFastConnect() |
int |
getFetchSize() |
boolean |
getForce() |
int |
getHeaderInterval() |
String |
getHistoryFile() |
Map<String,String> |
getHiveConfVariables() |
Map<String,String> |
getHiveVariables() |
boolean |
getIncremental() |
int |
getIncrementalBufferRows() |
String[] |
getInitFiles() |
String |
getIsolation() |
String |
getLastConnectedUrl() |
int |
getMaxColumnWidth() |
int |
getMaxHeight() |
int |
getMaxHistoryRows() |
int |
getMaxWidth() |
boolean |
getNullEmptyString()
Use getNullString() to get the null string to be used.
|
String |
getNullString() |
String |
getNumberFormat() |
String |
getOutputFormat() |
File |
getPropertiesFile() |
String |
getScriptFile() |
boolean |
getShowDbInPrompt()
In beeline mode returns the beeline option provided by command line argument or config file
In compatibility mode returns the value of the hive.cli.print.current.db config variable
|
boolean |
getShowElapsedTime() |
boolean |
getShowHeader() |
boolean |
getShowNestedErrs() |
boolean |
getShowWarnings() |
int |
getTimeout() |
boolean |
getTrimScripts() |
boolean |
getTruncateTable() |
boolean |
getVerbose() |
boolean |
isAllowMultiLineCommand() |
boolean |
isBeelineSiteUrlsAsked() |
boolean |
isHelpAsked() |
Boolean |
isReport() |
boolean |
isSilent() |
void |
load() |
void |
load(InputStream fin) |
void |
loadProperties(Properties props) |
jline.console.completer.Completer[] |
optionCompleters() |
String[] |
possibleSettingValues() |
void |
save() |
void |
save(OutputStream out) |
File |
saveDir()
The save directory if HOME/.beeline/ on UNIX, and
HOME/beeline/ on Windows.
|
void |
set(String key,
String value) |
boolean |
set(String key,
String value,
boolean quiet) |
void |
setAllowMultiLineCommand(boolean allowMultiLineCommand) |
void |
setAuthType(String authType) |
void |
setAutoCommit(boolean autoCommit) |
void |
setAutosave(boolean autosave) |
void |
setBeelineSiteUrlsAsked(boolean beelineSiteUrlsAsked) |
void |
setColor(boolean color) |
void |
setConvertBinaryArrayToString(boolean convert) |
void |
setDelimiter(String delimiter) |
void |
setDelimiterForDSV(char delimiterForDSV) |
void |
setEntireLineAsCommand(boolean entireLineAsCommand) |
static void |
setEnv(BeeLineOpts.Env envToUse) |
void |
setEscapeCRLF(boolean escapeCRLF) |
void |
setFastConnect(boolean fastConnect) |
void |
setFetchSize(int fetchSize) |
void |
setForce(boolean force) |
void |
setHeaderInterval(int headerInterval) |
void |
setHelpAsked(boolean helpAsked) |
void |
setHistoryFile(String historyFile) |
void |
setHiveConf(HiveConf conf) |
void |
setHiveConfVariables(Map<String,String> hiveConfVariables) |
void |
setHiveVariables(Map<String,String> hiveVariables) |
void |
setIncremental(boolean incremental) |
void |
setIncrementalBufferRows(int incrementalBufferRows) |
void |
setInitFiles(String[] initFiles) |
void |
setIsolation(String isolation) |
void |
setLastConnectedUrl(String lastConnectedUrl) |
void |
setMaxColumnWidth(int maxColumnWidth) |
void |
setMaxHeight(int maxHeight) |
void |
setMaxHistoryRows(int numRows) |
void |
setMaxWidth(int maxWidth) |
void |
setNullEmptyString(boolean nullStringEmpty) |
void |
setNumberFormat(String numberFormat) |
void |
setOutputFormat(String outputFormat) |
void |
setReport(boolean report) |
void |
setScriptFile(String scriptFile) |
void |
setShowDbInPrompt(boolean showDbInPrompt) |
void |
setShowElapsedTime(boolean showElapsedTime) |
void |
setShowHeader(boolean showHeader) |
void |
setShowNestedErrs(boolean showNestedErrs) |
void |
setShowWarnings(boolean showWarnings) |
void |
setSilent(boolean silent) |
void |
setTimeout(int timeout) |
void |
setTrimScripts(boolean trimScripts) |
void |
setTruncateTable(boolean truncateTable) |
void |
setVerbose(boolean verbose) |
Properties |
toProperties() |
void |
updateBeeLineOptsFromConf()
Update the options after connection is established in CLI mode.
|
public static final int DEFAULT_MAX_WIDTH
public static final int DEFAULT_MAX_HEIGHT
public static final int DEFAULT_HEADER_INTERVAL
public static final String DEFAULT_ISOLATION_LEVEL
public static final String PROPERTY_PREFIX
public static final String PROPERTY_NAME_EXIT
public static final String DEFAULT_NULL_STRING
public static final char DEFAULT_DELIMITER_FOR_DSV
public static final int DEFAULT_MAX_COLUMN_WIDTH
public static final int DEFAULT_INCREMENTAL_BUFFER_ROWS
public static final String DEFAULT_DELIMITER
public static final String URL_ENV_PREFIX
public static BeeLineOpts.Env env
public BeeLineOpts(BeeLine beeLine, Properties props)
public jline.console.completer.Completer[] optionCompleters()
public String[] possibleSettingValues()
public File saveDir()
public int complete(String buf, int pos, List cand)
complete
in interface jline.console.completer.Completer
public void save() throws IOException
IOException
public void save(OutputStream out) throws IOException
IOException
public Properties toProperties() throws IllegalAccessException, InvocationTargetException, ClassNotFoundException
public void load() throws IOException
IOException
public void load(InputStream fin) throws IOException
IOException
public void updateBeeLineOptsFromConf()
public void setHiveConf(HiveConf conf)
public void loadProperties(Properties props)
public void setFastConnect(boolean fastConnect)
public String getAuthType()
public void setAuthType(String authType)
public boolean getFastConnect()
public void setAutoCommit(boolean autoCommit)
public boolean getAutoCommit()
public void setVerbose(boolean verbose)
public boolean getVerbose()
public void setShowWarnings(boolean showWarnings)
public boolean getShowWarnings()
public void setShowNestedErrs(boolean showNestedErrs)
public boolean getShowNestedErrs()
public void setShowElapsedTime(boolean showElapsedTime)
public boolean getShowElapsedTime()
public void setNumberFormat(String numberFormat)
public String getNumberFormat()
public void setConvertBinaryArrayToString(boolean convert)
public boolean getConvertBinaryArrayToString()
public void setMaxWidth(int maxWidth)
public int getMaxWidth()
public void setMaxColumnWidth(int maxColumnWidth)
public int getMaxColumnWidth()
public void setTimeout(int timeout)
public int getTimeout()
public void setIsolation(String isolation)
public String getIsolation()
public void setEntireLineAsCommand(boolean entireLineAsCommand)
public boolean getEntireLineAsCommand()
public void setHistoryFile(String historyFile)
public String getHistoryFile()
public void setMaxHistoryRows(int numRows)
numRows
- - the number of rows to store in history filepublic int getMaxHistoryRows()
public void setScriptFile(String scriptFile)
public String getScriptFile()
public String[] getInitFiles()
public void setInitFiles(String[] initFiles)
public void setColor(boolean color)
public boolean getColor()
public void setShowHeader(boolean showHeader)
public boolean getShowHeader()
public void setEscapeCRLF(boolean escapeCRLF)
public boolean getEscapeCRLF()
public void setShowDbInPrompt(boolean showDbInPrompt)
public boolean getShowDbInPrompt()
public void setHeaderInterval(int headerInterval)
public int getHeaderInterval()
public void setForce(boolean force)
public boolean getForce()
public void setIncremental(boolean incremental)
public boolean getIncremental()
public void setIncrementalBufferRows(int incrementalBufferRows)
public int getIncrementalBufferRows()
public void setSilent(boolean silent)
public boolean isSilent()
public void setReport(boolean report)
public Boolean isReport()
public void setAutosave(boolean autosave)
public boolean getAutosave()
public void setOutputFormat(String outputFormat)
public String getOutputFormat()
public void setTrimScripts(boolean trimScripts)
public boolean getTrimScripts()
public void setMaxHeight(int maxHeight)
public int getMaxHeight()
public File getPropertiesFile()
public boolean isAllowMultiLineCommand()
public void setAllowMultiLineCommand(boolean allowMultiLineCommand)
public int getFetchSize()
public void setFetchSize(int fetchSize)
public boolean getNullEmptyString()
public void setNullEmptyString(boolean nullStringEmpty)
public String getNullString()
public boolean getTruncateTable()
public void setTruncateTable(boolean truncateTable)
public char getDelimiterForDSV()
public void setDelimiterForDSV(char delimiterForDSV)
public HiveConf getConf()
public void setHelpAsked(boolean helpAsked)
public boolean isHelpAsked()
public void setBeelineSiteUrlsAsked(boolean beelineSiteUrlsAsked)
public boolean isBeelineSiteUrlsAsked()
public String getLastConnectedUrl()
public void setLastConnectedUrl(String lastConnectedUrl)
public String getDelimiter()
public void setDelimiter(String delimiter)
public static BeeLineOpts.Env getEnv()
public static void setEnv(BeeLineOpts.Env envToUse)
Copyright © 2022 The Apache Software Foundation. All rights reserved.