Class DeploymentExample.ExampleTask

  • All Implemented Interfaces:
    java.io.Serializable, ComputeTask<java.lang.String,​java.lang.Object>
    Enclosing class:
    DeploymentExample

    @ComputeTaskName("ExampleTask")
    public static class DeploymentExample.ExampleTask
    extends ComputeTaskSplitAdapter<java.lang.String,​java.lang.Object>
    Example task used to demonstrate direct task deployment through API. For this example this task as available on the classpath, however in real life that may not always be the case. In those cases you should use explicit IgniteCompute.localDeployTask(Class, ClassLoader) apply and then use IgniteCompute.execute(String, Object) method passing your task name as first parameter.

    Note that this task specifies explicit task name. Task name is optional and is added here for demonstration purpose. If not provided, it will default to the task class name.

    See Also:
    Serialized Form
    • Constructor Detail

      • ExampleTask

        public ExampleTask()
    • Method Detail

      • split

        protected java.util.Collection<? extends ComputeJob> split​(int clusterSize,
                                                                   java.lang.String arg)
        Specified by:
        split in class ComputeTaskSplitAdapter<java.lang.String,​java.lang.Object>
      • reduce

        public java.lang.Object reduce​(java.util.List<ComputeJobResult> results)