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; } }
ret = executor.execute(); if (ret != 0) { console.printError("Command failed with exit code = " + ret);
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; } }
ret = executor.execute(); if (ret != 0) { console.printError("Command failed with exit code = " + ret);
ret = executor.execute(); if (ret != 0) { console.printError("Command failed with exit code = " + ret);
ret = executor.execute(); if (ret != 0) { console.printError("Command failed with exit code = " + ret);