xufei 2 سال پیش
والد
کامیت
127d2c8ec5
1فایلهای تغییر یافته به همراه8 افزوده شده و 2 حذف شده
  1. 8 2
      src/main/java/com/winhc/max/compute/graph/job/CompanyConnectedComponents.java

+ 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);