xufei 2 år sedan
förälder
incheckning
127d2c8ec5

+ 8 - 2
src/main/java/com/winhc/max/compute/graph/job/CompanyConnectedComponents.java

@@ -112,11 +112,17 @@ public class CompanyConnectedComponents {
 
 
     public static void main(String[] args) throws IOException {
-        if (args.length < 2) {
-            System.out.println("Usage: <input> <output>");
+        if (args.length < 4) {
+            System.out.println("Usage: <input> <output> <worker> <cu>");
             System.exit(-1);
         }
+        Integer worker = Integer.parseInt(args[2]);
+        Integer cu = Integer.parseInt(args[3]);
         GraphJob job = new GraphJob();
+//        job.setNumWorkers(50);
+//        job.setWorkerCPU(100);
+        job.setNumWorkers(worker);
+        job.setWorkerCPU(cu);
         job.setGraphLoaderClass(CCVertexReader.class);
         job.setVertexClass(CCVertex.class);
         job.setCombinerClass(MinLongCombiner.class);