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 @@ -97,9 +97,8 @@ public static Path distributedClassPath(Path base)
* Dose authenticate against a secured hadoop cluster
* In case of any bug fix make sure to fix the code at HdfsStorageAuthentication#authenticate as well.
*
* @param config containing the principal name and keytab path.
*/
public static void authenticate(HadoopDruidIndexerConfig config)
public static void authenticate()
{
String principal = HadoopDruidIndexerConfig.HADOOP_KERBEROS_CONFIG.getPrincipal();
String keytab = HadoopDruidIndexerConfig.HADOOP_KERBEROS_CONFIG.getKeytab();
Expand Down Expand Up @@ -348,7 +347,7 @@ public static Configuration injectSystemProperties(Configuration conf, HadoopDru

public static void ensurePaths(HadoopDruidIndexerConfig config)
{
authenticate(config);
authenticate();
// config.addInputPaths() can have side-effects ( boo! :( ), so this stuff needs to be done before anything else
try {
Job job = Job.getInstance(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.druid.indexer.HadoopDruidIndexerJob;
import org.apache.druid.indexer.HadoopIngestionSpec;
import org.apache.druid.indexer.IngestionState;
import org.apache.druid.indexer.JobHelper;
import org.apache.druid.indexer.MetadataStorageUpdaterJobHandler;
import org.apache.druid.indexer.TaskMetricsGetter;
import org.apache.druid.indexer.TaskMetricsUtils;
Expand Down Expand Up @@ -765,6 +766,8 @@ public String[] runTask(String[] args) throws Exception
}

if (jobId != null) {
// This call to JobHelper#authenticate will be transparent if already authenticated or using inseucre Hadoop.
JobHelper.authenticate();
int res = ToolRunner.run(new JobClient(), new String[]{
"-kill",
jobId
Expand Down