valepakh commented on code in PR #4260:
URL: https://github.com/apache/ignite-3/pull/4260#discussion_r1734795095
##########
modules/api/src/main/java/org/apache/ignite/compute/TaskDescriptor.java:
##########
@@ -56,6 +65,19 @@ public List<DeploymentUnit> units() {
return units;
}
+ /**
+ * Marshaller for split job argument.
+ *
+ * @return Marshaller for split job argument.
+ */
+ public Marshaller<T, byte[]> splitJobArgumentMarshaller() {
+ return splitJobArgumentMarshaller;
+ }
+
Review Comment:
```suggestion
/**
* Marshaller for reduce job result.
*
* @return Marshaller for reduce job result.
*/
```
##########
modules/api/src/main/java/org/apache/ignite/compute/TaskDescriptor.java:
##########
@@ -113,6 +137,21 @@ public Builder<T, R> units(DeploymentUnit... units) {
return this;
}
+ /**
+ * Sets the marshaller for split job argument.
+ *
+ * @param splitJobArgumentMarshaller Marshaller for split job argument.
+ * @return This builder.
+ */
+ public Builder<T, R> splitJobArgumentMarshaller(Marshaller<T, byte[]>
splitJobArgumentMarshaller) {
+ this.splitJobArgumentMarshaller = splitJobArgumentMarshaller;
+ return this;
+ }
+
Review Comment:
```suggestion
/**
* Sets the marshaller for reduce job result.
*
* @param reduceJobResultMarshaller Marshaller for reduce job result.
* @return This builder.
*/
```
##########
modules/api/src/main/java/org/apache/ignite/compute/task/MapReduceTask.java:
##########
@@ -53,4 +54,14 @@ public interface MapReduceTask<I, M, T, R> {
* @return Final task result future.
*/
CompletableFuture<R> reduceAsync(TaskExecutionContext taskContext,
Map<UUID, T> results);
+
+ /** The marshaller that is called to unmarshal split job argument if not
null. */
+ default @Nullable Marshaller<I, byte[]> splitJobInputMarshaller() {
+ return null;
+ }
+
+ /** The marshaller that is called to marshal split job argument if not
null. */
Review Comment:
```suggestion
/** The marshaller that is called to marshal reduce job result if not
null. */
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]