Return-Path: X-Original-To: apmail-giraph-dev-archive@www.apache.org Delivered-To: apmail-giraph-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F11E0D0BA for ; Fri, 27 Jul 2012 08:07:37 +0000 (UTC) Received: (qmail 27051 invoked by uid 500); 27 Jul 2012 08:07:37 -0000 Delivered-To: apmail-giraph-dev-archive@giraph.apache.org Received: (qmail 26912 invoked by uid 500); 27 Jul 2012 08:07:37 -0000 Mailing-List: contact dev-help@giraph.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@giraph.apache.org Delivered-To: mailing list dev@giraph.apache.org Received: (qmail 26517 invoked by uid 500); 27 Jul 2012 08:07:36 -0000 Delivered-To: apmail-incubator-giraph-dev@incubator.apache.org Received: (qmail 26486 invoked by uid 99); 27 Jul 2012 08:07:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jul 2012 08:07:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id A9F01140B94 for ; Fri, 27 Jul 2012 08:07:35 +0000 (UTC) Date: Fri, 27 Jul 2012 08:07:35 +0000 (UTC) From: "Avery Ching (JIRA)" To: giraph-dev@incubator.apache.org Message-ID: <539771004.109725.1343376455697.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1038402447.44746.1340387682985.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (GIRAPH-214) GiraphJob should have configuration split out of it to be cleaner (GiraphConf) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GIRAPH-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13423727#comment-13423727 ] Avery Ching commented on GIRAPH-214: ------------------------------------ I think that in Giraph land we can use GiraphConf, but casting is okay for the Hadoopy parts. Maybe add a GiraphConfigurable that does the casting instead of Configurable? Still what you have patched is better than what we have already... > GiraphJob should have configuration split out of it to be cleaner (GiraphConf) > ------------------------------------------------------------------------------ > > Key: GIRAPH-214 > URL: https://issues.apache.org/jira/browse/GIRAPH-214 > Project: Giraph > Issue Type: Bug > Reporter: Avery Ching > Assignee: Eli Reisman > Priority: Minor > Attachments: GIRAPH-214-1.patch, GIRAPH-214-2.patch, GIRAPH-214-3.patch, GIRAPH-214-4.patch > > > Currently all the configuration for Giraph is part of GiraphJob, making things messy for GiraphJob. > It would be better if we added a GiraphConf (similar to Hive) that is responsible for handling configuration of the Job. > i.e. > public class GiraphJob extends Configuration.... > To simplify config, we should make get/set methods for as many of the parameters as possible. > We are targeting configuration such as > /** > * Set the vertex class (required) > * > * @param vertexClass Runs vertex computation > */ > public final void setVertexClass(Class vertexClass) { > getConfiguration().setClass(VERTEX_CLASS, vertexClass, BasicVertex.class); > } > /** > * Set the vertex input format class (required) > * > * @param vertexInputFormatClass Determines how graph is input > */ > public final void setVertexInputFormatClass( > Class vertexInputFormatClass) { > getConfiguration().setClass(VERTEX_INPUT_FORMAT_CLASS, > vertexInputFormatClass, > VertexInputFormat.class); > } > /** > * Set the vertex output format class (optional) > * > * @param vertexOutputFormatClass Determines how graph is output > */ > public final void setVertexOutputFormatClass( > Class vertexOutputFormatClass) { > getConfiguration().setClass(VERTEX_OUTPUT_FORMAT_CLASS, > vertexOutputFormatClass, > VertexOutputFormat.class); > } > /** > * Set the vertex combiner class (optional) > * > * @param vertexCombinerClass Determines how vertex messages are combined > */ > public final void setVertexCombinerClass(Class vertexCombinerClass) { > getConfiguration().setClass(VERTEX_COMBINER_CLASS, > vertexCombinerClass, > VertexCombiner.class); > } > /** > * Set the graph partitioner class (optional) > * > * @param graphPartitionerFactoryClass Determines how the graph is partitioned > */ > public final void setGraphPartitionerFactoryClass( > Class graphPartitionerFactoryClass) { > getConfiguration().setClass(GRAPH_PARTITIONER_FACTORY_CLASS, > graphPartitionerFactoryClass, > GraphPartitionerFactory.class); > } > /** > * Set the vertex resolver class (optional) > * > * @param vertexResolverClass Determines how vertex mutations are resolved > */ > public final void setVertexResolverClass(Class vertexResolverClass) { > getConfiguration().setClass(VERTEX_RESOLVER_CLASS, > vertexResolverClass, > VertexResolver.class); > } > /** > * Set the worker context class (optional) > * > * @param workerContextClass Determines what code is executed on a each > * worker before and after each superstep and computation > */ > public final void setWorkerContextClass(Class workerContextClass) { > getConfiguration().setClass(WORKER_CONTEXT_CLASS, > workerContextClass, > WorkerContext.class); > } > ...etc. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira