Search before asking
Linkis Component
Description
When SR (Script) tasks are retried, the init_sql loading process causes an exception due to null pointer exception when accessing the EngineTypeLabel. The method adjustErrorIndexForSetScenarios uses find().get which throws NoSuchElementException when the label is not present.
Steps to reproduce
- Execute an SR task with init_sql configuration
- Trigger a task retry scenario
- The system throws an exception when trying to access EngineTypeLabel
Expected behavior
The system should handle the case when EngineTypeLabel is not present gracefully and continue execution without throwing exceptions.
Your environment
- Linkis version used: 1.18.0
- Environment name and version:
- hadoop-3.3.4
- hive-2.3.3
- spark-2.4.3/3.3.0
- scala-2.11.12/2.12.17
- jdk 1.8.0_xxx
Anything else
The fix uses collectFirst instead of find().get to safely handle the case when EngineTypeLabel is not present, and adds null check for executionCode.
Are you willing to submit a PR?
Search before asking
Linkis Component
Description
When SR (Script) tasks are retried, the init_sql loading process causes an exception due to null pointer exception when accessing the EngineTypeLabel. The method
adjustErrorIndexForSetScenariosusesfind().getwhich throws NoSuchElementException when the label is not present.Steps to reproduce
Expected behavior
The system should handle the case when EngineTypeLabel is not present gracefully and continue execution without throwing exceptions.
Your environment
Anything else
The fix uses
collectFirstinstead offind().getto safely handle the case when EngineTypeLabel is not present, and adds null check for executionCode.Are you willing to submit a PR?