Uploaded image for project: 'Giraph (Retired)'
  1. Giraph (Retired)
  2. GIRAPH-214

GiraphJob should have configuration split out of it to be cleaner (GiraphConf)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • None
    • 1.0.0
    • None
    • None

    Description

      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.

      Attachments

        1. GIRAPH-214-6-option1.patch
          191 kB
          Eli Reisman
        2. GIRAPH-214-5-option1.patch
          189 kB
          Eli Reisman
        3. GIRAPH-214-4.patch
          212 kB
          Eli Reisman
        4. GIRAPH-214-3.patch
          212 kB
          Eli Reisman
        5. GIRAPH-214-2.patch
          182 kB
          Eli Reisman
        6. GIRAPH-214-1.patch
          174 kB
          Eli Reisman

        Activity

          People

            initialcontext Eli Reisman
            aching Avery Ching
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: