Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
*/
public class IndexingServiceModuleHelper
{
public static final String INDEXER_RUNNER_PROPERTY_PREFIX = "druid.indexer.runner";
public static void configureTaskRunnerConfigs(Binder binder)
{
JsonConfigProvider.bind(binder, "druid.indexer.runner", ForkingTaskRunnerConfig.class);
JsonConfigProvider.bind(binder, "druid.indexer.runner", RemoteTaskRunnerConfig.class);
JsonConfigProvider.bind(binder, INDEXER_RUNNER_PROPERTY_PREFIX, ForkingTaskRunnerConfig.class);
JsonConfigProvider.bind(binder, INDEXER_RUNNER_PROPERTY_PREFIX, RemoteTaskRunnerConfig.class);
JsonConfigProvider.bind(binder, "druid.zk.paths.indexer", IndexerZkConfig.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public TaskStatus call()

// Override task specific javaOpts
Object taskJavaOpts = task.getContextValue(
"druid.indexer.runner.javaOpts"
ForkingTaskRunnerConfig.JAVA_OPTS_PROPERTY
);
if (taskJavaOpts != null) {
Iterables.addAll(
Expand All @@ -187,7 +187,9 @@ public TaskStatus call()

for (String propName : props.stringPropertyNames()) {
for (String allowedPrefix : config.getAllowedPrefixes()) {
if (propName.startsWith(allowedPrefix)) {
// See https://github.com/druid-io/druid/issues/1841
if (propName.startsWith(allowedPrefix)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to add UT to catch the bug mentioned?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ForkingTaskRunner is pretty much void of unit tests. I'm trying to add some in the Tiering extension, but unless really required I'm not interested in spending the time doing UTs for something I'm trying to replace.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

&& !ForkingTaskRunnerConfig.JAVA_OPTS_PROPERTY.equals(propName)) {
command.add(
String.format(
"-D%s=%s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.Lists;
import io.druid.guice.IndexingServiceModuleHelper;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
Expand All @@ -27,6 +28,9 @@

public class ForkingTaskRunnerConfig
{
public static final String JAVA_OPTS_PROPERTY = IndexingServiceModuleHelper.INDEXER_RUNNER_PROPERTY_PREFIX
+ ".javaOpts";

@JsonProperty
@NotNull
private String javaCommand = "java";
Expand Down