Tiago Marques Godinho created IGNITE-27686:
----------------------------------------------

             Summary: Misleading error message in compute job execution
                 Key: IGNITE-27686
                 URL: https://issues.apache.org/jira/browse/IGNITE-27686
             Project: Ignite
          Issue Type: Improvement
          Components: compute ai3
            Reporter: Tiago Marques Godinho


Got the following exception: "Marshaller should be defined on the client"

 
{code:java}
Marshaller should be defined on the client
org.apache.ignite.compute.ComputeException: IGN-COMPUTE-13 Marshaller should be 
defined on the client TraceId:b0adc15f
        at 
org.apache.ignite.internal.compute.SharedComputeUtils.unmarshalArgOrResult(SharedComputeUtils.java:206)
        at 
org.apache.ignite.internal.compute.ComputeUtils.unmarshalOrNotIfNull(ComputeUtils.java:383)
        at 
org.apache.ignite.internal.compute.executor.ComputeExecutorImpl.lambda$unmarshalExecMarshal$3(ComputeExecutorImpl.java:231)
        at 
org.apache.ignite.internal.compute.executor.ComputeExecutorImpl.lambda$addObservableTimestamp$1(ComputeExecutorImpl.java:158)
        at 
org.gridgain.internal.security.context.SecuredCallable.call(SecuredCallable.java:35)
        at 
org.apache.ignite.internal.compute.queue.QueueExecutionImpl.lambda$run$0(QueueExecutionImpl.java:182)
        at 
org.apache.ignite.internal.compute.queue.QueueEntry.run(QueueEntry.java:73)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
 {code}
When executing the compute job with:

 

 
{code:java}
String r = ign.compute().execute(
        JobTarget.node(ign.cluster().localNode()),
        JobDescriptor.builder(BootstrapJob.class)
                .argumentMarshaller(ByteArrayMarshaller.create())
                .build(),
        new BootstapJobArgs("", new String[] {
                "compute-jobs", VERSION.render()
        })
); {code}
The message is misleading as it points to the client, but the actual problem is 
in the compute job definition (class). It does not override the marshallers 
with:
{code:java}
@Override
@Nullable
public  Marshaller<BootstapJobArgs, byte[]> inputMarshaller() {
    return ByteArrayMarshaller.create();
} {code}
*What to do:*
 * Improve the exception so that it's clear that the error happens because no 
marshaller is defined in the compute job class.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to