Skip to content

Commit

Permalink
add comment for default hadoop coordinates (apache#3257)
Browse files Browse the repository at this point in the history
1) Modify CliHadoopIndexer to share constant from `TaskConfig.DEFAULT_DEFAULT_HADOOP_COORDINATES`
2) add comment to pom.xml as discussed in
apache#3044

fix name
  • Loading branch information
nishantmonu51 authored and jon-wei committed Jul 18, 2016
1 parent a9a73c5 commit 47894c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<jackson.version>2.4.6</jackson.version>
<log4j.version>2.5</log4j.version>
<slf4j.version>1.7.12</slf4j.version>
<!-- If compiling with different hadoop version also modify default hadoop coordinates in TaskConfig.java -->
<hadoop.compile.version>2.3.0</hadoop.compile.version>
</properties>

Expand Down
7 changes: 4 additions & 3 deletions services/src/main/java/io/druid/cli/CliHadoopIndexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import io.airlift.airline.Command;
import io.airlift.airline.Option;
import io.druid.guice.ExtensionsConfig;
import io.druid.indexing.common.config.TaskConfig;
import io.druid.initialization.Initialization;

import java.io.File;
Expand All @@ -45,7 +46,7 @@
public class CliHadoopIndexer implements Runnable
{

private static final String DEFAULT_HADOOP_COORDINATES = "org.apache.hadoop:hadoop-client:2.3.0";
private static final List<String> DEFAULT_HADOOP_COORDINATES = TaskConfig.DEFAULT_DEFAULT_HADOOP_COORDINATES;

private static final Logger log = new Logger(CliHadoopIndexer.class);

Expand All @@ -57,7 +58,7 @@ public class CliHadoopIndexer implements Runnable
private List<String> coordinates;

@Option(name = "--no-default-hadoop",
description = "don't pull down the default hadoop version (currently " + DEFAULT_HADOOP_COORDINATES + ")",
description = "don't pull down the default hadoop version",
required = false)
public boolean noDefaultHadoop;

Expand All @@ -74,7 +75,7 @@ public void run()
allCoordinates.addAll(coordinates);
}
if (!noDefaultHadoop) {
allCoordinates.add(DEFAULT_HADOOP_COORDINATES);
allCoordinates.addAll(DEFAULT_HADOOP_COORDINATES);
}

final List<URL> extensionURLs = Lists.newArrayList();
Expand Down

0 comments on commit 47894c4

Please sign in to comment.