You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by ma...@apache.org on 2013/10/10 21:08:33 UTC

git commit: updated refs/heads/trunk to 2c89b97

Updated Branches:
  refs/heads/trunk e421d27a1 -> 2c89b9702


GIRAPH-776: Update Giraph to use HiveIO 0.18 (gmalewicz via majakabiljo)


Project: http://git-wip-us.apache.org/repos/asf/giraph/repo
Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/2c89b970
Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/2c89b970
Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/2c89b970

Branch: refs/heads/trunk
Commit: 2c89b9702a5a4ba9747153d5d39bd7cd6ed79b1f
Parents: e421d27
Author: Maja Kabiljo <ma...@fb.com>
Authored: Thu Oct 10 12:07:50 2013 -0700
Committer: Maja Kabiljo <ma...@fb.com>
Committed: Thu Oct 10 12:07:50 2013 -0700

----------------------------------------------------------------------
 CHANGELOG                                       |  2 ++
 .../apache/giraph/hive/common/HiveUtils.java    | 28 +++++++++++---------
 pom.xml                                         |  2 +-
 3 files changed, 19 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/2c89b970/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 5b91695..ec91f33 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
 Giraph Change Log
 
 Release 1.1.0 - unreleased
+  GIRAPH-776: Update Giraph to use HiveIO 0.18 (gmalewicz via majakabiljo)
+
   GIRAPH-775: Vertex value combiner (aching)
 
   GIRAPH-761: GiraphFileInputFormat ignores hidden file filter in

http://git-wip-us.apache.org/repos/asf/giraph/blob/2c89b970/giraph-hive/src/main/java/org/apache/giraph/hive/common/HiveUtils.java
----------------------------------------------------------------------
diff --git a/giraph-hive/src/main/java/org/apache/giraph/hive/common/HiveUtils.java b/giraph-hive/src/main/java/org/apache/giraph/hive/common/HiveUtils.java
index 6e1d62b..b809413 100644
--- a/giraph-hive/src/main/java/org/apache/giraph/hive/common/HiveUtils.java
+++ b/giraph-hive/src/main/java/org/apache/giraph/hive/common/HiveUtils.java
@@ -28,7 +28,6 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableComparable;
 import org.apache.log4j.Logger;
-import org.apache.thrift.TException;
 
 import com.facebook.hiveio.input.HiveApiInputFormat;
 import com.facebook.hiveio.input.HiveInputDescription;
@@ -76,11 +75,16 @@ public class HiveUtils {
   public static void initializeHiveInput(HiveApiInputFormat hiveInputFormat,
       HiveInputDescription inputDescription, String profileId,
       Configuration conf) {
-    hiveInputFormat.setMyProfileId(profileId);
-    HiveApiInputFormat.setProfileInputDesc(conf, inputDescription, profileId);
-    HiveTableSchema schema = HiveTableSchemas.lookup(conf,
-        inputDescription.getTableDesc());
-    HiveTableSchemas.put(conf, profileId, schema);
+    try {
+      hiveInputFormat.setMyProfileId(profileId);
+      HiveApiInputFormat.setProfileInputDesc(conf, inputDescription, profileId);
+      HiveTableSchema schema = HiveTableSchemas.lookup(
+          conf, inputDescription.getTableDesc());
+      HiveTableSchemas.put(conf, profileId, schema);
+    } catch (IOException e) {
+      throw new IllegalStateException(
+          "initializeHiveInput: IOException occurred", e);
+    }
   }
 
   /**
@@ -93,16 +97,16 @@ public class HiveUtils {
    */
   public static void initializeHiveOutput(HiveApiOutputFormat hiveOutputFormat,
       HiveOutputDescription outputDesc, String profileId, Configuration conf) {
-    hiveOutputFormat.setMyProfileId(profileId);
     try {
+      hiveOutputFormat.setMyProfileId(profileId);
       HiveApiOutputFormat.initProfile(conf, outputDesc, profileId);
-    } catch (TException e) {
+      HiveTableSchema schema = HiveTableSchemas.lookup(
+          conf, outputDesc.getTableDesc());
+      HiveTableSchemas.put(conf, profileId, schema);
+    } catch (IOException e) {
       throw new IllegalStateException(
-          "initializeHiveOutput: TException occurred", e);
+          "initializeHiveOutput: IOException occurred", e);
     }
-    HiveTableSchema schema = HiveTableSchemas.lookup(conf,
-        outputDesc.getTableDesc());
-    HiveTableSchemas.put(conf, profileId, schema);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/giraph/blob/2c89b970/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 397eed2..9441935 100644
--- a/pom.xml
+++ b/pom.xml
@@ -272,7 +272,7 @@ under the License.
     <dep.guava.version>12.0</dep.guava.version>
     <dep.hcatalog.version>0.5.0-incubating</dep.hcatalog.version>
     <dep.hive.version>0.11.0</dep.hive.version>
-    <dep.hiveio.version>0.17</dep.hiveio.version>
+    <dep.hiveio.version>0.18</dep.hiveio.version>
     <dep.json.version>20090211</dep.json.version>
     <dep.junit.version>4.8</dep.junit.version>
     <dep.jython.version>2.5.3</dep.jython.version>