Package org.apache.giraph.io.formats.multi

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


   * @param partitionFilter Partition filter, or null if no filter used
   * @param additionalOptions Additional options, in the form "option=value"
   */
  public void addEdgeInput(Class<? extends HiveToEdge> hiveToEdgeClass,
      String tableName, String partitionFilter, String ... additionalOptions) {
    EdgeInputFormatDescription description =
        new EdgeInputFormatDescription(HiveEdgeInputFormat.class);
    description.addParameter(
        HIVE_EDGE_INPUT.getClassOpt().getKey(), hiveToEdgeClass.getName());
    description.addParameter(HIVE_EDGE_INPUT.getProfileIdOpt().getKey(),
        "edge_input_profile_" + edgeInputDescriptions.size());
    description.addParameter(
        HIVE_EDGE_INPUT.getTableOpt().getKey(), tableName);
    if (partitionFilter != null && !partitionFilter.isEmpty()) {
      description.addParameter(
          HIVE_EDGE_INPUT.getPartitionOpt().getKey(), partitionFilter);
    }
    addAdditionalOptions(description, additionalOptions);
    edgeInputDescriptions.add(description);
  }
View Full Code Here


      // parameters
      for (int i = 0; i < edgeInputDescriptions.size(); i++) {
        // Create a copy of the Configuration in order not to mess up the
        // original one
        Configuration confCopy = new Configuration(conf);
        final EdgeInputFormatDescription edgeInputDescription =
            edgeInputDescriptions.get(i);
        GiraphConstants.EDGE_INPUT_FORMAT_CLASS.set(confCopy,
            edgeInputDescription.getInputFormatClass());
        edgeInputDescription.putParametersToConfiguration(confCopy);
        // Create EdgeInputFormat in order to initialize its description with
        // data from metastore, and check it
        createGiraphConf(confCopy, edgeInputDescription)
            .createWrappedEdgeInputFormat().checkInputSpecs(confCopy);
      }
View Full Code Here

TOP

Related Classes of org.apache.giraph.io.formats.multi.EdgeInputFormatDescription

Copyright © 2018 www.massapicom. 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.