diff --git common/src/java/org/apache/hadoop/hive/conf/HiveConf.java common/src/java/org/apache/hadoop/hive/conf/HiveConf.java index fb3570b..ff27a18 100644 --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java @@ -968,7 +968,7 @@ private static synchronized InputStream getConfVarInputStream() { public void verifyAndSet(String name, String value) throws IllegalArgumentException { if (restrictList.contains(name)) { - throw new IllegalArgumentException("Cann't modify " + name + " at runtime"); + throw new IllegalArgumentException("Can not modify " + name + " at runtime"); } set(name, value); } @@ -1112,6 +1112,7 @@ public HiveConf(HiveConf other) { hiveJar = other.hiveJar; auxJars = other.auxJars; origProp = (Properties)other.origProp.clone(); + restrictList.addAll(other.restrictList); } public Properties getAllProperties() { diff --git service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java index 73a0fd8..a1ac55b 100644 --- service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java +++ service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java @@ -107,8 +107,10 @@ public void run() throws HiveSQLException { response = commandProcessor.run(commandArgs); int returnCode = response.getResponseCode(); - String sqlState = response.getSQLState(); - String errorMessage = response.getErrorMessage(); + if (returnCode != 0) { + throw new HiveSQLException("Error while processing statement: " + + response.getErrorMessage(), response.getSQLState(), response.getResponseCode()); + } Schema schema = response.getSchema(); if (schema != null) { setHasResultSet(true); @@ -117,6 +119,9 @@ public void run() throws HiveSQLException { setHasResultSet(false); resultSchema = new TableSchema(); } + } catch (HiveSQLException e) { + setState(OperationState.ERROR); + throw e; } catch (Exception e) { setState(OperationState.ERROR); throw new HiveSQLException("Error running query: " + e.toString(), e);