This is an automated email from the ASF dual-hosted git repository.

capistrant pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 39e7191f03 Add authentication call before cleaning up intermediate 
files in hadoop ingestions (#12030)
39e7191f03 is described below

commit 39e7191f03b41580d95b28713a6f0e2cd9df52a1
Author: Lucas Capistrant <[email protected]>
AuthorDate: Mon May 2 08:40:44 2022 -0500

    Add authentication call before cleaning up intermediate files in hadoop 
ingestions (#12030)
    
    * Add authentication call before cleaning up intermediate files in hadoop 
ingestions
    
    * fix checkstyle
    
    * remove debug log
---
 .../org/apache/druid/storage/hdfs/HdfsStorageAuthentication.java     | 2 +-
 .../src/main/java/org/apache/druid/indexer/JobHelper.java            | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

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 096875fdaf..bb38b717e6 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 class HdfsStorageAuthentication
   }
 
   /**
-   * 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 acff753815..6b1b84d02d 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 class JobHelper
   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 class JobHelper
       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);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to