Class GiraphConfiguration

  • All Implemented Interfaces:
    Iterable<Map.Entry<String,​String>>, GiraphConstants, org.apache.hadoop.io.Writable
    Direct Known Subclasses:
    ImmutableClassesGiraphConfiguration

    public class GiraphConfiguration
    extends org.apache.hadoop.conf.Configuration
    implements GiraphConstants
    Adds user methods specific to Giraph. This will be put into an ImmutableClassesGiraphConfiguration that provides the configuration plus the immutable classes.

    Keeps track of parameters which were set so it easily set them in another copy of configuration.

    • Constructor Detail

      • GiraphConfiguration

        public GiraphConfiguration()
        Constructor that creates the configuration
      • GiraphConfiguration

        public GiraphConfiguration​(org.apache.hadoop.conf.Configuration conf)
        Constructor.
        Parameters:
        conf - Configuration
    • Method Detail

      • setWorkerContextClass

        public final void setWorkerContextClass​(Class<? extends WorkerContext> workerContextClass)
        Set the worker context class (optional)
        Parameters:
        workerContextClass - Determines what code is executed on a each worker before and after each superstep and computation
      • getComputationClass

        public Class<? extends org.apache.giraph.graph.Computation> getComputationClass()
        Get the user's subclassed Computation
        Returns:
        User's computation class
      • setComputationClass

        public final void setComputationClass​(Class<? extends AbstractComputation> appClass)
        Set the computation class(user app).
        Parameters:
        appClass - User specified computation class.
      • getVertexInputFormatClass

        public final Class<? extends org.apache.giraph.io.VertexInputFormat> getVertexInputFormatClass()
        get vertex input class.
      • setVertexInputFormatClass

        public final void setVertexInputFormatClass​(Class<? extends org.apache.giraph.io.VertexInputFormat> vertexInputFormatClass)
        Set vertex input class.
        Parameters:
        vertexInputFormatClass - User specified computation class.
      • setEdgeInputFormatClass

        public final void setEdgeInputFormatClass​(Class<? extends org.apache.giraph.io.EdgeInputFormat> edgeInputFormatClass)
        Set vertex input class.
        Parameters:
        edgeInputFormatClass - User specified computation class.
      • hasVertexOutputFormat

        public boolean hasVertexOutputFormat()
        Does the job have a VertexOutputFormat?
        Returns:
        True iff a VertexOutputFormat has been specified.
      • setVertexOutputFormatClass

        public final void setVertexOutputFormatClass​(Class<? extends org.apache.giraph.io.VertexOutputFormat> vertexOutputFormatClass)
      • setMessageCombinerClass

        public void setMessageCombinerClass​(Class<? extends org.apache.giraph.combiner.MessageCombiner> messageCombinerClass)
        Set the message combiner class (optional)
        Parameters:
        messageCombinerClass - Determines how vertex messages are combined
      • setMasterComputeClass

        public final void setMasterComputeClass​(Class<? extends MasterCompute> masterComputeClass)
        Set the master class (optional)
        Parameters:
        masterComputeClass - Runs master computation
      • hasVertexOutputFormatSubdir

        public boolean hasVertexOutputFormatSubdir()
        Does the job have a VertexOutputFormat subdir?
        Returns:
        True iff a VertexOutputFormat subdir has been specified.
      • setVertexOutputFormatSubdir

        public final void setVertexOutputFormatSubdir​(String path)
        Set the vertex output format path
        Parameters:
        path - path where the vertices will be written
      • setVertexOutputPath

        public final void setVertexOutputPath​(String path)
        The the path where we output.
        Parameters:
        path - output path.
      • getNettyAllocator

        public io.netty.buffer.ByteBufAllocator getNettyAllocator()
        Used by netty client and server to create ByteBufAllocator
        Returns:
        ByteBufAllocator
      • getNettyServerExecutionThreads

        public int getNettyServerExecutionThreads()
      • getMessagerInitServerPort

        public int getMessagerInitServerPort()
        Get the init port for message manager(Netty base).
        Returns:
        port
      • getAggregatorServerInitPort

        public int getAggregatorServerInitPort()
        Get the initial port for netty server used in aggregator
        Returns:
        port
      • getEdgeManager

        public String getEdgeManager()
      • setEdgeManager

        public void setEdgeManager​(String edgeManager)
      • usePrimitiveMessageStore

        public boolean usePrimitiveMessageStore()
      • setUsePrimitiveMessageStore

        public void setUsePrimitiveMessageStore​(boolean value)