Package org.apache.hive.beeline

Examples of org.apache.hive.beeline.BeeLine.begin()


    BeeLine beeLine = new BeeLine();
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    PrintStream beelineOutputStream = new PrintStream(os);
    beeLine.setOutputStream(beelineOutputStream);
    beeLine.setErrorStream(beelineOutputStream);
    beeLine.begin(args, null);
    String output = os.toString("UTF8");

    return output;
  }
View Full Code Here


      beeLine.setOutputStream(new PrintStream(new NullOutputStream()));
      // beeLine.getOpts().setSilent(true);
    }
    // beeLine.getOpts().setAllowMultiLineCommand(false);
    // beeLine.getOpts().setIsolation("TRANSACTION_READ_COMMITTED");
    int status = beeLine.begin(argList.toArray(new String[0]), null);
    if (status != 0) {
      throw new IOException("Schema script failed, errorcode " + status);
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.