Examples of VertexInputFormatDescription


Examples of org.apache.giraph.io.formats.multi.VertexInputFormatDescription

   * @param partitionFilter Partition filter, or null if no filter used
   * @param additionalOptions Additional options, in the form "option=value"
   */
  public void addVertexInput(Class<? extends HiveToVertex> hiveToVertexClass,
      String tableName, String partitionFilter, String ... additionalOptions) {
    VertexInputFormatDescription description =
        new VertexInputFormatDescription(HiveVertexInputFormat.class);
    description.addParameter(
        HIVE_VERTEX_INPUT.getClassOpt().getKey(), hiveToVertexClass.getName());
    description.addParameter(HIVE_VERTEX_INPUT.getProfileIdOpt().getKey(),
        "vertex_input_profile_" + vertexInputDescriptions.size());
    description.addParameter(
        HIVE_VERTEX_INPUT.getTableOpt().getKey(), tableName);
    if (partitionFilter != null && !partitionFilter.isEmpty()) {
      description.addParameter(
          HIVE_VERTEX_INPUT.getPartitionOpt().getKey(), partitionFilter);
    }
    addAdditionalOptions(description, additionalOptions);
    vertexInputDescriptions.add(description);
  }
View Full Code Here

Examples of org.apache.giraph.io.formats.multi.VertexInputFormatDescription

      // parameters
      for (int i = 0; i < vertexInputDescriptions.size(); i++) {
        // Create a copy of the Configuration in order not to mess up the
        // original one
        Configuration confCopy = new Configuration(conf);
        final VertexInputFormatDescription vertexInputDescription =
            vertexInputDescriptions.get(i);
        GiraphConstants.VERTEX_INPUT_FORMAT_CLASS.set(confCopy,
            vertexInputDescription.getInputFormatClass());
        vertexInputDescription.putParametersToConfiguration(confCopy);
        // Create VertexInputFormat in order to initialize its description with
        // data from metastore, and check it
        createGiraphConf(confCopy, vertexInputDescription)
            .createWrappedVertexInputFormat().checkInputSpecs(confCopy);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.