diff --git a/bin/ext/hiveserver.sh b/bin/ext/hiveserver.sh
index b5edce469..d83be4632 100644
--- a/bin/ext/hiveserver.sh
+++ b/bin/ext/hiveserver.sh
@@ -25,11 +25,11 @@ hiveserver() {
JAR=${HIVE_LIB}/hive-service-*.jar
# hadoop 20 or newer - skip the aux_jars option and hiveconf
- exec $HADOOP jar $JAR $CLASS $HIVE_PORT "$@"
+
+ exec $HADOOP jar $JAR $CLASS "$@"
}
hiveserver_help() {
- echo "usage HIVE_PORT=xxxx ./hive --service hiveserver"
- echo " HIVE_PORT : Specify the server port"
+ hiveserver -h
}
diff --git a/bin/ext/metastore.sh b/bin/ext/metastore.sh
index db15f6e33..3aa7556f2 100644
--- a/bin/ext/metastore.sh
+++ b/bin/ext/metastore.sh
@@ -25,11 +25,11 @@ metastore() {
JAR=${HIVE_LIB}/hive-service-*.jar
# hadoop 20 or newer - skip the aux_jars option and hiveconf
- exec $HADOOP jar $JAR $CLASS $METASTORE_PORT "$@"
+
+ exec $HADOOP jar $JAR $CLASS "$@"
}
metastore_help() {
- echo "usage METASTORE_PORT=xxxx ./hive --service metastore"
- echo " METASTORE_PORT : Specify the metastore server port"
+ metastore -h
}
diff --git a/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java b/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
index 819d67eaa..9fa7bc636 100644
--- a/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
+++ b/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
@@ -32,18 +32,20 @@
import java.util.Set;
import jline.ArgumentCompletor;
+import jline.ArgumentCompletor.AbstractArgumentDelimiter;
+import jline.ArgumentCompletor.ArgumentDelimiter;
import jline.Completor;
import jline.ConsoleReader;
import jline.History;
import jline.SimpleCompletor;
-import jline.ArgumentCompletor.AbstractArgumentDelimiter;
-import jline.ArgumentCompletor.ArgumentDelimiter;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hive.common.HiveInterruptUtils;
+import org.apache.hadoop.hive.common.LogUtils;
+import org.apache.hadoop.hive.common.LogUtils.LogInitializationException;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
import org.apache.hadoop.hive.metastore.api.Schema;
@@ -512,7 +514,14 @@ public static void main(String[] args) throws Exception {
// NOTE: It is critical to do this here so that log4j is reinitialized
// before any of the other core hive classes are loaded
- SessionState.initHiveLog4j();
+ boolean logInitFailed = false;
+ String logInitDetailMessage;
+ try {
+ logInitDetailMessage = LogUtils.initHiveLog4j();
+ } catch (LogInitializationException e) {
+ logInitFailed = true;
+ logInitDetailMessage = e.getMessage();
+ }
CliSessionState ss = new CliSessionState(new HiveConf(SessionState.class));
ss.in = System.in;
@@ -526,7 +535,14 @@ public static void main(String[] args) throws Exception {
if (!oproc.process_stage2(ss)) {
System.exit(2);
}
- ss.printInitInfo();
+
+ if (!ss.getIsSilent()) {
+ if (logInitFailed) {
+ System.err.println(logInitDetailMessage);
+ } else {
+ SessionState.getConsole().printInfo(logInitDetailMessage);
+ }
+ }
// set all properties specified via command line
HiveConf conf = ss.getConf();
diff --git a/common/build.xml b/common/build.xml
index 0969e16f3..e8a071206 100755
--- a/common/build.xml
+++ b/common/build.xml
@@ -27,9 +27,25 @@ to call at top-level: ant deploy-contrib compile-core-test
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/common/ivy.xml b/common/ivy.xml
index bee3bf092..e798d8f5c 100644
--- a/common/ivy.xml
+++ b/common/ivy.xml
@@ -1,3 +1,4 @@
+