Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.JobID


    WebHCatJTShim tracker = null;
    JobState state = null;
    try {
      UserGroupInformation ugi = UgiFactory.getUgi(user);
      tracker = ShimLoader.getHadoopShims().getWebHCatShim(appConf, ugi);
      JobID jobid = StatusDelegator.StringToJobID(id);
      if (jobid == null)
        throw new BadParam("Invalid jobid: " + id);
      state = new JobState(id, Main.getAppConfigInstance());
      return StatusDelegator.makeStatus(tracker, jobid, state);
    } catch (IllegalStateException e) {
View Full Code Here


  public static QueueStatusBean makeStatus(WebHCatJTShim tracker,
                       JobID jobid,
                       String childid,
                       JobState state)
    throws BadParam, IOException {
    JobID bestid = jobid;
    if (childid != null)
      bestid = StatusDelegator.StringToJobID(childid);

    JobStatus status = tracker.getJobStatus(bestid);
    JobProfile profile = tracker.getJobProfile(bestid);
View Full Code Here

    UserGroupInformation ugi = UgiFactory.getUgi(user);
    WebHCatJTShim tracker = null;
    JobState state = null;
    try {
      tracker = ShimLoader.getHadoopShims().getWebHCatShim(appConf, ugi);
      JobID jobid = StatusDelegator.StringToJobID(id);
      if (jobid == null)
        throw new BadParam("Invalid jobid: " + id);
      tracker.killJob(jobid);
      state = new JobState(id, Main.getAppConfigInstance());
      String childid = state.getChildId();
View Full Code Here

    @Override
    protected void processKill(String jobid) throws IOException
    {
        if (mJobConf != null) {
            JobClient jc = new JobClient(mJobConf);
            JobID id = JobID.forName(jobid);
            RunningJob job = jc.getJob(id);
            if (job == null)
                System.out.println("Job with id " + jobid + " is not active");
            else
            {   
View Full Code Here

    @Override
    protected void processKill(String jobid) throws IOException
    {
        if (mJobConf != null) {
            JobClient jc = new JobClient(mJobConf);
            JobID id = JobID.forName(jobid);
            RunningJob job = jc.getJob(id);
            if (job == null)
                System.out.println("Job with id " + jobid + " is not active");
            else
            {   
View Full Code Here

      jc.setOutputFormat(NullOutputFormat.class);
      BitPostingIndexInputFormat.setStructures(jc, sourceStructureName, sourceLookupStructureName);
      HadoopUtility.toHConfiguration(index, jc);
     
      RunningJob rj = JobClient.runJob(jc);
      JobID jobId = rj.getID();
      HadoopUtility.finishTerrierJob(jc);
      if (! rj.isSuccessful())
      {
        throw new Exception("Could not complete job");
      }
View Full Code Here

    {
      //for JUnit tests, we seem to need to restore the original partitioner class
      conf.setPartitionerClass(HashPartitioner.class);
    }
   
    JobID jobId = null;
    boolean ranOK = true;
    try{
      RunningJob rj = JobClient.runJob(conf);
      jobId = rj.getID();
      HadoopUtility.finishTerrierJob(conf);
View Full Code Here

    *
    * @return true if the job completed, false otherwise.
    * @throws IOException
    */
   public boolean checkComplete() throws IOException {
     JobID jobID = runningJob.getID();
     if (runningJob.isComplete()) {
       // delete job directory
       final String jobdir = jobconf.get(JOB_DIR_LABEL);
       if (jobdir != null) {
         final Path jobpath = new Path(jobdir);
View Full Code Here

    *
    * @return true if the job completed, false otherwise.
    * @throws IOException
    */
   public boolean checkComplete() throws IOException {
     JobID jobID = runningJob.getID();
     if (runningJob.isComplete()) {
       // delete job directory
       final String jobdir = jobconf.get(JOB_DIR_LABEL);
       if (jobdir != null) {
         final Path jobpath = new Path(jobdir);
View Full Code Here

    assertNull(j.getAssignedJobID());
    org.apache.hadoop.mapreduce.Job mockjob = mock(org.apache.hadoop.mapreduce.Job.class);
    org.apache.hadoop.mapreduce.JobID jid = new org.apache.hadoop.mapreduce.JobID("test",0);
    when(mockjob.getJobID()).thenReturn(jid);
    j.setJob(mockjob);
    JobID expected = new JobID("test",0);
    assertEquals(expected, j.getAssignedJobID());
    verify(mockjob).getJobID();
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapred.JobID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.