org.apache.hive.beeline
Class BeeLine
java.lang.Object
org.apache.hive.beeline.BeeLine
public class BeeLine
- extends Object
A console SQL shell with command completion.
TODO:
- User-friendly connection prompts
- Page results
- Handle binary data (blob fields)
- Implement command aliases
- Stored procedure execution
- Binding parameters to prepared statements
- Scripting language
- XA transactions
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMMAND_PREFIX
public static final String COMMAND_PREFIX
- See Also:
- Constant Field Values
BEELINE_DEFAULT_JDBC_DRIVER
public static final String BEELINE_DEFAULT_JDBC_DRIVER
- See Also:
- Constant Field Values
BEELINE_DEFAULT_JDBC_URL
public static final String BEELINE_DEFAULT_JDBC_URL
- See Also:
- Constant Field Values
BeeLine
public BeeLine()
locElapsedTime
protected String locElapsedTime(long milliseconds)
main
public static void main(String[] args)
throws IOException
- Starts the program.
- Throws:
IOException
mainWithInputRedirection
public static void mainWithInputRedirection(String[] args,
InputStream inputStream)
throws IOException
- Starts the program with redirected input. For redirected output,
setOutputStream() and setErrorStream can be used.
Exits with 0 on success, 1 on invalid arguments, and 2 on any other error
- Parameters:
args
- same as main()inputStream
- redirected input, or null to use standard input
- Throws:
IOException
getIsolationLevels
public String[] getIsolationLevels()
getMetadataMethodNames
public String[] getMetadataMethodNames()
getConnectionURLExamples
public String[] getConnectionURLExamples()
begin
public int begin(String[] args,
InputStream inputStream)
throws IOException
- Start accepting input from stdin, and dispatch it
to the appropriate
CommandHandler
until the
global variable exit
is true.
- Throws:
IOException
close
public void close()
getConsoleReader
public jline.ConsoleReader getConsoleReader(InputStream inputStream)
throws IOException
- Throws:
IOException
runCommands
public int runCommands(String[] cmds)
runCommands
public int runCommands(List<String> cmds)
getOpts
public org.apache.hive.beeline.BeeLineOpts getOpts()
isExit
public boolean isExit()
setExit
public void setExit(boolean exit)
getSeparator
public static String getSeparator()
setOutputStream
public void setOutputStream(PrintStream outputStream)
setErrorStream
public void setErrorStream(PrintStream errorStream)
getReflector
protected org.apache.hive.beeline.Reflector getReflector()
Copyright © 2012 The Apache Software Foundation