Author: ereisman
Date: Thu Sep 27 01:51:15 2012
New Revision: 1390802
URL: http://svn.apache.org/viewvc?rev=1390802&view=rev
Log:
GIRAPH-347: GiraphConfiguration broke hcatalog build
Modified:
giraph/trunk/CHANGELOG
giraph/trunk/giraph-formats-contrib/src/hcatalog/java/org/apache/giraph/format/hcatalog/HiveGiraphRunner.java
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/BspCase.java
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/format/accumulo/TestAccumuloVertexFormat.java
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/format/hbase/TestHBaseRootMarkerVertextFormat.java
Modified: giraph/trunk/CHANGELOG
URL:
http://svn.apache.org/viewvc/giraph/trunk/CHANGELOG?rev=1390802&r1=1390801&r2=1390802&view=diff
==============================================================================
--- giraph/trunk/CHANGELOG (original)
+++ giraph/trunk/CHANGELOG Thu Sep 27 01:51:15 2012
@@ -1,6 +1,8 @@
Giraph Change Log
Release 0.2.0 - unreleased
+ GIRAPH-347: GiraphConfiguration broke hcatalog build
+ (Nitay Joffe via ereisman)
GIRAPH-340: Added client/server ExecutionHandlers to Netty to avoid
and added WrappedAdaptiveReceiveBufferSizePredictorFactory to
Modified:
giraph/trunk/giraph-formats-contrib/src/hcatalog/java/org/apache/giraph/format/hcatalog/HiveGiraphRunner.java
URL:
http://svn.apache.org/viewvc/giraph/trunk/giraph-formats-contrib/src/hcatalog/java/org/apache/giraph/format/hcatalog/HiveGiraphRunner.java?rev=1390802&r1=1390801&r2=1390802&view=diff
==============================================================================
---
giraph/trunk/giraph-formats-contrib/src/hcatalog/java/org/apache/giraph/format/hcatalog/HiveGiraphRunner.java
(original)
+++
giraph/trunk/giraph-formats-contrib/src/hcatalog/java/org/apache/giraph/format/hcatalog/HiveGiraphRunner.java
Thu Sep 27 01:51:15 2012
@@ -31,6 +31,7 @@ import org.apache.commons.cli.GnuParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
+import org.apache.giraph.GiraphConfiguration;
import org.apache.giraph.graph.Vertex;
import org.apache.giraph.graph.GiraphJob;
import org.apache.hadoop.conf.Configuration;
@@ -95,22 +96,23 @@ public class HiveGiraphRunner implements
// setup GiraphJob
GiraphJob job = new GiraphJob(getConf(), getClass().getName());
- job.setVertexClass(vertexClass);
+ GiraphConfiguration conf = job.getConfiguration();
+ conf.setVertexClass(vertexClass);
// setup input from Hive
InputJobInfo inputJobInfo = InputJobInfo.create(dbName,
inputTableName,
inputTableFilterExpr);
HCatInputFormat.setInput(job.getInternalJob(), inputJobInfo);
- job.setVertexInputFormatClass(vertexInputFormatClass);
+ conf.setVertexInputFormatClass(vertexInputFormatClass);
// setup output to Hive
HCatOutputFormat.setOutput(job.getInternalJob(),
OutputJobInfo.create(
dbName, outputTableName,
outputTablePartitionValues));
HCatOutputFormat.setSchema(job.getInternalJob(),
HCatOutputFormat.getTableSchema(job.getInternalJob()));
- job.setVertexOutputFormatClass(vertexOutputFormatClass);
+ conf.setVertexOutputFormatClass(vertexOutputFormatClass);
- job.setWorkerConfiguration(workers, workers, 100.0f);
+ conf.setWorkerConfiguration(workers, workers, 100.0f);
initGiraphJob(job);
return job.run(isVerbose) ? 0 : -1;
@@ -312,7 +314,7 @@ public class HiveGiraphRunner implements
/**
* Override this method to add more command-line options. You can
process
* them by also overriding {@link #processMoreArguments(CommandLine)}.
- *
+ *
* @param options
*/
protected void addMoreOptions(Options options) {
@@ -322,7 +324,7 @@ public class HiveGiraphRunner implements
* Override this method to process additional command-line arguments.
You
* may want to declare additional options by also overriding
* {@link #addMoreOptions(Options)}.
- *
+ *
* @param cmd
*/
protected void processMoreArguments(CommandLine cmd) {
@@ -331,7 +333,7 @@ public class HiveGiraphRunner implements
/**
* Override this method to do additional setup with the GiraphJob that
will
* run.
- *
+ *
* @param job
* GiraphJob that is going to run
*/
Modified:
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/BspCase.java
URL:
http://svn.apache.org/viewvc/giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/BspCase.java?rev=1390802&r1=1390801&r2=1390802&view=diff
==============================================================================
---
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/BspCase.java
(original)
+++
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/BspCase.java
Thu Sep 27 01:51:15 2012
@@ -58,7 +58,7 @@ public class BspCase extends TestCase im
* Adjust the configuration to the basic test case
*/
public final void setupConfiguration(GiraphJob job) {
- Configuration conf = job.getConfiguration();
+ GiraphConfiguration conf = job.getConfiguration();
conf.set("mapred.jar", getJarLocation());
// Allow this test to be run on a real Hadoop setup
@@ -67,7 +67,7 @@ public class BspCase extends TestCase im
getJobTracker() + " with jar path " + getJarLocation()
+ " for " + getName());
conf.set("mapred.job.tracker", getJobTracker());
- job.setWorkerConfiguration(getNumWorkers(),
+ conf.setWorkerConfiguration(getNumWorkers(),
getNumWorkers(),
100.0f);
}
@@ -75,15 +75,15 @@ public class BspCase extends TestCase im
System.out.println("setup: Using local job runner with " +
"location " + getJarLocation() + " for "
+ getName());
- job.setWorkerConfiguration(1, 1, 100.0f);
+ conf.setWorkerConfiguration(1, 1, 100.0f);
// Single node testing
- conf.setBoolean(GiraphJob.SPLIT_MASTER_WORKER, false);
+ conf.setBoolean(GiraphConfiguration.SPLIT_MASTER_WORKER, false);
}
- conf.setInt(GiraphJob.POLL_ATTEMPTS, 10);
- conf.setInt(GiraphJob.POLL_MSECS, 3*1000);
- conf.setInt(GiraphJob.ZOOKEEPER_SERVERLIST_POLL_MSECS, 500);
+ conf.setInt(GiraphConfiguration.POLL_ATTEMPTS, 10);
+ conf.setInt(GiraphConfiguration.POLL_MSECS, 3*1000);
+ conf.setInt(GiraphConfiguration.ZOOKEEPER_SERVERLIST_POLL_MSECS, 500);
if (getZooKeeperList() != null) {
- job.setZooKeeperConfiguration(getZooKeeperList());
+ conf.setZooKeeperConfiguration(getZooKeeperList());
}
// GeneratedInputSplit will generate 5 vertices
conf.setLong(GeneratedVertexReader.READER_VERTICES, 5);
@@ -175,7 +175,7 @@ public class BspCase extends TestCase im
FileSystem hdfs = FileSystem.get(conf);
// Since local jobs always use the same paths, remove them
Path oldLocalJobPaths = new Path(
- GiraphJob.ZOOKEEPER_MANAGER_DIR_DEFAULT);
+ GiraphConfiguration.ZOOKEEPER_MANAGER_DIR_DEFAULT);
FileStatus[] fileStatusArr;
try {
fileStatusArr = hdfs.listStatus(oldLocalJobPaths);
Modified:
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/format/accumulo/TestAccumuloVertexFormat.java
URL:
http://svn.apache.org/viewvc/giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/format/accumulo/TestAccumuloVertexFormat.java?rev=1390802&r1=1390801&r2=1390802&view=diff
==============================================================================
---
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/format/accumulo/TestAccumuloVertexFormat.java
(original)
+++
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/format/accumulo/TestAccumuloVertexFormat.java
Thu Sep 27 01:51:15 2012
@@ -34,6 +34,7 @@ import org.apache.accumulo.core.security
import org.apache.accumulo.core.util.ByteBufferUtil;
import org.apache.accumulo.core.util.Pair;
import org.apache.giraph.BspCase;
+import org.apache.giraph.GiraphConfiguration;
import org.apache.giraph.format.accumulo.edgemarker.AccumuloEdgeInputFormat;
import org.apache.giraph.format.accumulo.edgemarker.AccumuloEdgeOutputFormat;
import org.apache.giraph.graph.EdgeListVertex;
@@ -135,9 +136,10 @@ public class TestAccumuloVertexFormat ex
GiraphJob job = new GiraphJob(conf, getCallingMethodName());
setupConfiguration(job);
- job.setVertexClass(EdgeNotification.class);
- job.setVertexInputFormatClass(AccumuloEdgeInputFormat.class);
- job.setVertexOutputFormatClass(AccumuloEdgeOutputFormat.class);
+ GiraphConfiguration giraphConf = job.getConfiguration();
+ giraphConf.setVertexClass(EdgeNotification.class);
+ giraphConf.setVertexInputFormatClass(AccumuloEdgeInputFormat.class);
+ giraphConf.setVertexOutputFormatClass(AccumuloEdgeOutputFormat.class);
HashSet<Pair<Text, Text>> columnsToFetch = new
HashSet<Pair<Text,Text>>();
columnsToFetch.add(new Pair<Text, Text>(FAMILY, CHILDREN));
Modified:
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/format/hbase/TestHBaseRootMarkerVertextFormat.java
URL:
http://svn.apache.org/viewvc/giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/format/hbase/TestHBaseRootMarkerVertextFormat.java?rev=1390802&r1=1390801&r2=1390802&view=diff
==============================================================================
---
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/format/hbase/TestHBaseRootMarkerVertextFormat.java
(original)
+++
giraph/trunk/giraph-formats-contrib/src/test/java/org/apache/giraph/format/hbase/TestHBaseRootMarkerVertextFormat.java
Thu Sep 27 01:51:15 2012
@@ -21,6 +21,7 @@ package org.apache.giraph.format.hbase;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.giraph.BspCase;
+import org.apache.giraph.GiraphConfiguration;
import org.apache.giraph.format.hbase.edgemarker.TableEdgeInputFormat;
import org.apache.giraph.format.hbase.edgemarker.TableEdgeOutputFormat;
import org.apache.giraph.graph.EdgeListVertex;
@@ -142,12 +143,13 @@ public class TestHBaseRootMarkerVertextF
conf.set(TableOutputFormat.OUTPUT_TABLE, TABLE_NAME);
GiraphJob giraphJob = new GiraphJob(conf, getCallingMethodName());
- giraphJob.setZooKeeperConfiguration(
+ GiraphConfiguration giraphConf = giraphJob.getConfiguration();
+ giraphConf.setZooKeeperConfiguration(
cluster.getMaster().getZooKeeper().getQuorum());
setupConfiguration(giraphJob);
- giraphJob.setVertexClass(EdgeNotification.class);
- giraphJob.setVertexInputFormatClass(TableEdgeInputFormat.class);
- giraphJob.setVertexOutputFormatClass(TableEdgeOutputFormat.class);
+ giraphConf.setVertexClass(EdgeNotification.class);
+ giraphConf.setVertexInputFormatClass(TableEdgeInputFormat.class);
+ giraphConf.setVertexOutputFormatClass(TableEdgeOutputFormat.class);
assertTrue(giraphJob.run(true));
if(log.isInfoEnabled())