mirror of
https://github.com/apache/druid.git
synced 2025-03-01 14:59:08 +00:00
add null check for task context.
make variable final
This commit is contained in:
parent
75a582974b
commit
47aac991ec
@ -215,15 +215,18 @@ public class ForkingTaskRunner implements TaskRunner, TaskLogStreamer
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Override task specific properties
|
// Override task specific properties
|
||||||
for (String propName : task.getContext().keySet()) {
|
final Map<String, Object> context = task.getContext();
|
||||||
if (propName.startsWith(CHILD_PROPERTY_PREFIX)) {
|
if (context != null) {
|
||||||
command.add(
|
for (String propName : context.keySet()) {
|
||||||
String.format(
|
if (propName.startsWith(CHILD_PROPERTY_PREFIX)) {
|
||||||
"-D%s=%s",
|
command.add(
|
||||||
propName.substring(CHILD_PROPERTY_PREFIX.length()),
|
String.format(
|
||||||
task.getContextValue(propName)
|
"-D%s=%s",
|
||||||
)
|
propName.substring(CHILD_PROPERTY_PREFIX.length()),
|
||||||
);
|
task.getContextValue(propName)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user