You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Denis Mekhanikov (Jira)" <ji...@apache.org> on 2020/09/25 15:05:00 UTC

[jira] [Created] (IGNITE-13487) Decrease logging level for exceptions throws from compute engine

Denis Mekhanikov created IGNITE-13487:
-----------------------------------------

             Summary: Decrease logging level for exceptions throws from compute engine
                 Key: IGNITE-13487
                 URL: https://issues.apache.org/jira/browse/IGNITE-13487
             Project: Ignite
          Issue Type: Improvement
            Reporter: Denis Mekhanikov
            Assignee: Denis Mekhanikov


When a compute job fails during execution, it leads to two error messages printed on different nodes:

1. {{Failed to execute job}} on the map node.
 2. {{Failed to obtain remote job result policy for result from ComputeTask.result(..) method (will fail the whole task)}} on the reduce node.

Also an exception is thrown from the {{execute()}} method that triggered this task.

It seems that none of these errors should actually be shown to users. This information should be printed only if debug logging is enabled for the corresponding packages.

The issue can be reproduced by running the following example:
{code:java}
public class ComputeException {
    public static void main(String[] args) {
        new ComputeException().run();
    }

    void run() {
        IgniteConfiguration igniteCfg = Ignition.loadSpringBean("config/ignite.xml", "ignite.cfg");
        igniteCfg.setClientMode(true);

        try (Ignite ignite = Ignition.start(igniteCfg)) {
            ignite.compute(ignite.cluster().forServers()).execute(new ErroneousTask(), null);
        }
    }

    public static class ErroneousTask extends ComputeTaskAdapter<Object, Object> {
        @Override public @NotNull Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> list,
            @Nullable Object o) throws IgniteException {
            LinkedHashMap<ErroneousJob, ClusterNode> map = new LinkedHashMap<>();
            for (ClusterNode node : list)
                map.put(new ErroneousJob(), node);

            return map;
        }

        @Override public @Nullable Object reduce(List<ComputeJobResult> list) throws IgniteException {
            return null;
        }
    }

    public static class ErroneousJob extends ComputeJobAdapter {
        @Override public Object execute() throws IgniteException {
            throw new IgniteException("I failed. Sorry :(");
        }
    }
}
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)