incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1235113 - in /incubator/hcatalog/branches/branch-0.3: 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 02:47:37 GMT
Author: hashutosh
Date: Tue Jan 24 02:47:36 2012
New Revision: 1235113

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

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

Modified: incubator/hcatalog/branches/branch-0.3/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.3/CHANGES.txt?rev=1235113&r1=1235112&r2=1235113&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.3/CHANGES.txt (original)
+++ incubator/hcatalog/branches/branch-0.3/CHANGES.txt Tue Jan 24 02:47:36 2012
@@ -105,6 +105,8 @@ Release 0.3.0 (unreleased changes)
   OPTIMIZATIONS
 
   BUG FIXES
+  HCAT-226. HBase storage drivers should load hbase resources (hbase-site, hbase-default)
for the user (toffer via hashutosh)
+
   HCAT-224. hcatalog e2e tests have the hive version hard coded we should read that from
the hive build.properties (Arpit Gupta via hashutosh)
 
   HCAT-216. we should source hcat-env.sh in hcat-config before we determine where hadoop
is (arpitgupta via khorgath)

Modified: incubator/hcatalog/branches/branch-0.3/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputStorageDriver.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.3/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputStorageDriver.java?rev=1235113&r1=1235112&r2=1235113&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.3/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputStorageDriver.java
(original)
+++ incubator/hcatalog/branches/branch-0.3/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputStorageDriver.java
Tue Jan 24 02:47:36 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/branches/branch-0.3/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputStorageDriver.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.3/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputStorageDriver.java?rev=1235113&r1=1235112&r2=1235113&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.3/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputStorageDriver.java
(original)
+++ incubator/hcatalog/branches/branch-0.3/storage-drivers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputStorageDriver.java
Tue Jan 24 02:47:36 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