You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-commits@hadoop.apache.org by cu...@apache.org on 2009/10/24 02:08:57 UTC
svn commit: r829286 - in /hadoop/mapreduce/branches/branch-0.21: ./
.eclipse.templates/ ivy/ src/java/org/apache/hadoop/mapreduce/jobhistory/
Author: cutting
Date: Sat Oct 24 00:08:56 2009
New Revision: 829286
URL: http://svn.apache.org/viewvc?rev=829286&view=rev
Log:
Merge revision 829281 from trunk. Fixes MAPREDUCE-1016.
Modified:
hadoop/mapreduce/branches/branch-0.21/.eclipse.templates/.classpath
hadoop/mapreduce/branches/branch-0.21/CHANGES.txt
hadoop/mapreduce/branches/branch-0.21/ivy/libraries.properties
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/Events.avpr
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/HistoryEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobFinishedEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobHistoryParser.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobInfoChangeEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobInitedEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobPriorityChangeEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobStatusChangedEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobSubmittedEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobUnsuccessfulCompletionEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/MapAttemptFinishedEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/ReduceAttemptFinishedEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptFinishedEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptUnsuccessfulCompletionEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskFailedEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskFinishedEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskStartedEvent.java
hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskUpdatedEvent.java
Modified: hadoop/mapreduce/branches/branch-0.21/.eclipse.templates/.classpath
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/.eclipse.templates/.classpath?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/.eclipse.templates/.classpath (original)
+++ hadoop/mapreduce/branches/branch-0.21/.eclipse.templates/.classpath Sat Oct 24 00:08:56 2009
@@ -29,7 +29,7 @@
<classpathentry kind="lib" path="lib/hadoop-core-test-0.21.0-dev.jar"/>
<classpathentry kind="lib" path="lib/hadoop-hdfs-0.21.0-dev.jar"/>
<classpathentry kind="lib" path="lib/hadoop-hdfs-test-0.21.0-dev.jar"/>
- <classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/avro-1.0.0.jar"/>
+ <classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/avro-1.2.0.jar"/>
<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/commons-cli-1.2.jar"/>
<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/commons-codec-1.3.jar"/>
<classpathentry kind="lib" path="build/ivy/lib/Hadoop/common/commons-el-1.0.jar"/>
Modified: hadoop/mapreduce/branches/branch-0.21/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/CHANGES.txt?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/CHANGES.txt (original)
+++ hadoop/mapreduce/branches/branch-0.21/CHANGES.txt Sat Oct 24 00:08:56 2009
@@ -781,3 +781,4 @@
favor of max capacity percentage thus allowing the limit to go over
queue capacity. (Rahul Kumar Singh via yhemanth)
+ MAPREDUCE-1016. Make the job history log format JSON. (cutting)
Modified: hadoop/mapreduce/branches/branch-0.21/ivy/libraries.properties
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/ivy/libraries.properties?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/ivy/libraries.properties (original)
+++ hadoop/mapreduce/branches/branch-0.21/ivy/libraries.properties Sat Oct 24 00:08:56 2009
@@ -16,7 +16,7 @@
#These are the versions of our dependencies (in alphabetical order)
apacheant.version=1.7.0
-avro.version=1.1.0
+avro.version=1.2.0
checkstyle.version=4.2
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventReader.java Sat Oct 24 00:08:56 2009
@@ -22,6 +22,7 @@
import java.io.DataInputStream;
import java.io.IOException;
import java.io.EOFException;
+import java.io.StringBufferInputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
@@ -30,8 +31,9 @@
import org.apache.hadoop.mapreduce.Counters;
import org.apache.avro.Schema;
+import org.apache.avro.AvroRuntimeException;
import org.apache.avro.io.Decoder;
-import org.apache.avro.io.BinaryDecoder;
+import org.apache.avro.io.JsonDecoder;
import org.apache.avro.io.DatumReader;
import org.apache.avro.specific.SpecificDatumReader;
@@ -66,10 +68,8 @@
throw new IOException("Incompatible event log version: "+version);
this.schema = Schema.parse(in.readLine());
- this.reader =
- new SpecificDatumReader(schema,
- "org.apache.hadoop.mapreduce.jobhistory.Events$");
- this.decoder = new BinaryDecoder(in);
+ this.reader = new SpecificDatumReader(schema);
+ this.decoder = new JsonDecoder(schema, in);
}
/**
@@ -79,10 +79,10 @@
*/
@SuppressWarnings("unchecked")
public HistoryEvent getNextEvent() throws IOException {
- Events.Event wrapper;
+ Event wrapper;
try {
- wrapper = (Events.Event)reader.read(null, decoder);
- } catch (EOFException e) {
+ wrapper = (Event)reader.read(null, decoder);
+ } catch (AvroRuntimeException e) { // at EOF
return null;
}
HistoryEvent result;
@@ -162,12 +162,12 @@
in = null;
}
- static Counters fromAvro(Events.Counters counters) {
+ static Counters fromAvro(JhCounters counters) {
Counters result = new Counters();
- for (Events.CounterGroup g : counters.groups) {
+ for (JhCounterGroup g : counters.groups) {
CounterGroup group =
new CounterGroup(g.name.toString(), g.displayName.toString());
- for (Events.Counter c : g.counts) {
+ for (JhCounter c : g.counts) {
group.addCounter(new Counter(c.name.toString(),
c.displayName.toString(),
c.value));
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java Sat Oct 24 00:08:56 2009
@@ -28,7 +28,7 @@
import org.apache.avro.Schema;
import org.apache.avro.io.Encoder;
-import org.apache.avro.io.BinaryEncoder;
+import org.apache.avro.io.JsonEncoder;
import org.apache.avro.io.DatumWriter;
import org.apache.avro.specific.SpecificDatumWriter;
import org.apache.avro.generic.GenericData;
@@ -41,27 +41,28 @@
*
*/
class EventWriter {
- static final String VERSION = "Avro-Binary";
+ static final String VERSION = "Avro-Json";
private FSDataOutputStream out;
- private DatumWriter<Object> writer =
- new SpecificDatumWriter(Events.Event._SCHEMA);
+ private DatumWriter<Object> writer = new SpecificDatumWriter(Event.class);
private Encoder encoder;
EventWriter(FSDataOutputStream out) throws IOException {
this.out = out;
out.writeBytes(VERSION);
out.writeBytes("\n");
- out.writeBytes(Events.Event._SCHEMA.toString());
+ out.writeBytes(Event._SCHEMA.toString());
out.writeBytes("\n");
- this.encoder = new BinaryEncoder(out);
+ this.encoder = new JsonEncoder(Event._SCHEMA, out);
}
synchronized void write(HistoryEvent event) throws IOException {
- Events.Event wrapper = new Events.Event();
+ Event wrapper = new Event();
wrapper.type = event.getEventType();
wrapper.event = event.getDatum();
writer.write(wrapper, encoder);
+ encoder.flush();
+ out.writeBytes("\n");
}
void flush() throws IOException {
@@ -74,26 +75,26 @@
}
private static final Schema GROUPS =
- Schema.createArray(Events.CounterGroup._SCHEMA);
+ Schema.createArray(JhCounterGroup._SCHEMA);
private static final Schema COUNTERS =
- Schema.createArray(Events.Counter._SCHEMA);
+ Schema.createArray(JhCounter._SCHEMA);
- static Events.Counters toAvro(Counters counters) {
+ static JhCounters toAvro(Counters counters) {
return toAvro(counters, "COUNTERS");
}
- static Events.Counters toAvro(Counters counters, String name) {
- Events.Counters result = new Events.Counters();
+ static JhCounters toAvro(Counters counters, String name) {
+ JhCounters result = new JhCounters();
result.name = new Utf8(name);
- result.groups = new GenericData.Array<Events.CounterGroup>(0, GROUPS);
+ result.groups = new GenericData.Array<JhCounterGroup>(0, GROUPS);
if (counters == null) return result;
for (CounterGroup group : counters) {
- Events.CounterGroup g = new Events.CounterGroup();
+ JhCounterGroup g = new JhCounterGroup();
g.name = new Utf8(group.getName());
g.displayName = new Utf8(group.getDisplayName());
- g.counts = new GenericData.Array<Events.Counter>(group.size(), COUNTERS);
+ g.counts = new GenericData.Array<JhCounter>(group.size(), COUNTERS);
for (Counter counter : group) {
- Events.Counter c = new Events.Counter();
+ JhCounter c = new JhCounter();
c.name = new Utf8(counter.getName());
c.displayName = new Utf8(counter.getDisplayName());
c.value = counter.getValue();
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/Events.avpr
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/Events.avpr?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/Events.avpr (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/Events.avpr Sat Oct 24 00:08:56 2009
@@ -21,7 +21,7 @@
"types": [
- {"type": "record", "name": "Counter",
+ {"type": "record", "name": "JhCounter",
"fields": [
{"name": "name", "type": "string"},
{"name": "displayName", "type": "string"},
@@ -29,18 +29,18 @@
]
},
- {"type": "record", "name": "CounterGroup",
+ {"type": "record", "name": "JhCounterGroup",
"fields": [
{"name": "name", "type": "string"},
{"name": "displayName", "type": "string"},
- {"name": "counts", "type": {"type": "array", "items": "Counter"}}
+ {"name": "counts", "type": {"type": "array", "items": "JhCounter"}}
]
},
- {"type": "record", "name": "Counters",
+ {"type": "record", "name": "JhCounters",
"fields": [
{"name": "name", "type": "string"},
- {"name": "groups", "type": {"type": "array", "items": "CounterGroup"}}
+ {"name": "groups", "type": {"type": "array", "items": "JhCounterGroup"}}
]
},
@@ -52,9 +52,9 @@
{"name": "finishedReduces", "type": "int"},
{"name": "failedMaps", "type": "int"},
{"name": "failedReduces", "type": "int"},
- {"name": "totalCounters", "type": "Counters"},
- {"name": "mapCounters", "type": "Counters"},
- {"name": "reduceCounters", "type": "Counters"}
+ {"name": "totalCounters", "type": "JhCounters"},
+ {"name": "mapCounters", "type": "JhCounters"},
+ {"name": "reduceCounters", "type": "JhCounters"}
]
},
@@ -120,7 +120,7 @@
{"name": "finishTime", "type": "long"},
{"name": "hostname", "type": "string"},
{"name": "state", "type": "string"},
- {"name": "counters", "type": "Counters"}
+ {"name": "counters", "type": "JhCounters"}
]
},
@@ -135,7 +135,7 @@
{"name": "finishTime", "type": "long"},
{"name": "hostname", "type": "string"},
{"name": "state", "type": "string"},
- {"name": "counters", "type": "Counters"}
+ {"name": "counters", "type": "JhCounters"}
]
},
@@ -148,7 +148,7 @@
{"name": "finishTime", "type": "long"},
{"name": "hostname", "type": "string"},
{"name": "state", "type": "string"},
- {"name": "counters", "type": "Counters"}
+ {"name": "counters", "type": "JhCounters"}
]
},
@@ -192,7 +192,7 @@
{"name": "taskType", "type": "string"},
{"name": "finishTime", "type": "long"},
{"name": "status", "type": "string"},
- {"name": "counters", "type": "Counters"}
+ {"name": "counters", "type": "JhCounters"}
]
},
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/HistoryEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/HistoryEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/HistoryEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/HistoryEvent.java Sat Oct 24 00:08:56 2009
@@ -27,7 +27,7 @@
public interface HistoryEvent {
/** Return this event's type. */
- Events.EventType getEventType();
+ EventType getEventType();
/** Return the Avro datum wrapped by this. */
Object getDatum();
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobFinishedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobFinishedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobFinishedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobFinishedEvent.java Sat Oct 24 00:08:56 2009
@@ -30,7 +30,7 @@
*
*/
public class JobFinishedEvent implements HistoryEvent {
- private Events.JobFinished datum = new Events.JobFinished();
+ private JobFinished datum = new JobFinished();
/**
* Create an event to record successful job completion
@@ -66,9 +66,9 @@
JobFinishedEvent() {}
public Object getDatum() { return datum; }
- public void setDatum(Object datum) { this.datum = (Events.JobFinished)datum; }
- public Events.EventType getEventType() {
- return Events.EventType.JOB_FINISHED;
+ public void setDatum(Object datum) { this.datum = (JobFinished)datum; }
+ public EventType getEventType() {
+ return EventType.JOB_FINISHED;
}
/** Get the Job ID */
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobHistoryParser.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobHistoryParser.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobHistoryParser.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobHistoryParser.java Sat Oct 24 00:08:56 2009
@@ -105,7 +105,7 @@
}
private void handleEvent(HistoryEvent event) throws IOException {
- Events.EventType type = event.getEventType();
+ EventType type = event.getEventType();
switch (type) {
case JOB_SUBMITTED:
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobInfoChangeEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobInfoChangeEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobInfoChangeEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobInfoChangeEvent.java Sat Oct 24 00:08:56 2009
@@ -29,7 +29,7 @@
* a job
*/
public class JobInfoChangeEvent implements HistoryEvent {
- private Events.JobInfoChange datum = new Events.JobInfoChange();
+ private JobInfoChange datum = new JobInfoChange();
/**
* Create a event to record the submit and launch time of a job
@@ -47,7 +47,7 @@
public Object getDatum() { return datum; }
public void setDatum(Object datum) {
- this.datum = (Events.JobInfoChange)datum;
+ this.datum = (JobInfoChange)datum;
}
/** Get the Job ID */
@@ -57,8 +57,8 @@
/** Get the Job launch time */
public long getLaunchTime() { return datum.launchTime; }
- public Events.EventType getEventType() {
- return Events.EventType.JOB_INFO_CHANGED;
+ public EventType getEventType() {
+ return EventType.JOB_INFO_CHANGED;
}
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobInitedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobInitedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobInitedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobInitedEvent.java Sat Oct 24 00:08:56 2009
@@ -29,7 +29,7 @@
*
*/
public class JobInitedEvent implements HistoryEvent {
- private Events.JobInited datum = new Events.JobInited();
+ private JobInited datum = new JobInited();
/**
* Create an event to record job initialization
@@ -51,7 +51,7 @@
JobInitedEvent() { }
public Object getDatum() { return datum; }
- public void setDatum(Object datum) { this.datum = (Events.JobInited)datum; }
+ public void setDatum(Object datum) { this.datum = (JobInited)datum; }
/** Get the job ID */
public JobID getJobId() { return JobID.forName(datum.jobid.toString()); }
@@ -64,8 +64,8 @@
/** Get the status */
public String getStatus() { return datum.jobStatus.toString(); }
/** Get the event type */
- public Events.EventType getEventType() {
- return Events.EventType.JOB_INITED;
+ public EventType getEventType() {
+ return EventType.JOB_INITED;
}
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobPriorityChangeEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobPriorityChangeEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobPriorityChangeEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobPriorityChangeEvent.java Sat Oct 24 00:08:56 2009
@@ -30,7 +30,7 @@
*
*/
public class JobPriorityChangeEvent implements HistoryEvent {
- private Events.JobPriorityChange datum = new Events.JobPriorityChange();
+ private JobPriorityChange datum = new JobPriorityChange();
/** Generate an event to record changes in Job priority
* @param id Job Id
@@ -45,7 +45,7 @@
public Object getDatum() { return datum; }
public void setDatum(Object datum) {
- this.datum = (Events.JobPriorityChange)datum;
+ this.datum = (JobPriorityChange)datum;
}
/** Get the Job ID */
@@ -55,8 +55,8 @@
return JobPriority.valueOf(datum.priority.toString());
}
/** Get the event type */
- public Events.EventType getEventType() {
- return Events.EventType.JOB_PRIORITY_CHANGED;
+ public EventType getEventType() {
+ return EventType.JOB_PRIORITY_CHANGED;
}
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobStatusChangedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobStatusChangedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobStatusChangedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobStatusChangedEvent.java Sat Oct 24 00:08:56 2009
@@ -29,7 +29,7 @@
*
*/
public class JobStatusChangedEvent implements HistoryEvent {
- private Events.JobStatusChanged datum = new Events.JobStatusChanged();
+ private JobStatusChanged datum = new JobStatusChanged();
/**
* Create an event to record the change in the Job Status
@@ -45,7 +45,7 @@
public Object getDatum() { return datum; }
public void setDatum(Object datum) {
- this.datum = (Events.JobStatusChanged)datum;
+ this.datum = (JobStatusChanged)datum;
}
/** Get the Job Id */
@@ -53,8 +53,8 @@
/** Get the event status */
public String getStatus() { return datum.jobStatus.toString(); }
/** Get the event type */
- public Events.EventType getEventType() {
- return Events.EventType.JOB_STATUS_CHANGED;
+ public EventType getEventType() {
+ return EventType.JOB_STATUS_CHANGED;
}
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobSubmittedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobSubmittedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobSubmittedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobSubmittedEvent.java Sat Oct 24 00:08:56 2009
@@ -29,7 +29,7 @@
*
*/
public class JobSubmittedEvent implements HistoryEvent {
- private Events.JobSubmitted datum = new Events.JobSubmitted();
+ private JobSubmitted datum = new JobSubmitted();
/**
* Create an event to record job submission
@@ -52,7 +52,7 @@
public Object getDatum() { return datum; }
public void setDatum(Object datum) {
- this.datum = (Events.JobSubmitted)datum;
+ this.datum = (JobSubmitted)datum;
}
/** Get the Job Id */
@@ -66,6 +66,6 @@
/** Get the Path for the Job Configuration file */
public String getJobConfPath() { return datum.jobConfPath.toString(); }
/** Get the event type */
- public Events.EventType getEventType() { return Events.EventType.JOB_SUBMITTED; }
+ public EventType getEventType() { return EventType.JOB_SUBMITTED; }
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobUnsuccessfulCompletionEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobUnsuccessfulCompletionEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobUnsuccessfulCompletionEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/JobUnsuccessfulCompletionEvent.java Sat Oct 24 00:08:56 2009
@@ -29,8 +29,8 @@
*
*/
public class JobUnsuccessfulCompletionEvent implements HistoryEvent {
- private Events.JobUnsuccessfulCompletion datum
- = new Events.JobUnsuccessfulCompletion();
+ private JobUnsuccessfulCompletion datum
+ = new JobUnsuccessfulCompletion();
/**
* Create an event to record unsuccessful completion (killed/failed) of jobs
@@ -54,7 +54,7 @@
public Object getDatum() { return datum; }
public void setDatum(Object datum) {
- this.datum = (Events.JobUnsuccessfulCompletion)datum;
+ this.datum = (JobUnsuccessfulCompletion)datum;
}
/** Get the Job ID */
@@ -68,11 +68,11 @@
/** Get the status */
public String getStatus() { return datum.jobStatus.toString(); }
/** Get the event type */
- public Events.EventType getEventType() {
+ public EventType getEventType() {
if ("FAILED".equals(getStatus())) {
- return Events.EventType.JOB_FAILED;
+ return EventType.JOB_FAILED;
} else
- return Events.EventType.JOB_KILLED;
+ return EventType.JOB_KILLED;
}
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/MapAttemptFinishedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/MapAttemptFinishedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/MapAttemptFinishedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/MapAttemptFinishedEvent.java Sat Oct 24 00:08:56 2009
@@ -32,7 +32,7 @@
*
*/
public class MapAttemptFinishedEvent implements HistoryEvent {
- private Events.MapAttemptFinished datum = new Events.MapAttemptFinished();
+ private MapAttemptFinished datum = new MapAttemptFinished();
/**
* Create an event for successful completion of map attempts
@@ -64,7 +64,7 @@
public Object getDatum() { return datum; }
public void setDatum(Object datum) {
- this.datum = (Events.MapAttemptFinished)datum;
+ this.datum = (MapAttemptFinished)datum;
}
/** Get the task ID */
@@ -90,8 +90,8 @@
/** Get the counters */
Counters getCounters() { return EventReader.fromAvro(datum.counters); }
/** Get the event type */
- public Events.EventType getEventType() {
- return Events.EventType.MAP_ATTEMPT_FINISHED;
+ public EventType getEventType() {
+ return EventType.MAP_ATTEMPT_FINISHED;
}
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/ReduceAttemptFinishedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/ReduceAttemptFinishedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/ReduceAttemptFinishedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/ReduceAttemptFinishedEvent.java Sat Oct 24 00:08:56 2009
@@ -32,8 +32,8 @@
*
*/
public class ReduceAttemptFinishedEvent implements HistoryEvent {
- private Events.ReduceAttemptFinished datum =
- new Events.ReduceAttemptFinished();
+ private ReduceAttemptFinished datum =
+ new ReduceAttemptFinished();
/**
* Create an event to record completion of a reduce attempt
@@ -68,7 +68,7 @@
public Object getDatum() { return datum; }
public void setDatum(Object datum) {
- this.datum = (Events.ReduceAttemptFinished)datum;
+ this.datum = (ReduceAttemptFinished)datum;
}
/** Get the Task ID */
@@ -96,8 +96,8 @@
/** Get the counters for the attempt */
Counters getCounters() { return EventReader.fromAvro(datum.counters); }
/** Get the event type */
- public Events.EventType getEventType() {
- return Events.EventType.REDUCE_ATTEMPT_FINISHED;
+ public EventType getEventType() {
+ return EventType.REDUCE_ATTEMPT_FINISHED;
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptFinishedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptFinishedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptFinishedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptFinishedEvent.java Sat Oct 24 00:08:56 2009
@@ -32,7 +32,7 @@
*
*/
public class TaskAttemptFinishedEvent implements HistoryEvent {
- private Events.TaskAttemptFinished datum = new Events.TaskAttemptFinished();
+ private TaskAttemptFinished datum = new TaskAttemptFinished();
/**
* Create an event to record successful finishes for setup and cleanup
@@ -63,7 +63,7 @@
public Object getDatum() { return datum; }
public void setDatum(Object datum) {
- this.datum = (Events.TaskAttemptFinished)datum;
+ this.datum = (TaskAttemptFinished)datum;
}
/** Get the task ID */
@@ -87,8 +87,8 @@
/** Get the counters for the attempt */
Counters getCounters() { return EventReader.fromAvro(datum.counters); }
/** Get the event type */
- public Events.EventType getEventType() {
- return Events.EventType.MAP_ATTEMPT_FINISHED;
+ public EventType getEventType() {
+ return EventType.MAP_ATTEMPT_FINISHED;
}
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptStartedEvent.java Sat Oct 24 00:08:56 2009
@@ -31,7 +31,7 @@
*
*/
public class TaskAttemptStartedEvent implements HistoryEvent {
- private Events.TaskAttemptStarted datum = new Events.TaskAttemptStarted();
+ private TaskAttemptStarted datum = new TaskAttemptStarted();
/**
* Create an event to record the start of an attempt
@@ -56,7 +56,7 @@
public Object getDatum() { return datum; }
public void setDatum(Object datum) {
- this.datum = (Events.TaskAttemptStarted)datum;
+ this.datum = (TaskAttemptStarted)datum;
}
/** Get the task id */
@@ -76,8 +76,8 @@
return TaskAttemptID.forName(datum.attemptId.toString());
}
/** Get the event type */
- public Events.EventType getEventType() {
- return Events.EventType.MAP_ATTEMPT_STARTED;
+ public EventType getEventType() {
+ return EventType.MAP_ATTEMPT_STARTED;
}
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptUnsuccessfulCompletionEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptUnsuccessfulCompletionEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptUnsuccessfulCompletionEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskAttemptUnsuccessfulCompletionEvent.java Sat Oct 24 00:08:56 2009
@@ -31,8 +31,8 @@
*
*/
public class TaskAttemptUnsuccessfulCompletionEvent implements HistoryEvent {
- private Events.TaskAttemptUnsuccessfulCompletion datum =
- new Events.TaskAttemptUnsuccessfulCompletion();
+ private TaskAttemptUnsuccessfulCompletion datum =
+ new TaskAttemptUnsuccessfulCompletion();
/**
* Create an event to record the unsuccessful completion of attempts
@@ -60,7 +60,7 @@
public Object getDatum() { return datum; }
public void setDatum(Object datum) {
- this.datum = (Events.TaskAttemptUnsuccessfulCompletion)datum;
+ this.datum = (TaskAttemptUnsuccessfulCompletion)datum;
}
/** Get the task id */
@@ -82,8 +82,8 @@
/** Get the task status */
public String getTaskStatus() { return datum.status.toString(); }
/** Get the event type */
- public Events.EventType getEventType() {
- return Events.EventType.MAP_ATTEMPT_KILLED;
+ public EventType getEventType() {
+ return EventType.MAP_ATTEMPT_KILLED;
}
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskFailedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskFailedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskFailedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskFailedEvent.java Sat Oct 24 00:08:56 2009
@@ -31,7 +31,7 @@
*
*/
public class TaskFailedEvent implements HistoryEvent {
- private Events.TaskFailed datum = new Events.TaskFailed();
+ private TaskFailed datum = new TaskFailed();
/**
* Create an event to record task failure
@@ -58,7 +58,7 @@
TaskFailedEvent() {}
public Object getDatum() { return datum; }
- public void setDatum(Object datum) { this.datum = (Events.TaskFailed)datum; }
+ public void setDatum(Object datum) { this.datum = (TaskFailed)datum; }
/** Get the task id */
public TaskID getTaskId() { return TaskID.forName(datum.taskid.toString()); }
@@ -79,7 +79,7 @@
/** Get the task status */
public String getTaskStatus() { return datum.status.toString(); }
/** Get the event type */
- public Events.EventType getEventType() { return Events.EventType.TASK_FAILED; }
+ public EventType getEventType() { return EventType.TASK_FAILED; }
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskFinishedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskFinishedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskFinishedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskFinishedEvent.java Sat Oct 24 00:08:56 2009
@@ -31,7 +31,7 @@
*
*/
public class TaskFinishedEvent implements HistoryEvent {
- private Events.TaskFinished datum = new Events.TaskFinished();
+ private TaskFinished datum = new TaskFinished();
/**
* Create an event to record the successful completion of a task
@@ -55,7 +55,7 @@
public Object getDatum() { return datum; }
public void setDatum(Object datum) {
- this.datum = (Events.TaskFinished)datum;
+ this.datum = (TaskFinished)datum;
}
/** Get task id */
@@ -71,8 +71,8 @@
/** Get task status */
public String getTaskStatus() { return datum.status.toString(); }
/** Get event type */
- public Events.EventType getEventType() {
- return Events.EventType.TASK_FINISHED;
+ public EventType getEventType() {
+ return EventType.TASK_FINISHED;
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskStartedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskStartedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskStartedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskStartedEvent.java Sat Oct 24 00:08:56 2009
@@ -30,7 +30,7 @@
*
*/
public class TaskStartedEvent implements HistoryEvent {
- private Events.TaskStarted datum = new Events.TaskStarted();
+ private TaskStarted datum = new TaskStarted();
/**
* Create an event to record start of a task
@@ -50,7 +50,7 @@
TaskStartedEvent() {}
public Object getDatum() { return datum; }
- public void setDatum(Object datum) { this.datum = (Events.TaskStarted)datum; }
+ public void setDatum(Object datum) { this.datum = (TaskStarted)datum; }
/** Get the task id */
public TaskID getTaskId() { return TaskID.forName(datum.taskid.toString()); }
@@ -63,8 +63,8 @@
return TaskType.valueOf(datum.taskType.toString());
}
/** Get the event type */
- public Events.EventType getEventType() {
- return Events.EventType.TASK_STARTED;
+ public EventType getEventType() {
+ return EventType.TASK_STARTED;
}
}
Modified: hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskUpdatedEvent.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskUpdatedEvent.java?rev=829286&r1=829285&r2=829286&view=diff
==============================================================================
--- hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskUpdatedEvent.java (original)
+++ hadoop/mapreduce/branches/branch-0.21/src/java/org/apache/hadoop/mapreduce/jobhistory/TaskUpdatedEvent.java Sat Oct 24 00:08:56 2009
@@ -29,7 +29,7 @@
*
*/
public class TaskUpdatedEvent implements HistoryEvent {
- private Events.TaskUpdated datum = new Events.TaskUpdated();
+ private TaskUpdated datum = new TaskUpdated();
/**
* Create an event to record task updates
@@ -44,15 +44,15 @@
TaskUpdatedEvent() {}
public Object getDatum() { return datum; }
- public void setDatum(Object datum) { this.datum = (Events.TaskUpdated)datum; }
+ public void setDatum(Object datum) { this.datum = (TaskUpdated)datum; }
/** Get the task ID */
public TaskID getTaskId() { return TaskID.forName(datum.taskid.toString()); }
/** Get the task finish time */
public long getFinishTime() { return datum.finishTime; }
/** Get the event type */
- public Events.EventType getEventType() {
- return Events.EventType.TASK_UPDATED;
+ public EventType getEventType() {
+ return EventType.TASK_UPDATED;
}
}