Skip to content

Commit

Permalink
Fix peon startup with non string property value (#16612)
Browse files Browse the repository at this point in the history
  • Loading branch information
maytasm authored Jun 16, 2024
1 parent aec1d5d commit d6c7d86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,13 @@ public TaskStatus call()
if (context != null) {
for (String propName : context.keySet()) {
if (propName.startsWith(CHILD_PROPERTY_PREFIX)) {
command.addSystemProperty(
propName.substring(CHILD_PROPERTY_PREFIX.length()),
task.getContextValue(propName)
);
Object contextValue = task.getContextValue(propName);
if (contextValue != null) {
command.addSystemProperty(
propName.substring(CHILD_PROPERTY_PREFIX.length()),
String.valueOf(contextValue)
);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ public void testJavaOptsAndJavaOptsArrayOverride() throws ExecutionException, In
+ " \"firehose\" : null,\n"
+ " \"context\" : {\n"
+ " \"druid.indexer.runner.javaOptsArray\" : [ \"-Xmx10g\", \"-Xms10g\" ],\n"
+ " \"druid.indexer.fork.property.druid.processing.numThreads\" : 4,\n"
+ " \"druid.indexer.runner.javaOpts\" : \"-Xmx1g -Xms1g\"\n"
+ " }\n"
+ "}";
Expand Down

0 comments on commit d6c7d86

Please sign in to comment.