public boolean sh(String line) { if (line == null || line.length() == 0) { return false; } if (!line.startsWith("sh")) { return false; } line = line.substring("sh".length()).trim(); if (!beeLine.isBeeLine()) line = substituteVariables(getHiveConf(false), line.trim()); try { ShellCmdExecutor executor = new ShellCmdExecutor(line, beeLine.getOutputStream(), beeLine.getErrorStream()); int ret = executor.execute(); if (ret != 0) { beeLine.output("Command failed with exit code = " + ret); return false; } return true; } catch (Exception e) { beeLine.error("Exception raised from Shell command " + e); return false; } }
ShellCmdExecutor executor = new ShellCmdExecutor(shell_cmd, ss.out, ss.err); ret = executor.execute(); if (ret != 0) {
public boolean sh(String line) { if (line == null || line.length() == 0) { return false; } if (!line.startsWith("sh")) { return false; } line = line.substring("sh".length()).trim(); // Support variable substitution. HIVE-6791. // line = new VariableSubstitution().substitute(new HiveConf(BeeLine.class), line.trim()); try { ShellCmdExecutor executor = new ShellCmdExecutor(line, beeLine.getOutputStream(), beeLine.getErrorStream()); int ret = executor.execute(); if (ret != 0) { beeLine.output("Command failed with exit code = " + ret); return false; } return true; } catch (Exception e) { beeLine.error("Exception raised from Shell command " + e); beeLine.error(e); return false; } }
public boolean sh(String line) { if (line == null || line.length() == 0) { return false; } if (!line.startsWith("sh")) { return false; } line = line.substring("sh".length()).trim(); if (!beeLine.isBeeLine()) line = substituteVariables(getHiveConf(false), line.trim()); try { ShellCmdExecutor executor = new ShellCmdExecutor(line, beeLine.getOutputStream(), beeLine.getErrorStream()); int ret = executor.execute(); if (ret != 0) { beeLine.output("Command failed with exit code = " + ret); return false; } return true; } catch (Exception e) { beeLine.error("Exception raised from Shell command " + e); return false; } }
public boolean sh(String line) { if (line == null || line.length() == 0) { return false; } if (!line.startsWith("sh")) { return false; } line = line.substring("sh".length()).trim(); // Support variable substitution. HIVE-6791. // line = new VariableSubstitution().substitute(new HiveConf(BeeLine.class), line.trim()); try { ShellCmdExecutor executor = new ShellCmdExecutor(line, beeLine.getOutputStream(), beeLine.getErrorStream()); int ret = executor.execute(); if (ret != 0) { beeLine.output("Command failed with exit code = " + ret); return false; } return true; } catch (Exception e) { beeLine.error("Exception raised from Shell command " + e); beeLine.error(e); return false; } }
ShellCmdExecutor executor = new ShellCmdExecutor(shell_cmd, ss.out, ss.err); ret = executor.execute(); if (ret != 0) {
ShellCmdExecutor executor = new ShellCmdExecutor(shell_cmd, ss.out, ss.err); ret = executor.execute(); if (ret != 0) {
ShellCmdExecutor executor = new ShellCmdExecutor(shell_cmd, ss.out, ss.err); ret = executor.execute(); if (ret != 0) {