/** * Fetch task completion events from cluster for this job. */ public synchronized TaskCompletionEvent[] getTaskCompletionEvents( int startFrom) throws IOException { try { org.apache.hadoop.mapreduce.TaskCompletionEvent[] acls = job.getTaskCompletionEvents(startFrom, 10); TaskCompletionEvent[] ret = new TaskCompletionEvent[acls.length]; for (int i = 0 ; i < acls.length; i++ ) { ret[i] = TaskCompletionEvent.downgrade(acls[i]); } return ret; } catch (InterruptedException ie) { throw new IOException(ie); } }
/** * Get events indicating completion (success/failure) of component tasks. * * @param startFrom index to start fetching events from * @return an array of {@link org.apache.hadoop.mapred.TaskCompletionEvent}s * @throws IOException */ public org.apache.hadoop.mapred.TaskCompletionEvent[] getTaskCompletionEvents(final int startFrom) throws IOException { try { TaskCompletionEvent[] events = getTaskCompletionEvents(startFrom, 10); org.apache.hadoop.mapred.TaskCompletionEvent[] retEvents = new org.apache.hadoop.mapred.TaskCompletionEvent[events.length]; for (int i = 0; i < events.length; i++) { retEvents[i] = org.apache.hadoop.mapred.TaskCompletionEvent.downgrade (events[i]); } return retEvents; } catch (InterruptedException ie) { throw new IOException(ie); } }
/** * Fetch task completion events from cluster for this job. */ public synchronized TaskCompletionEvent[] getTaskCompletionEvents( int startFrom) throws IOException { try { org.apache.hadoop.mapreduce.TaskCompletionEvent[] acls = job.getTaskCompletionEvents(startFrom, 10); TaskCompletionEvent[] ret = new TaskCompletionEvent[acls.length]; for (int i = 0 ; i < acls.length; i++ ) { ret[i] = TaskCompletionEvent.downgrade(acls[i]); } return ret; } catch (InterruptedException ie) { throw new IOException(ie); } }
/** * Fetch task completion events from cluster for this job. */ public synchronized TaskCompletionEvent[] getTaskCompletionEvents( int startFrom) throws IOException { try { org.apache.hadoop.mapreduce.TaskCompletionEvent[] acls = job.getTaskCompletionEvents(startFrom, 10); TaskCompletionEvent[] ret = new TaskCompletionEvent[acls.length]; for (int i = 0 ; i < acls.length; i++ ) { ret[i] = TaskCompletionEvent.downgrade(acls[i]); } return ret; } catch (InterruptedException ie) { throw new IOException(ie); } }
/** * Fetch task completion events from jobtracker for this job. */ public synchronized TaskCompletionEvent[] getTaskCompletionEvents( int startFrom) throws IOException { try { org.apache.hadoop.mapreduce.TaskCompletionEvent[] acls = job.getTaskCompletionEvents(startFrom, 10); TaskCompletionEvent[] ret = new TaskCompletionEvent[acls.length]; for (int i = 0 ; i < acls.length; i++ ) { ret[i] = TaskCompletionEvent.downgrade(acls[i]); } return ret; } catch (InterruptedException ie) { throw new IOException(ie); } }
/** * Fetch task completion events from cluster for this job. */ public synchronized TaskCompletionEvent[] getTaskCompletionEvents( int startFrom) throws IOException { try { org.apache.hadoop.mapreduce.TaskCompletionEvent[] acls = job.getTaskCompletionEvents(startFrom, 10); TaskCompletionEvent[] ret = new TaskCompletionEvent[acls.length]; for (int i = 0 ; i < acls.length; i++ ) { ret[i] = TaskCompletionEvent.downgrade(acls[i]); } return ret; } catch (InterruptedException ie) { throw new IOException(ie); } }
/** * Get events indicating completion (success/failure) of component tasks. * * @param startFrom index to start fetching events from * @return an array of {@link org.apache.hadoop.mapred.TaskCompletionEvent}s * @throws IOException */ public org.apache.hadoop.mapred.TaskCompletionEvent[] getTaskCompletionEvents(final int startFrom) throws IOException { try { TaskCompletionEvent[] events = getTaskCompletionEvents(startFrom, 10); org.apache.hadoop.mapred.TaskCompletionEvent[] retEvents = new org.apache.hadoop.mapred.TaskCompletionEvent[events.length]; for (int i = 0; i < events.length; i++) { retEvents[i] = org.apache.hadoop.mapred.TaskCompletionEvent.downgrade (events[i]); } return retEvents; } catch (InterruptedException ie) { throw new IOException(ie); } }
/** * Get events indicating completion (success/failure) of component tasks. * * @param startFrom index to start fetching events from * @return an array of {@link org.apache.hadoop.mapred.TaskCompletionEvent}s * @throws IOException */ public org.apache.hadoop.mapred.TaskCompletionEvent[] getTaskCompletionEvents(final int startFrom) throws IOException { try { TaskCompletionEvent[] events = getTaskCompletionEvents(startFrom, 10); org.apache.hadoop.mapred.TaskCompletionEvent[] retEvents = new org.apache.hadoop.mapred.TaskCompletionEvent[events.length]; for (int i = 0; i < events.length; i++) { retEvents[i] = org.apache.hadoop.mapred.TaskCompletionEvent.downgrade (events[i]); } return retEvents; } catch (InterruptedException ie) { throw new IOException(ie); } }
/** * Get events indicating completion (success/failure) of component tasks. * * @param startFrom index to start fetching events from * @return an array of {@link org.apache.hadoop.mapred.TaskCompletionEvent}s * @throws IOException */ public org.apache.hadoop.mapred.TaskCompletionEvent[] getTaskCompletionEvents(final int startFrom) throws IOException { try { TaskCompletionEvent[] events = getTaskCompletionEvents(startFrom, 10); org.apache.hadoop.mapred.TaskCompletionEvent[] retEvents = new org.apache.hadoop.mapred.TaskCompletionEvent[events.length]; for (int i = 0; i < events.length; i++) { retEvents[i] = org.apache.hadoop.mapred.TaskCompletionEvent.downgrade (events[i]); } return retEvents; } catch (InterruptedException ie) { throw new IOException(ie); } }
/** * test deprecated methods of TaskCompletionEvent */ @SuppressWarnings("deprecation") @Test (timeout=5000) public void testTaskCompletionEvent() { TaskAttemptID taid = new TaskAttemptID("001", 1, TaskType.REDUCE, 2, 3); TaskCompletionEvent template = new TaskCompletionEvent(12, taid, 13, true, Status.SUCCEEDED, "httptracker"); TaskCompletionEvent testEl = TaskCompletionEvent.downgrade(template); testEl.setTaskAttemptId(taid); testEl.setTaskTrackerHttp("httpTracker"); testEl.setTaskId("attempt_001_0001_m_000002_04"); assertEquals("attempt_001_0001_m_000002_4",testEl.getTaskId()); testEl.setTaskStatus(Status.OBSOLETE); assertEquals(Status.OBSOLETE.toString(), testEl.getStatus().toString()); testEl.setTaskRunTime(20); assertEquals(testEl.getTaskRunTime(), 20); testEl.setEventId(16); assertEquals(testEl.getEventId(), 16); }