You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jd...@apache.org on 2015/08/11 00:05:57 UTC
hive git commit: HIVE-9024: NullPointerException when starting
webhcat server if templeton.hive.properties is not set (Na via Xuefu)
Repository: hive
Updated Branches:
refs/heads/branch-1.0 b71f6aaa9 -> f81a9b39d
HIVE-9024: NullPointerException when starting webhcat server if templeton.hive.properties is not set (Na via Xuefu)
git-svn-id: https://svn.apache.org/repos/asf/hive/trunk@1643551 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/f81a9b39
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/f81a9b39
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/f81a9b39
Branch: refs/heads/branch-1.0
Commit: f81a9b39dc5d43409b4de36f99d3f159cacc72be
Parents: b71f6aa
Author: Xuefu Zhang <xu...@apache.org>
Authored: Sat Dec 6 16:33:52 2014 +0000
Committer: Jason Dere <jd...@hortonworks.com>
Committed: Mon Aug 10 15:02:59 2015 -0700
----------------------------------------------------------------------
.../org/apache/hive/hcatalog/templeton/AppConfig.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/f81a9b39/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java
----------------------------------------------------------------------
diff --git a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java
index 77952be..2a3f2f1 100644
--- a/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java
+++ b/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java
@@ -315,10 +315,14 @@ public class AppConfig extends Configuration {
String[] props= StringUtils.split(get(HIVE_PROPS_NAME));
//since raw data was (possibly) escaped to make split work,
//now need to remove escape chars so they don't interfere with downstream processing
- for(int i = 0; i < props.length; i++) {
- props[i] = TempletonUtils.unEscapeString(props[i]);
+ if (props == null) {
+ return Collections.emptyList();
+ } else {
+ for(int i = 0; i < props.length; i++) {
+ props[i] = TempletonUtils.unEscapeString(props[i]);
+ }
+ return Arrays.asList(props);
}
- return Arrays.asList(props);
}
public String[] overrideJars() {