You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by xu...@apache.org on 2014/12/06 17:33:52 UTC
svn commit: r1643551 -
/hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java
Author: xuefu
Date: Sat Dec 6 16:33:52 2014
New Revision: 1643551
URL: http://svn.apache.org/r1643551
Log:
HIVE-9024: NullPointerException when starting webhcat server if templeton.hive.properties is not set (Na via Xuefu)
Modified:
hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java
Modified: hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java?rev=1643551&r1=1643550&r2=1643551&view=diff
==============================================================================
--- hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java (original)
+++ hive/trunk/hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java Sat Dec 6 16:33:52 2014
@@ -322,10 +322,14 @@ public class AppConfig extends Configura
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() {