hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xu...@apache.org
Subject svn commit: r1637710 - in /hive/branches/spark: ./ hbase-handler/ hbase-handler/src/java/org/apache/hadoop/hive/hbase/ shims/0.20/src/main/java/org/apache/hadoop/hive/shims/ shims/0.20S/src/main/java/org/apache/hadoop/hive/shims/ shims/0.23/src/main/ja...
Date Sun, 09 Nov 2014 18:23:08 GMT
Author: xuefu
Date: Sun Nov  9 18:23:07 2014
New Revision: 1637710

URL: http://svn.apache.org/r1637710
Log:
HIVE-8782: HBase handler doesn't compile with hadoop-1 (Jimmy Xiang, reviewed by Xuefu and
Sergey)
merged from trunk, r1637521

Modified:
    hive/branches/spark/   (props changed)
    hive/branches/spark/hbase-handler/pom.xml   (props changed)
    hive/branches/spark/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java
    hive/branches/spark/shims/0.20/src/main/java/org/apache/hadoop/hive/shims/Hadoop20Shims.java
    hive/branches/spark/shims/0.20S/src/main/java/org/apache/hadoop/hive/shims/Hadoop20SShims.java
    hive/branches/spark/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
    hive/branches/spark/shims/common/src/main/java/org/apache/hadoop/hive/shims/HadoopShims.java

Propchange: hive/branches/spark/
------------------------------------------------------------------------------
  Merged /hive/trunk:r1637521

Propchange: hive/branches/spark/hbase-handler/pom.xml
------------------------------------------------------------------------------
  Merged /hive/trunk/hbase-handler/pom.xml:r1637521

Modified: hive/branches/spark/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java
URL: http://svn.apache.org/viewvc/hive/branches/spark/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java?rev=1637710&r1=1637709&r2=1637710&view=diff
==============================================================================
--- hive/branches/spark/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java
(original)
+++ hive/branches/spark/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java
Sun Nov  9 18:23:07 2014
@@ -59,6 +59,7 @@ import org.apache.hadoop.hive.ql.plan.Ex
 import org.apache.hadoop.hive.ql.plan.TableDesc;
 import org.apache.hadoop.hive.serde2.Deserializer;
 import org.apache.hadoop.hive.serde2.SerDe;
+import org.apache.hadoop.hive.shims.ShimLoader;
 import org.apache.hadoop.mapred.InputFormat;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.OutputFormat;
@@ -479,7 +480,7 @@ public class HBaseStorageHandler extends
       // Get credentials using the configuration instance which has HBase properties
       JobConf hbaseJobConf = new JobConf(getConf());
       org.apache.hadoop.hbase.mapred.TableMapReduceUtil.initCredentials(hbaseJobConf);
-      jobConf.getCredentials().mergeAll(hbaseJobConf.getCredentials());
+      ShimLoader.getHadoopShims().mergeCredentials(jobConf, hbaseJobConf);
     } catch (Exception e) {
       throw new RuntimeException(e);
     }

Modified: hive/branches/spark/shims/0.20/src/main/java/org/apache/hadoop/hive/shims/Hadoop20Shims.java
URL: http://svn.apache.org/viewvc/hive/branches/spark/shims/0.20/src/main/java/org/apache/hadoop/hive/shims/Hadoop20Shims.java?rev=1637710&r1=1637709&r2=1637710&view=diff
==============================================================================
--- hive/branches/spark/shims/0.20/src/main/java/org/apache/hadoop/hive/shims/Hadoop20Shims.java
(original)
+++ hive/branches/spark/shims/0.20/src/main/java/org/apache/hadoop/hive/shims/Hadoop20Shims.java
Sun Nov  9 18:23:07 2014
@@ -904,6 +904,11 @@ public class Hadoop20Shims implements Ha
     throw new IOException("Merging of credentials not supported in this version of hadoop");
   }
 
+  @Override
+  public void mergeCredentials(JobConf dest, JobConf src) throws IOException {
+    throw new IOException("Merging of credentials not supported in this version of hadoop");
+  }
+
   protected void run(FsShell shell, String[] command) throws Exception {
     LOG.debug(ArrayUtils.toString(command));
     shell.run(command);

Modified: hive/branches/spark/shims/0.20S/src/main/java/org/apache/hadoop/hive/shims/Hadoop20SShims.java
URL: http://svn.apache.org/viewvc/hive/branches/spark/shims/0.20S/src/main/java/org/apache/hadoop/hive/shims/Hadoop20SShims.java?rev=1637710&r1=1637709&r2=1637710&view=diff
==============================================================================
--- hive/branches/spark/shims/0.20S/src/main/java/org/apache/hadoop/hive/shims/Hadoop20SShims.java
(original)
+++ hive/branches/spark/shims/0.20S/src/main/java/org/apache/hadoop/hive/shims/Hadoop20SShims.java
Sun Nov  9 18:23:07 2014
@@ -528,6 +528,11 @@ public class Hadoop20SShims extends Hado
   }
 
   @Override
+  public void mergeCredentials(JobConf dest, JobConf src) throws IOException {
+    throw new IOException("Merging of credentials not supported in this version of hadoop");
+  }
+
+  @Override
   public String getPassword(Configuration conf, String name) {
     // No password API, just retrieve value from conf
     return conf.get(name);

Modified: hive/branches/spark/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
URL: http://svn.apache.org/viewvc/hive/branches/spark/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java?rev=1637710&r1=1637709&r2=1637710&view=diff
==============================================================================
--- hive/branches/spark/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
(original)
+++ hive/branches/spark/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
Sun Nov  9 18:23:07 2014
@@ -771,6 +771,11 @@ public class Hadoop23Shims extends Hadoo
     jobConf.getCredentials().mergeAll(UserGroupInformation.getCurrentUser().getCredentials());
   }
 
+  @Override
+  public void mergeCredentials(JobConf dest, JobConf src) throws IOException {
+    dest.getCredentials().mergeAll(src.getCredentials());
+  }
+
   protected static final Method accessMethod;
   protected static final Method getPasswordMethod;
 

Modified: hive/branches/spark/shims/common/src/main/java/org/apache/hadoop/hive/shims/HadoopShims.java
URL: http://svn.apache.org/viewvc/hive/branches/spark/shims/common/src/main/java/org/apache/hadoop/hive/shims/HadoopShims.java?rev=1637710&r1=1637709&r2=1637710&view=diff
==============================================================================
--- hive/branches/spark/shims/common/src/main/java/org/apache/hadoop/hive/shims/HadoopShims.java
(original)
+++ hive/branches/spark/shims/common/src/main/java/org/apache/hadoop/hive/shims/HadoopShims.java
Sun Nov  9 18:23:07 2014
@@ -712,6 +712,8 @@ public interface HadoopShims {
 
   public void getMergedCredentials(JobConf jobConf) throws IOException;
 
+  public void mergeCredentials(JobConf dest, JobConf src) throws IOException;
+
   /**
    * Check if the configured UGI has access to the path for the given file system action.
    * Method will return successfully if action is permitted. AccessControlExceptoin will



Mime
View raw message