Skip to content
Permalink
Browse files
Add authentication call before cleaning up intermediate files in hado…
…op ingestions (#12030)

* Add authentication call before cleaning up intermediate files in hadoop ingestions

* fix checkstyle

* remove debug log
  • Loading branch information
capistrant committed May 2, 2022
1 parent dd8781f commit 39e7191f03b41580d95b28713a6f0e2cd9df52a1
Showing 2 changed files with 5 additions and 2 deletions.
@@ -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
@@ -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);

0 comments on commit 39e7191

Please sign in to comment.