Prechádzať zdrojové kódy

MAPREDUCE-7149. Javadocs for FileInputFormat and OutputFormat to mention DT collection.
Contributed by Steve Loughran.

Steve Loughran 6 rokov pred
rodič
commit
735a36afd5

+ 6 - 2
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/FileInputFormat.java

@@ -198,11 +198,15 @@ public abstract class FileInputFormat<K, V> implements InputFormat<K, V> {
     }
     }
   }
   }
   
   
-  /** List input directories.
+  /**
+   * List input directories.
    * Subclasses may override to, e.g., select only files matching a regular
    * Subclasses may override to, e.g., select only files matching a regular
    * expression. 
    * 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
    * @return array of FileStatus objects
    * @throws IOException if zero items.
    * @throws IOException if zero items.
    */
    */

+ 3 - 0
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/OutputFormat.java

@@ -71,6 +71,9 @@ public interface OutputFormat<K, V> {
    * throwing an exception when it already exists, so that output is not
    * throwing an exception when it already exists, so that output is not
    * overwritten.</p>
    * overwritten.</p>
    *
    *
+   * 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 ignored
    * @param job job configuration.
    * @param job job configuration.
    * @throws IOException when output should not be attempted
    * @throws IOException when output should not be attempted

+ 3 - 0
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<K, V> {
    * throwing an exception when it already exists, so that output is not
    * throwing an exception when it already exists, so that output is not
    * overwritten.</p>
    * overwritten.</p>
    *
    *
+   * 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
    * @param context information about the job
    * @throws IOException when output should not be attempted
    * @throws IOException when output should not be attempted
    */
    */

+ 7 - 3
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 abstract class FileInputFormat<K, V> extends InputFormat<K, V> {
         (PathFilter) ReflectionUtils.newInstance(filterClass, conf) : null;
         (PathFilter) ReflectionUtils.newInstance(filterClass, conf) : null;
   }
   }
 
 
-  /** List input directories.
+  /**
+   * List input directories.
    * Subclasses may override to, e.g., select only files matching a regular
    * Subclasses may override to, e.g., select only files matching a regular
    * expression. 
    * 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
    * @return array of FileStatus objects
    * @throws IOException if zero items.
    * @throws IOException if zero items.
    */
    */