giraph-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ach...@apache.org
Subject git commit: updated refs/heads/trunk to f4f453d
Date Wed, 03 Apr 2013 07:02:25 GMT
Updated Branches:
  refs/heads/trunk b2dff2751 -> f4f453db3


GIRAPH-602: HiveGiraphRunner should allow disabling/choosing of input
formats at runtime (aching)


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

Branch: refs/heads/trunk
Commit: f4f453db34c77d96fbe2407376fb36d496be8d09
Parents: b2dff27
Author: Avery Ching <aching@fb.com>
Authored: Mon Apr 1 10:05:19 2013 -0700
Committer: Avery Ching <aching@fb.com>
Committed: Wed Apr 3 00:02:13 2013 -0700

----------------------------------------------------------------------
 CHANGELOG                                          |    3 +
 .../org/apache/giraph/hive/HiveGiraphRunner.java   |   35 ++++++++++-----
 2 files changed, 27 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/f4f453db/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 69261d2..9045a55 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,9 @@
 Giraph Change Log
 
 Release 0.2.0 - unreleased
+  GIRAPH-602: HiveGiraphRunner should allow disabling/choosing of input 
+  formats at runtime (aching)
+
   GIRAPH-13: Port Giraph to YARN (ereisman)
 
   GIRAPH-600: Create an option to do output during computation (majakabiljo)

http://git-wip-us.apache.org/repos/asf/giraph/blob/f4f453db/giraph-hive/src/main/java/org/apache/giraph/hive/HiveGiraphRunner.java
----------------------------------------------------------------------
diff --git a/giraph-hive/src/main/java/org/apache/giraph/hive/HiveGiraphRunner.java b/giraph-hive/src/main/java/org/apache/giraph/hive/HiveGiraphRunner.java
index 712134e..6e40b7f 100644
--- a/giraph-hive/src/main/java/org/apache/giraph/hive/HiveGiraphRunner.java
+++ b/giraph-hive/src/main/java/org/apache/giraph/hive/HiveGiraphRunner.java
@@ -348,12 +348,22 @@ public class HiveGiraphRunner implements Tool {
 
     String hiveToVertexClassStr = cmdln.getOptionValue("hiveToVertexClass");
     if (hiveToVertexClassStr != null) {
-      setHiveToVertexClass(findClass(hiveToVertexClassStr, HiveToVertex.class));
+      if (hiveToVertexClassStr.equals("disable")) {
+        hiveToVertexClass = null;
+      } else {
+        setHiveToVertexClass(
+            findClass(hiveToVertexClassStr, HiveToVertex.class));
+      }
     }
 
     String hiveToEdgeClassStr = cmdln.getOptionValue("hiveToEdgeClass");
     if (hiveToEdgeClassStr != null) {
-      hiveToEdgeClass = findClass(hiveToEdgeClassStr, HiveToEdge.class);
+      if (hiveToEdgeClassStr.equals("disable")) {
+        hiveToEdgeClass = null;
+      } else {
+        setHiveToEdgeClass(
+            findClass(hiveToEdgeClassStr, HiveToEdge.class));
+      }
     }
 
     String vertexToHiveClassStr = cmdln.getOptionValue("vertexToHiveClass");
@@ -496,21 +506,24 @@ public class HiveGiraphRunner implements Tool {
     options.addOption("db", "dbName", true, "Hive database name");
 
     // Vertex input settings
-    if (hiveToVertexClass == null) {
-      options.addOption(null, "hiveToVertexClass", true,
-          "Giraph " + HiveToVertex.class.getSimpleName() +
-          " class to use");
-    }
+    options.addOption(null, "hiveToVertexClass", true,
+        "Giraph " + HiveToVertex.class.getSimpleName() +
+            " class to use (default - " +
+            (hiveToVertexClass == null ? "not used" :
+                hiveToVertexClass.getSimpleName()) + "), " +
+            "\"disable\" will unset this option");
     options.addOption("vi", "vertexInputTable", true,
         "Vertex input table name");
     options.addOption("VI", "vertexInputFilter", true,
         "Vertex input table filter expression (e.g., \"a<2 AND b='two'\"");
 
     // Edge input settings
-    if (hiveToEdgeClass == null) {
-      options.addOption(null, "hiveToEdgeClass", true,
-          "Giraph " + HiveToEdge.class.getSimpleName() + " class to use");
-    }
+    options.addOption(null, "hiveToEdgeClass", true,
+        "Giraph " + HiveToEdge.class.getSimpleName() +
+            " class to use (default - " +
+            (hiveToEdgeClass == null ? "not used" :
+                hiveToEdgeClass.getSimpleName()) + "), " +
+            "\"disable\" will unset this option");
     options.addOption("ei", "edgeInputTable", true,
         "Edge input table name");
     options.addOption("EI", "edgeInputFilter", true,


Mime
View raw message