Updated Branches: refs/heads/trunk 0bb304002 -> ab88282d1
GIRAPH-536: Clean up configuration options (apresta) Project: http://git-wip-us.apache.org/repos/asf/giraph/repo Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/ab88282d Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/ab88282d Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/ab88282d Branch: refs/heads/trunk Commit: ab88282d173d0ae36bff9a06485fb8be158455d4 Parents: 0bb3040 Author: Alessandro Presta <[email protected]> Authored: Tue Apr 2 16:33:58 2013 -0700 Committer: Alessandro Presta <[email protected]> Committed: Wed Apr 3 11:55:08 2013 -0700 ---------------------------------------------------------------------- CHANGELOG | 2 + .../apache/giraph/benchmark/PageRankVertex.java | 2 +- .../giraph/benchmark/RandomMessageBenchmark.java | 6 ++-- .../giraph/benchmark/ShortestPathsVertex.java | 3 +- .../apache/giraph/conf/GiraphConfiguration.java | 8 +++--- .../org/apache/giraph/conf/GiraphConstants.java | 20 +++++++------- .../org/apache/giraph/master/BspServiceMaster.java | 6 ++-- .../org/apache/giraph/zk/ZooKeeperManager.java | 6 +++- 8 files changed, 29 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/giraph/blob/ab88282d/CHANGELOG ---------------------------------------------------------------------- diff --git a/CHANGELOG b/CHANGELOG index d040d8c..4dcf8b7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ Giraph Change Log Release 0.2.0 - unreleased + GIRAPH-536: Clean up configuration options (apresta) + GIRAPH-551: Fix log message at the end of edge input (apresta) GIRAPH-555: Fix log message on generated input splits (apresta) http://git-wip-us.apache.org/repos/asf/giraph/blob/ab88282d/giraph-core/src/main/java/org/apache/giraph/benchmark/PageRankVertex.java ---------------------------------------------------------------------- diff --git a/giraph-core/src/main/java/org/apache/giraph/benchmark/PageRankVertex.java b/giraph-core/src/main/java/org/apache/giraph/benchmark/PageRankVertex.java index 9c3b9f5..3f394b4 100644 --- a/giraph-core/src/main/java/org/apache/giraph/benchmark/PageRankVertex.java +++ b/giraph-core/src/main/java/org/apache/giraph/benchmark/PageRankVertex.java @@ -31,7 +31,7 @@ public class PageRankVertex extends Vertex<LongWritable, DoubleWritable, DoubleWritable, DoubleWritable> { /** Number of supersteps */ public static final String SUPERSTEP_COUNT = - "PageRankBenchmark.superstepCount"; + "giraph.pageRankBenchmark.superstepCount"; @Override public void compute(Iterable<DoubleWritable> messages) throws IOException { http://git-wip-us.apache.org/repos/asf/giraph/blob/ab88282d/giraph-core/src/main/java/org/apache/giraph/benchmark/RandomMessageBenchmark.java ---------------------------------------------------------------------- diff --git a/giraph-core/src/main/java/org/apache/giraph/benchmark/RandomMessageBenchmark.java b/giraph-core/src/main/java/org/apache/giraph/benchmark/RandomMessageBenchmark.java index aa20cca..ff65ab9 100644 --- a/giraph-core/src/main/java/org/apache/giraph/benchmark/RandomMessageBenchmark.java +++ b/giraph-core/src/main/java/org/apache/giraph/benchmark/RandomMessageBenchmark.java @@ -47,15 +47,15 @@ import java.util.Random; public class RandomMessageBenchmark implements Tool { /** How many supersteps to run */ public static final String SUPERSTEP_COUNT = - "RandomMessageBenchmark.superstepCount"; + "giraph.randomMessageBenchmark.superstepCount"; /** How many bytes per message */ public static final String NUM_BYTES_PER_MESSAGE = - "RandomMessageBenchmark.numBytesPerMessage"; + "giraph.randomMessageBenchmark.numBytesPerMessage"; /** Default bytes per message */ public static final int DEFAULT_NUM_BYTES_PER_MESSAGE = 16; /** How many messages per edge */ public static final String NUM_MESSAGES_PER_EDGE = - "RandomMessageBenchmark.numMessagesPerEdge"; + "giraph.randomMessageBenchmark.numMessagesPerEdge"; /** Default messages per edge */ public static final int DEFAULT_NUM_MESSAGES_PER_EDGE = 1; /** All bytes sent during this superstep */ http://git-wip-us.apache.org/repos/asf/giraph/blob/ab88282d/giraph-core/src/main/java/org/apache/giraph/benchmark/ShortestPathsVertex.java ---------------------------------------------------------------------- diff --git a/giraph-core/src/main/java/org/apache/giraph/benchmark/ShortestPathsVertex.java b/giraph-core/src/main/java/org/apache/giraph/benchmark/ShortestPathsVertex.java index 4c8bd31..c1b77d1 100644 --- a/giraph-core/src/main/java/org/apache/giraph/benchmark/ShortestPathsVertex.java +++ b/giraph-core/src/main/java/org/apache/giraph/benchmark/ShortestPathsVertex.java @@ -31,7 +31,8 @@ import java.io.IOException; public class ShortestPathsVertex extends Vertex<LongWritable, DoubleWritable, DoubleWritable, DoubleWritable> { /** Source id. */ - public static final String SOURCE_ID = "ShortestPathsBenchmark.sourceId"; + public static final String SOURCE_ID = + "giraph.shortestPathsBenchmark.sourceId"; /** Default source id. */ public static final long SOURCE_ID_DEFAULT = 1; http://git-wip-us.apache.org/repos/asf/giraph/blob/ab88282d/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConfiguration.java ---------------------------------------------------------------------- diff --git a/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConfiguration.java b/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConfiguration.java index 8a78313..90b05e3 100644 --- a/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConfiguration.java +++ b/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConfiguration.java @@ -628,11 +628,11 @@ public class GiraphConfiguration extends Configuration return ZOOKEEPER_MAX_SESSION_TIMEOUT.get(this); } - public String getZooKeeperForceSync() { + public boolean getZooKeeperForceSync() { return ZOOKEEPER_FORCE_SYNC.get(this); } - public String getZooKeeperSkipAcl() { + public boolean getZooKeeperSkipAcl() { return ZOOKEEPER_SKIP_ACL.get(this); } @@ -678,11 +678,11 @@ public class GiraphConfiguration extends Configuration * @param numInputSplitsThreads Number of input split threads to use */ public void setNumInputSplitsThreads(int numInputSplitsThreads) { - NUM_INPUT_SPLITS_THREADS.set(this, numInputSplitsThreads); + NUM_INPUT_THREADS.set(this, numInputSplitsThreads); } public int getNumInputSplitsThreads() { - return NUM_INPUT_SPLITS_THREADS.get(this); + return NUM_INPUT_THREADS.get(this); } public long getInputSplitMaxVertices() { http://git-wip-us.apache.org/repos/asf/giraph/blob/ab88282d/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java ---------------------------------------------------------------------- diff --git a/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java b/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java index 730fa5b..95c9862 100644 --- a/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java +++ b/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java @@ -444,9 +444,9 @@ public interface GiraphConstants { IntConfOption NUM_COMPUTE_THREADS = new IntConfOption("giraph.numComputeThreads", 1); - /** Number of threads for input splits loading */ - IntConfOption NUM_INPUT_SPLITS_THREADS = - new IntConfOption("giraph.numInputSplitsThreads", 1); + /** Number of threads for input split loading */ + IntConfOption NUM_INPUT_THREADS = + new IntConfOption("giraph.numInputThreads", 1); /** Minimum stragglers of the superstep before printing them out */ IntConfOption PARTITION_LONG_TAIL_MIN_PRINT = @@ -493,16 +493,16 @@ public interface GiraphConstants { /** Multiplier for the current workers squared */ FloatConfOption PARTITION_COUNT_MULTIPLIER = - new FloatConfOption("partition.masterPartitionCountMultipler", 1.0f); + new FloatConfOption("giraph.masterPartitionCountMultiplier", 1.0f); /** Overrides default partition count calculation if not -1 */ IntConfOption USER_PARTITION_COUNT = - new IntConfOption("partition.userPartitionCount", -1); + new IntConfOption("giraph.userPartitionCount", -1); /** Vertex key space size for * {@link org.apache.giraph.partition.SimpleRangeWorkerPartitioner} */ - String PARTITION_VERTEX_KEY_SPACE_SIZE = "partition.vertexKeySpaceSize"; + String PARTITION_VERTEX_KEY_SPACE_SIZE = "giraph.vertexKeySpaceSize"; /** Java opts passed to ZooKeeper startup */ StrConfOption ZOOKEEPER_JAVA_OPTS = @@ -608,11 +608,11 @@ public interface GiraphConstants { IntConfOption ZOOKEEPER_MAX_SESSION_TIMEOUT = new IntConfOption("giraph.zkMaxSessionTimeout", MINUTES.toMillis(15)); /** ZooKeeper force sync */ - StrConfOption ZOOKEEPER_FORCE_SYNC = - new StrConfOption("giraph.zKForceSync", "no"); + BooleanConfOption ZOOKEEPER_FORCE_SYNC = + new BooleanConfOption("giraph.zKForceSync", false); /** ZooKeeper skip ACLs */ - StrConfOption ZOOKEEPER_SKIP_ACL = - new StrConfOption("giraph.ZkSkipAcl", "yes"); + BooleanConfOption ZOOKEEPER_SKIP_ACL = + new BooleanConfOption("giraph.ZkSkipAcl", true); /** * Whether to use SASL with DIGEST and Hadoop Job Tokens to authenticate http://git-wip-us.apache.org/repos/asf/giraph/blob/ab88282d/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java ---------------------------------------------------------------------- diff --git a/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java b/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java index aeb71d0..4559779 100644 --- a/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java +++ b/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java @@ -126,8 +126,8 @@ public class BspServiceMaster<I extends WritableComparable, /** Print worker names only if there are 10 workers left */ public static final int MAX_PRINTABLE_REMAINING_WORKERS = 10; /** How many threads to use when writing input splits to zookeeper*/ - public static final String INPUT_SPLIT_THREAD_COUNT = - "giraph.inputSplitThreadCount"; + public static final String NUM_MASTER_ZK_INPUT_SPLIT_THREADS = + "giraph.numMasterZkInputSplitThreads"; /** Default number of threads to use when writing input splits to zookeeper */ public static final int DEFAULT_INPUT_SPLIT_THREAD_COUNT = 1; /** Time instance to use for timing */ @@ -641,7 +641,7 @@ public class BspServiceMaster<I extends WritableComparable, } // Write input splits to zookeeper in parallel - int inputSplitThreadCount = conf.getInt(INPUT_SPLIT_THREAD_COUNT, + int inputSplitThreadCount = conf.getInt(NUM_MASTER_ZK_INPUT_SPLIT_THREADS, DEFAULT_INPUT_SPLIT_THREAD_COUNT); if (LOG.isInfoEnabled()) { LOG.info(logPrefix + ": Starting to write input split data " + http://git-wip-us.apache.org/repos/asf/giraph/blob/ab88282d/giraph-core/src/main/java/org/apache/giraph/zk/ZooKeeperManager.java ---------------------------------------------------------------------- diff --git a/giraph-core/src/main/java/org/apache/giraph/zk/ZooKeeperManager.java b/giraph-core/src/main/java/org/apache/giraph/zk/ZooKeeperManager.java index 82a7fc1..7a374b1 100644 --- a/giraph-core/src/main/java/org/apache/giraph/zk/ZooKeeperManager.java +++ b/giraph-core/src/main/java/org/apache/giraph/zk/ZooKeeperManager.java @@ -566,8 +566,10 @@ public class ZooKeeperManager { GiraphConstants.DEFAULT_ZOOKEEPER_SYNC_LIMIT + "\n"); writer.write("snapCount=" + GiraphConstants.DEFAULT_ZOOKEEPER_SNAP_COUNT + "\n"); - writer.write("forceSync=" + conf.getZooKeeperForceSync() + "\n"); - writer.write("skipACL=" + conf.getZooKeeperSkipAcl() + "\n"); + writer.write("forceSync=" + + (conf.getZooKeeperForceSync() ? "yes" : "no") + "\n"); + writer.write("skipACL=" + + (conf.getZooKeeperSkipAcl() ? "yes" : "no") + "\n"); if (serverList.size() != 1) { writer.write("electionAlg=0\n"); for (int i = 0; i < serverList.size(); ++i) {
