You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kh...@apache.org on 2014/09/24 20:09:29 UTC
svn commit: r1627382 - in /hive/trunk/hcatalog:
src/test/e2e/templeton/deployers/
src/test/e2e/templeton/deployers/config/webhcat/
webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/
Author: khorgath
Date: Wed Sep 24 18:09:29 2014
New Revision: 1627382
URL: http://svn.apache.org/r1627382
Log:
HIVE-8217 : WebHCat 'jobs' endpoint fails if it runs into issues with any of the jobs (Eugene Koifman via Sushanth Sowmyan)
Modified:
hive/trunk/hcatalog/src/test/e2e/templeton/deployers/config/webhcat/webhcat-site.xml
hive/trunk/hcatalog/src/test/e2e/templeton/deployers/env.sh
hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/QueueStatusBean.java
hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Server.java
Modified: hive/trunk/hcatalog/src/test/e2e/templeton/deployers/config/webhcat/webhcat-site.xml
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/src/test/e2e/templeton/deployers/config/webhcat/webhcat-site.xml?rev=1627382&r1=1627381&r2=1627382&view=diff
==============================================================================
--- hive/trunk/hcatalog/src/test/e2e/templeton/deployers/config/webhcat/webhcat-site.xml (original)
+++ hive/trunk/hcatalog/src/test/e2e/templeton/deployers/config/webhcat/webhcat-site.xml Wed Sep 24 18:09:29 2014
@@ -77,6 +77,11 @@
shipped to the target node in the cluster to execute Pig job which uses
HCat, Hive query, etc.</description>
</property>
+ <property>
+ <name>templeton.sqoop.path</name>
+ <value>${env.SQOOP_HOME}/bin/sqoop</value>
+ <description>The path to the Sqoop executable.</description>
+ </property>
<property>
<name>templeton.controller.mr.child.opts</name>
Modified: hive/trunk/hcatalog/src/test/e2e/templeton/deployers/env.sh
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/src/test/e2e/templeton/deployers/env.sh?rev=1627382&r1=1627381&r2=1627382&view=diff
==============================================================================
--- hive/trunk/hcatalog/src/test/e2e/templeton/deployers/env.sh (original)
+++ hive/trunk/hcatalog/src/test/e2e/templeton/deployers/env.sh Wed Sep 24 18:09:29 2014
@@ -30,7 +30,7 @@ export PIG_VERSION=0.12.2-SNAPSHOT
export PROJ_HOME=/Users/${USER}/dev/hive
export HIVE_HOME=${PROJ_HOME}/packaging/target/apache-hive-${HIVE_VERSION}-bin/apache-hive-${HIVE_VERSION}-bin
export HADOOP_HOME=/Users/${USER}/dev/hwxhadoop/hadoop-dist/target/hadoop-${HADOOP_VERSION}
-#export SQOOP_HOME=/
+export SQOOP_HOME=/Users/${USER}/dev/sqoop-1.4.4.bin__hadoop-2.0.4-alpha
#Make sure Pig is built for the Hadoop version you are running
export PIG_TAR_PATH=/Users/${USER}/dev/pig-${PIG_VERSION}-src/build
Modified: hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/QueueStatusBean.java
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/QueueStatusBean.java?rev=1627382&r1=1627381&r2=1627382&view=diff
==============================================================================
--- hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/QueueStatusBean.java (original)
+++ hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/QueueStatusBean.java Wed Sep 24 18:09:29 2014
@@ -32,7 +32,7 @@ public class QueueStatusBean {
public JobStatus status;
public JobProfile profile;
- public String id;
+ public final String id;
public String parentId;
public String percentComplete;
public Long exitValue;
@@ -40,8 +40,11 @@ public class QueueStatusBean {
public String callback;
public String completed;
public Map<String, Object> userargs;
+ public String msg;
- public QueueStatusBean() {
+ public QueueStatusBean(String jobId, String errMsg) {
+ this.id = jobId;
+ this.msg = errMsg;
}
/**
Modified: hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Server.java
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Server.java?rev=1627382&r1=1627381&r2=1627382&view=diff
==============================================================================
--- hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Server.java (original)
+++ hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/Server.java Wed Sep 24 18:09:29 2014
@@ -1008,8 +1008,15 @@ public class Server {
jobItem.id = job;
if (showDetails) {
StatusDelegator sd = new StatusDelegator(appConf);
- QueueStatusBean statusBean = sd.run(getDoAsUser(), job);
- jobItem.detail = statusBean;
+ try {
+ jobItem.detail = sd.run(getDoAsUser(), job);
+ }
+ catch(Exception ex) {
+ /*if we could not get status for some reason, log it, and send empty status back with
+ * just the ID so that caller knows to even look in the log file*/
+ LOG.info("Failed to get status detail for jobId='" + job + "'", ex);
+ jobItem.detail = new QueueStatusBean(job, "Failed to retrieve status; see WebHCat logs");
+ }
}
detailList.add(jobItem);
}