diff --git a/extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsStorageAuthentication.java b/extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsStorageAuthentication.java index 096875fdaf44..bb38b717e6bf 100644 --- a/extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsStorageAuthentication.java +++ b/extensions-core/hdfs-storage/src/main/java/org/apache/druid/storage/hdfs/HdfsStorageAuthentication.java @@ -48,7 +48,7 @@ public HdfsStorageAuthentication(HdfsKerberosConfig hdfsKerberosConfig, @Hdfs Co } /** - * Dose authenticate against a secured hadoop cluster + * Does authenticate against a secured hadoop cluster * In case of any bug fix make sure to fix the code in JobHelper#authenticate as well. */ @LifecycleStart diff --git a/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java b/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java index acff75381551..6b1b84d02d7a 100644 --- a/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java +++ b/indexing-hadoop/src/main/java/org/apache/druid/indexer/JobHelper.java @@ -94,7 +94,7 @@ public static Path distributedClassPath(Path base) public static final String INDEX_ZIP = "index.zip"; /** - * Dose authenticate against a secured hadoop cluster + * Does authenticate against a secured hadoop cluster * In case of any bug fix make sure to fix the code at HdfsStorageAuthentication#authenticate as well. * */ @@ -409,6 +409,9 @@ public static void maybeDeleteIntermediatePath( boolean jobSucceeded, HadoopIngestionSpec indexerSchema) { + // Ensure we are authenticated before we try to delete intermediate paths! + authenticate(); + HadoopDruidIndexerConfig config = HadoopDruidIndexerConfig.fromSpec(indexerSchema); final Configuration configuration = JobHelper.injectSystemProperties(new Configuration(), config); config.addJobProperties(configuration);