incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1235106 - in /incubator/hcatalog/trunk: CHANGES.txt storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputStorageDriver.java storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputStorageDriver.java
Date Tue, 24 Jan 2012 01:24:37 GMT
Author: hashutosh
Date: Tue Jan 24 01:24:37 2012
New Revision: 1235106

URL: http://svn.apache.org/viewvc?rev=1235106&view=rev
Log:
HCATALOG-226 HBase storage drivers should load hbase resources (hbase-site, hbase-default)
for the user (hashutosh via toffer)

Modified:
    incubator/hcatalog/trunk/CHANGES.txt
    incubator/hcatalog/trunk/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputStorageDriver.java
    incubator/hcatalog/trunk/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputStorageDriver.java

Modified: incubator/hcatalog/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1235106&r1=1235105&r2=1235106&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Tue Jan 24 01:24:37 2012
@@ -60,6 +60,8 @@ Trunk (unreleased changes)
   HCAT-63. RPM package integration with Hadoop (khorgath via hashutosh)
 
   IMPROVEMENTS
+  HCAT-226. HBase storage drivers should load hbase resources (hbase-site, hbase-default)
for the user (hashutosh via toffer)
+
   HCAT-223. Include HWI (vikram.dixit via khorgath)
 
   HCAT-166. Making configuration/installation automatable (vikram.dixit via khorgath)

Modified: incubator/hcatalog/trunk/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputStorageDriver.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputStorageDriver.java?rev=1235106&r1=1235105&r2=1235106&view=diff
==============================================================================
--- incubator/hcatalog/trunk/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputStorageDriver.java
(original)
+++ incubator/hcatalog/trunk/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputStorageDriver.java
Tue Jan 24 01:24:37 2012
@@ -19,6 +19,7 @@
 package org.apache.hcatalog.hbase;
 
 import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hive.metastore.MetaStoreUtils;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.serde.Constants;
@@ -91,6 +92,7 @@ abstract  class HBaseBaseOutputStorageDr
 
         String txnString = outputJobInfo.getProperties().getProperty(HBaseConstants.PROPERTY_WRITE_TXN_KEY);
         if(txnString == null) {
+            HBaseConfiguration.addHbaseResources(context.getConfiguration());
             //outputSchema should be set by HCatOutputFormat calling setSchema, prior to
initialize being called
             //TODO reconcile output_revision passing to HBaseSerDeResultConverter
             //on the first call to this method hcatProperties will not contain an OUTPUT_VERSION
but that doesn't

Modified: incubator/hcatalog/trunk/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputStorageDriver.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputStorageDriver.java?rev=1235106&r1=1235105&r2=1235106&view=diff
==============================================================================
--- incubator/hcatalog/trunk/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputStorageDriver.java
(original)
+++ incubator/hcatalog/trunk/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputStorageDriver.java
Tue Jan 24 01:24:37 2012
@@ -26,6 +26,7 @@ import java.util.Map;
 import java.util.Properties;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.mapreduce.TableInputFormat;
@@ -98,9 +99,10 @@ public class HBaseInputStorageDriver ext
         String serSnapshot = (String) inpJobInfo.getProperties().get(
                 HBaseConstants.PROPERTY_TABLE_SNAPSHOT_KEY);
         if(serSnapshot == null){
-        snapshot = HBaseHCatStorageHandler.createSnapshot(jobConf,
+            HBaseConfiguration.addHbaseResources(context.getConfiguration());
+            snapshot = HBaseHCatStorageHandler.createSnapshot(jobConf,
                 hbaseTableName);
-        inpJobInfo.getProperties().setProperty(
+            inpJobInfo.getProperties().setProperty(
                 HBaseConstants.PROPERTY_TABLE_SNAPSHOT_KEY,
                 HCatUtil.serialize(snapshot));
         }



Mime
View raw message