This is doable in Giraph, you can use as many vertex or edge input formats as you like (via GIRAPH-639). You just need to choose MultiVertexInputFormat and/or MultiEdgeInputFromat

See VertexInputFormatDescription for vertex input formats

  /**
* VertexInputFormats description - JSON array containing a JSON array for * each vertex input. Vertex input JSON arrays contain one or two elements - * first one is the name of vertex input class, and second one is JSON object
   * with all specific parameters for this vertex input. For example:
   * [["VIF1",{"p":"v1"}],["VIF2",{"p":"v2","q":"v"}]]
   */
  public static final StrConfOption VERTEX_INPUT_FORMAT_DESCRIPTIONS =
      new StrConfOption("giraph.multiVertexInput.descriptions", null,
"VertexInputFormats description - JSON array containing a JSON " + "array for each vertex input. Vertex input JSON arrays contain " +
          "one or two elements - first one is the name of vertex input " +
"class, and second one is JSON object with all specific parameters " + "for this vertex input. For example: [[\"VIF1\",{\"p\":\"v1\"}]," +
          "[\"VIF2\",{\"p\":\"v2\",\"q\":\"v\"}]]\"");

See EdgeInputFormatDescription for edge input formats

  /**
   * EdgeInputFormats description - JSON array containing a JSON array for
   * each edge input. Edge input JSON arrays contain one or two elements -
* first one is the name of edge input class, and second one is JSON object
   * with all specific parameters for this edge input. For example:
   * [["EIF1",{"p":"v1"}],["EIF2",{"p":"v2","q":"v"}]]
   */
  public static final StrConfOption EDGE_INPUT_FORMAT_DESCRIPTIONS =
      new StrConfOption("giraph.multiEdgeInput.descriptions", null,
"EdgeInputFormats description - JSON array containing a JSON array " + "for each edge input. Edge input JSON arrays contain one or two " + "elements - first one is the name of edge input class, and second " + "one is JSON object with all specific parameters for this edge " +
          "input. For example: [[\"EIF1\",{\"p\":\"v1\"}]," +
          "[\"EIF2\",{\"p\":\"v2\",\"q\":\"v\"}]]");

Hope that helps,

Avery

On 8/16/13 8:45 AM, Yasser Altowim wrote:

Guys, any help with this will be appreciated. Thanks.

*From:*Yasser Altowim [mailto:[email protected]]
*Sent:* Thursday, August 15, 2013 2:07 PM
*To:* [email protected]
*Subject:* MultiVertexInputFormat

Hi,

I am implementing an algorithm using Giraph. My algorithm needs to read input data from two files, each has its own format. My questions are:

1.How can I use the MultiVertexInputFormat class? Is there any example that shows how this class can be used?

2.How can I specify this class when running my job using the Giraph Runner or using a driver class?

Thanks in advance.

*Best,*

*Yasser*


Reply via email to