You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Arun C Murthy (JIRA)" <ji...@apache.org> on 2009/10/25 08:03:59 UTC

[jira] Commented: (MAPREDUCE-1154) Large-scale, automated test framwork for Map-Reduce

    [ https://issues.apache.org/jira/browse/MAPREDUCE-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769759#action_12769759 ] 

Arun C Murthy commented on MAPREDUCE-1154:
------------------------------------------

Some Map-Reduce specific functionality to provide a flavour for the proposal:

{noformat}
  /**
   * Daemon/job artifacts.
   */
  public enum Artifact {
    LOGS,
    OUTPUTS
  }

  /**
   * Get tasktrackers on the given rack.
   * @param cluster map-reduce <code>Cluster</code>
   * @param rackId rack
   * @return tasktrackers on the given rack
   * @throws IOException
   * @throws InterruptedException
   */
  public static List<TaskTracker> getTaskTrackersOnRack(Cluster cluster, 
                                                        String rackId)
  throws IOException, InterruptedException;
  
  /**
   * Get tasks running on the given tasktracker.
   * @param cluster map-reduce <code>Cluster</code>
   * @param taskTracker task-tracker
   * @return tasks running on the given tasktracker
   * @throws IOException
   * @throws InterruptedException
   */
  public static List<TaskAttemptID> 
  getTasksRunningOnTaskTracker(Cluster cluster, TaskTracker taskTracker)
  throws IOException, InterruptedException;
  
  /**
   * Get tasktracker on the given host.
   * @param cluster map-reduce <code>Cluster</code>
   * @param hostName host
   * @return tasktracker on the given host
   * @throws IOException
   * @throws InterruptedException
   */
  public static TaskTracker getTaskTracker(Cluster cluster, String hostName) 
  throws IOException, InterruptedException;
  
  /**
   * Get tasktrackers on which tasks of the given job executed.
   * @param job map-reduce <code>Job</code>
   * @param taskAttemptIDs optional list of task-attempts whose tasktrackers
   *                       need to be fetched
   * @return tasktrackers on which tasks of the given job executed, optionally
   *                      for a specific set of task-attempts
   * @throws IOException
   * @throws InterruptedException
   */
  public static List<TaskTracker> 
  getTaskTrackersForJob(Job job, TaskAttemptID ... taskAttemptIDs) 
    throws IOException, InterruptedException;
  
  /**
   * Fetch artifacts of a given job (optionally a specific set of task-attempts of
   * the job).
   * @param job job whose logs are to be fetched
   * @param type artifact type
   * @param dir directory to place the fetched logs
   * @param taskAttemptIDs optional list of task-attempts of the job
   * @throws IOException
   */
  public static void fetchJobArtifacts(Job job, 
                                       Artifact type, Path dir, 
                                       TaskAttemptID ... taskAttemptIDs) 
  throws IOException;
  
  /**
   * Fetch job artifacts and check if they have the <code>pattern</code>.
   * @param job map-reduce job 
   * @param pattern pattern to check
   * @param fetch if <code>true</code> fetch the artifacts into 
   *              <code>dir</code>, else do not fetch
   * @param dir directory to place the fetched outputs
   * @param taskAttempts optional tasks of the job
   * @return <code>true</code> if the artifacts contain <code>pattern</code>,
   *         <code>false</code> otherwise
   * @throws IOException
   */
  public static boolean checkJobArtifacts(Job job, 
                                          Artifact type, String pattern, 
                                          boolean fetch, Path dir, 
                                          TaskAttemptID... taskAttempts)
  throws IOException;

  /**
   * Kill the given task-tracker
   * @param cluster map-reduce <code>Cluster</code>
   * @param taskTracker <code>TaskTracker</code> to be killed
   * @throws IOException
   * @throws InterruptedException 
   */
  public static void killTaskTracker(Cluster cluster, TaskTracker taskTracker) 
  throws IOException, InterruptedException;

  /**
   * Kill a given task-attempt running on the given tasktracker
   * @param cluster map-reduce <code>Cluster</code> 
   * @param taskTracker <code>TaskTracker</code> on which the task is running
   * @param taskAttemptId task-attempt to be killed 
   * @throws IOException
   * @throws InterruptedException
   */
  public static void killTask(Cluster cluster, TaskTracker taskTracker, 
                              TaskAttemptID taskAttemptId)
  throws IOException, InterruptedException;
  
{noformat}


> Large-scale, automated test framwork for Map-Reduce
> ---------------------------------------------------
>
>                 Key: MAPREDUCE-1154
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1154
>             Project: Hadoop Map/Reduce
>          Issue Type: New Feature
>          Components: test
>            Reporter: Arun C Murthy
>             Fix For: 0.21.0
>
>
> HADOOP-6332 proposes a large-scale, automated, junit-based test-framework for Hadoop.
> This jira is meant to track relevant work to Map-Reduce.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.