Package com.intel.hadoop.graphbuilder.util

Examples of com.intel.hadoop.graphbuilder.util.Timer


    String rawgraph = output + "/graph_raw";
    String normedgraph = output + "/graph_norm";
    String partitionedgraph = output + "/graph_partitioned";

    Timer timer = new Timer();
    timer.start();
    try {
      new CreateLinkGraph().main(new String[] { rawinput, rawgraph });
      LOG.info("Create graph finished in : " + timer.time_since_last()
        + " seconds");
    } catch (Exception e) {
      e.printStackTrace();
      return;
    }

    try {
    new NormalizeGraphIds().main(new String[] { rawgraph, normedgraph });
    LOG.info("Normalize graph finished in : " + timer.time_since_last()
        + " seconds");
    } catch (Exception e) {
      e.printStackTrace();
      return;
    }

    try {
    new PartitionGraph().main(new String[] { String.valueOf(npart),
        normedgraph, partitionedgraph });
    LOG.info("Partition graph finished in : " + timer.time_since_last()
        + " seconds");
    } catch (Exception e) {
      e.printStackTrace();
      return;
    }

    LOG.info("Total flow time : " + timer.current_time() + " seconds");
  }
View Full Code Here


    String rawgraph = output + "/graph_raw";
    String tfidfgraph = output + "/graph_tfidf";
    String normedgraph = output + "/graph_norm";
    String partitionedgraph = output + "/graph_partitioned";

    Timer timer = new Timer();
    timer.start();


    try {
    if (args.length > 3) {
      String dict = args[3];
      new CreateWordCountGraph()
          .main(new String[] { rawinput, rawgraph, dict });
    } else {
      new CreateWordCountGraph().main(new String[] { rawinput, rawgraph });
    }

    LOG.info("Create graph finished in : " + timer.time_since_last()
        + " seconds");


    } catch (Exception e) {
      e.printStackTrace();
      return;
    }

    try {
      new TransformToTFIDF().main(new String[] { String.valueOf(30000), rawgraph,
          tfidfgraph });
      LOG.info("Transform TFIDF finished in : " + timer.time_since_last()
        + " seconds");
    } catch (Exception e) {
      e.printStackTrace();
      return;
    }

    try {
    new NormalizeGraphIds().main(new String[] { tfidfgraph, normedgraph });

    LOG.info("Normalize graph finished in : " + timer.time_since_last()
        + " seconds");
    } catch (Exception e) {
      e.printStackTrace();
      return;
    }

    try {
      new PartitionGraph().main(new String[] { String.valueOf(npart),
        normedgraph, partitionedgraph });

      LOG.info("Partition graph finished in : " + timer.time_since_last()
        + " seconds");
    } catch (Exception e) {
      e.printStackTrace();
      return;
    }

    LOG.info("Total flow time : " + timer.current_time() + " seconds");
  }
View Full Code Here

TOP

Related Classes of com.intel.hadoop.graphbuilder.util.Timer

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.