Package org.apache.hadoop.hbase.shell

Examples of org.apache.hadoop.hbase.shell.TableFormatterFactory


    Configuration conf = new HBaseConfiguration();
    ConsoleReader reader = new ConsoleReader();
    reader.setBellEnabled(conf.getBoolean("hbaseshell.jline.bell.enabled",
      DEFAULT_BELL_ENABLED));
    Writer out = new OutputStreamWriter(System.out, "UTF-8");
    TableFormatterFactory tff = new TableFormatterFactory(out, conf);
    HelpCommand help = new HelpCommand(out, tff.get());
    help.printVersion();
    StringBuilder queryStr = new StringBuilder();
    String extendedLine;
    while ((extendedLine = reader.readLine(getPrompt(queryStr))) != null) {
      if (isEndOfCommand(extendedLine)) {
        queryStr.append(" " + extendedLine);
        long start = System.currentTimeMillis();
        Parser parser = new Parser(queryStr.toString(), out, tff.get());
        ReturnMsg rs = null;
        try {
          Command cmd = parser.terminatedCommand();
          if (cmd != null) {
            rs = cmd.execute(conf);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.shell.TableFormatterFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.