You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -87,7 +87,7 @@ Then, create the communication edges between the tasks for the first task graph.
87
87
88
88
Finally, invoke the taskGraphBuilder to build the first task graph, get the task schedule plan and execution plan for the first task graph, and call the execute() method to execute the datapoints task graph. Once the execution is finished, the output values are retrieved in the "datapointsObject".
@@ -106,7 +106,7 @@ Finally, write the partitioned datapoints into their respective edges. The Local
106
106
partition the datapoints based on the block whereas the LocalFixedInputPartitioner partition the
107
107
datapoints based on the length of the file. For example, if the task parallelism is 4, if there are 16 data points each task will get 4 datapoints to process.
@@ -185,7 +185,7 @@ but, with one major difference of read the complete file as one partition.
185
185
186
186
Similar to the first task graph, it add the source, compute, and sink tasks to the task graph builder for the second task graph. Then, create the communication edges between the tasks for the second task graph.
187
187
188
-
```text
188
+
```java
189
189
//Add source, compute, and sink tasks to the task graph builder for the second task graph
@@ -203,7 +203,7 @@ Similar to the first task graph, it add the source, compute, and sink tasks to t
203
203
204
204
Finally, invoke the build() method to build the second task graph, get the task schedule plan and execution plan for the second task graph, and call the execute() method to execute the centroids task graph. Once the execution is finished, the output values are retrieved in the "centroidsDataObject".
@@ -289,7 +289,7 @@ At the end of every iteration, the centroid value is updated and the iteration c
289
289
290
290
First, the execute method in KMeansJobSource retrieve the partitioned data points into their respective task index values and the complete centroid values into their respective task index values.
291
291
292
-
```text
292
+
```java
293
293
@Override
294
294
publicvoid execute() {
295
295
int dim =Integer.parseInt(config.getStringValue("dim"));
@@ -302,13 +302,13 @@ First, the execute method in KMeansJobSource retrieve the partitioned data point
302
302
```
303
303
The retrieved data points and centroids are sent to the KMeansCalculator to perform the actual distance calculation using the Euclidean distance.
0 commit comments