Package com.intel.hadoop.graphbuilder.parser

Examples of com.intel.hadoop.graphbuilder.parser.BasicGraphParser


*
* @author Haijie Gu
*/
public class HashIdMapReduceTest {
  public static void main(String[] args) throws IOException {
    HashIdMR driver = new HashIdMR(new BasicGraphParser(), new StringParser(),
        new EmptyParser());
    driver.run(args[0], args[1]);
  }
View Full Code Here


*
* @author Haijie Gu
*/
public class TransEdgeMapReduceTest {
  public static void main(String[] args) throws IOException {
    TransEdgeMR driver = new TransEdgeMR(32, args[0], new BasicGraphParser(),
        new StringParser(), new EmptyParser());
    driver.run(args[1], args[2]);
  }
View Full Code Here

  }

  public void testGoogleGraph() throws Exception {
    String path = "testgraphs/google/web-Google.txt";
    Graph<IntType, EmptyType, EmptyType> myGraph = new GLGraph<IntType, EmptyType, EmptyType>();
    GraphParser graphparser = new BasicGraphParser();
    FieldParser vidparser = new IntParser();
    FieldParser dataparser = new EmptyParser();

    try {
      BufferedReader br = new BufferedReader(new FileReader(path));
      int numEdges = 0;

      String line = br.readLine();
      while (line != null) {
        if (graphparser.isEdgeData(line)) {
          Edge<IntType, EmptyType> e = graphparser.parseEdge(line, vidparser,
              dataparser);
          myGraph.addEdge(e.source(), e.target(), e.EdgeData());
          numEdges++;
        }
        line = br.readLine();
View Full Code Here

*
* @author Haijie Gu
*/
public class SortEdgeMapReduceTest {
  public static void main(String[] args) throws IOException {
    SortEdgeMR driver = new SortEdgeMR(32, new BasicGraphParser(),
        new StringParser(), new EmptyParser());
    driver.run(args[0], args[1]);
  }
View Full Code Here

TOP

Related Classes of com.intel.hadoop.graphbuilder.parser.BasicGraphParser

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.