zhengchenyu opened a new issue, #993: URL: https://github.com/apache/incubator-uniffle/issues/993
### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) ### Search before asking - [X] I have searched in the [issues](https://github.com/apache/incubator-uniffle/issues?q=is%3Aissue) and found no similar issues. ### What would you like to be improved? For now, we obtain the application attempt id from environment variable CONTAINER_ID. But CONTAINER_ID is not set in tez local mode. Then tez local mode will throw error like this: ``` 2023-07-04 17:40:12,034 INFO HistoryEventHandler.criticalEvents: [HISTORY][DAG:dag_1688463608398_0001_1][Event:TASK_ATTEMPT_FINISHED]: vertexName=Tokenizer, taskAttemptId=attempt_1688463608398_0001_1_00_000001_0, creationTime=1688463611329, allocationTime=1688463611918, startTime=1688463612008, finishTime=1688463612034, timeTaken=26, status=FAILED, taskFailureType=NON_FATAL, errorEnum=FRAMEWORK_ERROR, diagnostics=Error: Error while running task ( failure ) : attempt_1688463608398_0001_1_00_000001_0:java.lang.NullPointerException at org.apache.hadoop.yarn.api.records.ContainerId.fromString(ContainerId.java:190) at org.apache.hadoop.yarn.util.ConverterUtils.toContainerId(ConverterUtils.java:140) at org.apache.tez.runtime.library.common.sort.impl.RssSorter.<init>(RssSorter.java:123) at org.apache.tez.runtime.library.output.RssOrderedPartitionedKVOutput.start(RssOrderedPartitionedKVOutput.java:201) at org.apache.tez.runtime.library.processor.SimpleProcessor.preOp(SimpleProcessor.java:87) at org.apache.tez.runtime.library.processor.SimpleProcessor.run(SimpleProcessor.java:60) at org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374) at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73) at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730) at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61) at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37) at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36) at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125) at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57) at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) ``` In fact, we can obtain application attempt id by below way, this way is effective for tez local mode and yarn mode. ``` ApplicationAttemptId.newInstance(getContext().getApplicationId(), getContext().getDAGAttemptNumber()); ``` ### How should we improve? _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! -- 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: dev-unsubscr...@uniffle.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org