Interface ExternalSynchronization

All Superinterfaces:
Serializable
All Known Implementing Classes:
HDFSSynchronization

public interface ExternalSynchronization extends Serializable
Provides mechanism for acquiring locks related to the job. Serves as source of unique events among the job.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.mapreduce.TaskAttemptID
    acquireTaskAttemptIdLock(org.apache.hadoop.conf.Configuration conf, int taskId)
    Creates unique TaskAttemptID for given taskId.
    org.apache.hadoop.mapreduce.TaskID
    acquireTaskIdLock(org.apache.hadoop.conf.Configuration conf)
    Creates TaskID with unique id among given job.
    void
    releaseJobIdLock(org.apache.hadoop.conf.Configuration conf)
    Deletes lock ids bounded with given job if any exists.
    boolean
    tryAcquireJobLock(org.apache.hadoop.conf.Configuration conf)
    Tries to acquire lock for given job.
  • Method Details

    • tryAcquireJobLock

      boolean tryAcquireJobLock(org.apache.hadoop.conf.Configuration conf)
      Tries to acquire lock for given job.
      Parameters:
      conf - configuration bounded with given job.
      Returns:
      true if the lock was acquired, false otherwise.
    • releaseJobIdLock

      void releaseJobIdLock(org.apache.hadoop.conf.Configuration conf)
      Deletes lock ids bounded with given job if any exists.
      Parameters:
      conf - hadoop configuration of given job.
    • acquireTaskIdLock

      org.apache.hadoop.mapreduce.TaskID acquireTaskIdLock(org.apache.hadoop.conf.Configuration conf)
      Creates TaskID with unique id among given job.
      Parameters:
      conf - hadoop configuration of given job.
      Returns:
      TaskID with unique id among given job.
    • acquireTaskAttemptIdLock

      org.apache.hadoop.mapreduce.TaskAttemptID acquireTaskAttemptIdLock(org.apache.hadoop.conf.Configuration conf, int taskId)
      Creates unique TaskAttemptID for given taskId.
      Parameters:
      conf - configuration of given task and job
      taskId - id of the task
      Returns:
      Unique TaskAttemptID for given taskId.