diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/FileInputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/FileInputFormat.java index fe43991a0e..afdc0ca400 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/FileInputFormat.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/FileInputFormat.java @@ -198,11 +198,15 @@ protected void addInputPathRecursively(List result, } } - /** List input directories. + /** + * List input directories. * Subclasses may override to, e.g., select only files matching a regular * expression. * - * @param job the job to list input paths for + * If security is enabled, this method collects + * delegation tokens from the input paths and adds them to the job's + * credentials. + * @param job the job to list input paths for and attach tokens to. * @return array of FileStatus objects * @throws IOException if zero items. */ diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/OutputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/OutputFormat.java index 6ea6a71afb..adfda0bac1 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/OutputFormat.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/OutputFormat.java @@ -71,6 +71,9 @@ RecordWriter getRecordWriter(FileSystem ignored, JobConf job, * throwing an exception when it already exists, so that output is not * overwritten.

* + * Implementations which write to filesystems which support delegation + * tokens usually collect the tokens for the destination path(s) + * and attach them to the job configuration. * @param ignored * @param job job configuration. * @throws IOException when output should not be attempted diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/OutputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/OutputFormat.java index 6f9e52549e..901d5ee6e0 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/OutputFormat.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/OutputFormat.java @@ -66,6 +66,9 @@ public abstract class OutputFormat { * throwing an exception when it already exists, so that output is not * overwritten.

* + * Implementations which write to filesystems which support delegation + * tokens usually collect the tokens for the destination path(s) + * and attach them to the job context's JobConf. * @param context information about the job * @throws IOException when output should not be attempted */ diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/FileInputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/FileInputFormat.java index e2d8e6fa7c..e2658caabe 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/FileInputFormat.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/FileInputFormat.java @@ -233,11 +233,15 @@ public static PathFilter getInputPathFilter(JobContext context) { (PathFilter) ReflectionUtils.newInstance(filterClass, conf) : null; } - /** List input directories. + /** + * List input directories. * Subclasses may override to, e.g., select only files matching a regular * expression. - * - * @param job the job to list input paths for + * + * If security is enabled, this method collects + * delegation tokens from the input paths and adds them to the job's + * credentials. + * @param job the job to list input paths for and attach tokens to. * @return array of FileStatus objects * @throws IOException if zero items. */