
org.apache.hadoop.mapreduce.jobhistory.AMStarted Maven / Gradle / Ivy
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory;
import org.apache.hadoop.shaded.org.apache.avro.generic.GenericArray;
import org.apache.hadoop.shaded.org.apache.avro.specific.SpecificData;
import org.apache.hadoop.shaded.org.apache.avro.util.Utf8;
import org.apache.hadoop.shaded.org.apache.avro.message.BinaryMessageEncoder;
import org.apache.hadoop.shaded.org.apache.avro.message.BinaryMessageDecoder;
import org.apache.hadoop.shaded.org.apache.avro.message.SchemaStore;
@org.apache.hadoop.shaded.org.apache.avro.specific.AvroGenerated
public class AMStarted extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = -1429099035552959643L;
public static final org.apache.hadoop.shaded.org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"AMStarted\",\"namespace\":\"org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory\",\"fields\":[{\"name\":\"applicationAttemptId\",\"type\":\"string\"},{\"name\":\"startTime\",\"type\":\"long\"},{\"name\":\"containerId\",\"type\":\"string\"},{\"name\":\"nodeManagerHost\",\"type\":\"string\"},{\"name\":\"nodeManagerPort\",\"type\":\"int\"},{\"name\":\"nodeManagerHttpPort\",\"type\":\"int\"}]}");
public static org.apache.hadoop.shaded.org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private static SpecificData MODEL$ = new SpecificData();
private static final BinaryMessageEncoder ENCODER =
new BinaryMessageEncoder(MODEL$, SCHEMA$);
private static final BinaryMessageDecoder DECODER =
new BinaryMessageDecoder(MODEL$, SCHEMA$);
/**
* Return the BinaryMessageEncoder instance used by this class.
* @return the message encoder used by this class
*/
public static BinaryMessageEncoder getEncoder() {
return ENCODER;
}
/**
* Return the BinaryMessageDecoder instance used by this class.
* @return the message decoder used by this class
*/
public static BinaryMessageDecoder getDecoder() {
return DECODER;
}
/**
* Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}.
* @param resolver a {@link SchemaStore} used to find schemas by fingerprint
* @return a BinaryMessageDecoder instance for this class backed by the given SchemaStore
*/
public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver);
}
/**
* Serializes this AMStarted to a ByteBuffer.
* @return a buffer holding the serialized data for this instance
* @throws java.io.IOException if this instance could not be serialized
*/
public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
return ENCODER.encode(this);
}
/**
* Deserializes a AMStarted from a ByteBuffer.
* @param b a byte buffer holding serialized data for an instance of this class
* @return a AMStarted instance decoded from the given buffer
* @throws java.io.IOException if the given bytes could not be deserialized into an instance of this class
*/
public static AMStarted fromByteBuffer(
java.nio.ByteBuffer b) throws java.io.IOException {
return DECODER.decode(b);
}
@Deprecated public java.lang.CharSequence applicationAttemptId;
@Deprecated public long startTime;
@Deprecated public java.lang.CharSequence containerId;
@Deprecated public java.lang.CharSequence nodeManagerHost;
@Deprecated public int nodeManagerPort;
@Deprecated public int nodeManagerHttpPort;
/**
* Default constructor. Note that this does not initialize fields
* to their default values from the schema. If that is desired then
* one should use newBuilder()
.
*/
public AMStarted() {}
/**
* All-args constructor.
* @param applicationAttemptId The new value for applicationAttemptId
* @param startTime The new value for startTime
* @param containerId The new value for containerId
* @param nodeManagerHost The new value for nodeManagerHost
* @param nodeManagerPort The new value for nodeManagerPort
* @param nodeManagerHttpPort The new value for nodeManagerHttpPort
*/
public AMStarted(java.lang.CharSequence applicationAttemptId, java.lang.Long startTime, java.lang.CharSequence containerId, java.lang.CharSequence nodeManagerHost, java.lang.Integer nodeManagerPort, java.lang.Integer nodeManagerHttpPort) {
this.applicationAttemptId = applicationAttemptId;
this.startTime = startTime;
this.containerId = containerId;
this.nodeManagerHost = nodeManagerHost;
this.nodeManagerPort = nodeManagerPort;
this.nodeManagerHttpPort = nodeManagerHttpPort;
}
public org.apache.hadoop.shaded.org.apache.avro.specific.SpecificData getSpecificData() { return MODEL$; }
public org.apache.hadoop.shaded.org.apache.avro.Schema getSchema() { return SCHEMA$; }
// Used by DatumWriter. Applications should not call.
public java.lang.Object get(int field$) {
switch (field$) {
case 0: return applicationAttemptId;
case 1: return startTime;
case 2: return containerId;
case 3: return nodeManagerHost;
case 4: return nodeManagerPort;
case 5: return nodeManagerHttpPort;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
// Used by DatumReader. Applications should not call.
@SuppressWarnings(value="unchecked")
public void put(int field$, java.lang.Object value$) {
switch (field$) {
case 0: applicationAttemptId = (java.lang.CharSequence)value$; break;
case 1: startTime = (java.lang.Long)value$; break;
case 2: containerId = (java.lang.CharSequence)value$; break;
case 3: nodeManagerHost = (java.lang.CharSequence)value$; break;
case 4: nodeManagerPort = (java.lang.Integer)value$; break;
case 5: nodeManagerHttpPort = (java.lang.Integer)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'applicationAttemptId' field.
* @return The value of the 'applicationAttemptId' field.
*/
public java.lang.CharSequence getApplicationAttemptId() {
return applicationAttemptId;
}
/**
* Sets the value of the 'applicationAttemptId' field.
* @param value the value to set.
*/
public void setApplicationAttemptId(java.lang.CharSequence value) {
this.applicationAttemptId = value;
}
/**
* Gets the value of the 'startTime' field.
* @return The value of the 'startTime' field.
*/
public long getStartTime() {
return startTime;
}
/**
* Sets the value of the 'startTime' field.
* @param value the value to set.
*/
public void setStartTime(long value) {
this.startTime = value;
}
/**
* Gets the value of the 'containerId' field.
* @return The value of the 'containerId' field.
*/
public java.lang.CharSequence getContainerId() {
return containerId;
}
/**
* Sets the value of the 'containerId' field.
* @param value the value to set.
*/
public void setContainerId(java.lang.CharSequence value) {
this.containerId = value;
}
/**
* Gets the value of the 'nodeManagerHost' field.
* @return The value of the 'nodeManagerHost' field.
*/
public java.lang.CharSequence getNodeManagerHost() {
return nodeManagerHost;
}
/**
* Sets the value of the 'nodeManagerHost' field.
* @param value the value to set.
*/
public void setNodeManagerHost(java.lang.CharSequence value) {
this.nodeManagerHost = value;
}
/**
* Gets the value of the 'nodeManagerPort' field.
* @return The value of the 'nodeManagerPort' field.
*/
public int getNodeManagerPort() {
return nodeManagerPort;
}
/**
* Sets the value of the 'nodeManagerPort' field.
* @param value the value to set.
*/
public void setNodeManagerPort(int value) {
this.nodeManagerPort = value;
}
/**
* Gets the value of the 'nodeManagerHttpPort' field.
* @return The value of the 'nodeManagerHttpPort' field.
*/
public int getNodeManagerHttpPort() {
return nodeManagerHttpPort;
}
/**
* Sets the value of the 'nodeManagerHttpPort' field.
* @param value the value to set.
*/
public void setNodeManagerHttpPort(int value) {
this.nodeManagerHttpPort = value;
}
/**
* Creates a new AMStarted RecordBuilder.
* @return A new AMStarted RecordBuilder
*/
public static org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder newBuilder() {
return new org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder();
}
/**
* Creates a new AMStarted RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new AMStarted RecordBuilder
*/
public static org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder newBuilder(org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder other) {
if (other == null) {
return new org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder();
} else {
return new org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder(other);
}
}
/**
* Creates a new AMStarted RecordBuilder by copying an existing AMStarted instance.
* @param other The existing instance to copy.
* @return A new AMStarted RecordBuilder
*/
public static org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder newBuilder(org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted other) {
if (other == null) {
return new org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder();
} else {
return new org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder(other);
}
}
/**
* RecordBuilder for AMStarted instances.
*/
@org.apache.hadoop.shaded.org.apache.avro.specific.AvroGenerated
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.CharSequence applicationAttemptId;
private long startTime;
private java.lang.CharSequence containerId;
private java.lang.CharSequence nodeManagerHost;
private int nodeManagerPort;
private int nodeManagerHttpPort;
/** Creates a new Builder */
private Builder() {
super(SCHEMA$);
}
/**
* Creates a Builder by copying an existing Builder.
* @param other The existing Builder to copy.
*/
private Builder(org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder other) {
super(other);
if (isValidValue(fields()[0], other.applicationAttemptId)) {
this.applicationAttemptId = data().deepCopy(fields()[0].schema(), other.applicationAttemptId);
fieldSetFlags()[0] = other.fieldSetFlags()[0];
}
if (isValidValue(fields()[1], other.startTime)) {
this.startTime = data().deepCopy(fields()[1].schema(), other.startTime);
fieldSetFlags()[1] = other.fieldSetFlags()[1];
}
if (isValidValue(fields()[2], other.containerId)) {
this.containerId = data().deepCopy(fields()[2].schema(), other.containerId);
fieldSetFlags()[2] = other.fieldSetFlags()[2];
}
if (isValidValue(fields()[3], other.nodeManagerHost)) {
this.nodeManagerHost = data().deepCopy(fields()[3].schema(), other.nodeManagerHost);
fieldSetFlags()[3] = other.fieldSetFlags()[3];
}
if (isValidValue(fields()[4], other.nodeManagerPort)) {
this.nodeManagerPort = data().deepCopy(fields()[4].schema(), other.nodeManagerPort);
fieldSetFlags()[4] = other.fieldSetFlags()[4];
}
if (isValidValue(fields()[5], other.nodeManagerHttpPort)) {
this.nodeManagerHttpPort = data().deepCopy(fields()[5].schema(), other.nodeManagerHttpPort);
fieldSetFlags()[5] = other.fieldSetFlags()[5];
}
}
/**
* Creates a Builder by copying an existing AMStarted instance
* @param other The existing instance to copy.
*/
private Builder(org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted other) {
super(SCHEMA$);
if (isValidValue(fields()[0], other.applicationAttemptId)) {
this.applicationAttemptId = data().deepCopy(fields()[0].schema(), other.applicationAttemptId);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.startTime)) {
this.startTime = data().deepCopy(fields()[1].schema(), other.startTime);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.containerId)) {
this.containerId = data().deepCopy(fields()[2].schema(), other.containerId);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.nodeManagerHost)) {
this.nodeManagerHost = data().deepCopy(fields()[3].schema(), other.nodeManagerHost);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.nodeManagerPort)) {
this.nodeManagerPort = data().deepCopy(fields()[4].schema(), other.nodeManagerPort);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.nodeManagerHttpPort)) {
this.nodeManagerHttpPort = data().deepCopy(fields()[5].schema(), other.nodeManagerHttpPort);
fieldSetFlags()[5] = true;
}
}
/**
* Gets the value of the 'applicationAttemptId' field.
* @return The value.
*/
public java.lang.CharSequence getApplicationAttemptId() {
return applicationAttemptId;
}
/**
* Sets the value of the 'applicationAttemptId' field.
* @param value The value of 'applicationAttemptId'.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder setApplicationAttemptId(java.lang.CharSequence value) {
validate(fields()[0], value);
this.applicationAttemptId = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'applicationAttemptId' field has been set.
* @return True if the 'applicationAttemptId' field has been set, false otherwise.
*/
public boolean hasApplicationAttemptId() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'applicationAttemptId' field.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder clearApplicationAttemptId() {
applicationAttemptId = null;
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'startTime' field.
* @return The value.
*/
public long getStartTime() {
return startTime;
}
/**
* Sets the value of the 'startTime' field.
* @param value The value of 'startTime'.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder setStartTime(long value) {
validate(fields()[1], value);
this.startTime = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'startTime' field has been set.
* @return True if the 'startTime' field has been set, false otherwise.
*/
public boolean hasStartTime() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'startTime' field.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder clearStartTime() {
fieldSetFlags()[1] = false;
return this;
}
/**
* Gets the value of the 'containerId' field.
* @return The value.
*/
public java.lang.CharSequence getContainerId() {
return containerId;
}
/**
* Sets the value of the 'containerId' field.
* @param value The value of 'containerId'.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder setContainerId(java.lang.CharSequence value) {
validate(fields()[2], value);
this.containerId = value;
fieldSetFlags()[2] = true;
return this;
}
/**
* Checks whether the 'containerId' field has been set.
* @return True if the 'containerId' field has been set, false otherwise.
*/
public boolean hasContainerId() {
return fieldSetFlags()[2];
}
/**
* Clears the value of the 'containerId' field.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder clearContainerId() {
containerId = null;
fieldSetFlags()[2] = false;
return this;
}
/**
* Gets the value of the 'nodeManagerHost' field.
* @return The value.
*/
public java.lang.CharSequence getNodeManagerHost() {
return nodeManagerHost;
}
/**
* Sets the value of the 'nodeManagerHost' field.
* @param value The value of 'nodeManagerHost'.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder setNodeManagerHost(java.lang.CharSequence value) {
validate(fields()[3], value);
this.nodeManagerHost = value;
fieldSetFlags()[3] = true;
return this;
}
/**
* Checks whether the 'nodeManagerHost' field has been set.
* @return True if the 'nodeManagerHost' field has been set, false otherwise.
*/
public boolean hasNodeManagerHost() {
return fieldSetFlags()[3];
}
/**
* Clears the value of the 'nodeManagerHost' field.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder clearNodeManagerHost() {
nodeManagerHost = null;
fieldSetFlags()[3] = false;
return this;
}
/**
* Gets the value of the 'nodeManagerPort' field.
* @return The value.
*/
public int getNodeManagerPort() {
return nodeManagerPort;
}
/**
* Sets the value of the 'nodeManagerPort' field.
* @param value The value of 'nodeManagerPort'.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder setNodeManagerPort(int value) {
validate(fields()[4], value);
this.nodeManagerPort = value;
fieldSetFlags()[4] = true;
return this;
}
/**
* Checks whether the 'nodeManagerPort' field has been set.
* @return True if the 'nodeManagerPort' field has been set, false otherwise.
*/
public boolean hasNodeManagerPort() {
return fieldSetFlags()[4];
}
/**
* Clears the value of the 'nodeManagerPort' field.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder clearNodeManagerPort() {
fieldSetFlags()[4] = false;
return this;
}
/**
* Gets the value of the 'nodeManagerHttpPort' field.
* @return The value.
*/
public int getNodeManagerHttpPort() {
return nodeManagerHttpPort;
}
/**
* Sets the value of the 'nodeManagerHttpPort' field.
* @param value The value of 'nodeManagerHttpPort'.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder setNodeManagerHttpPort(int value) {
validate(fields()[5], value);
this.nodeManagerHttpPort = value;
fieldSetFlags()[5] = true;
return this;
}
/**
* Checks whether the 'nodeManagerHttpPort' field has been set.
* @return True if the 'nodeManagerHttpPort' field has been set, false otherwise.
*/
public boolean hasNodeManagerHttpPort() {
return fieldSetFlags()[5];
}
/**
* Clears the value of the 'nodeManagerHttpPort' field.
* @return This builder.
*/
public org.apache.hadoop.shaded.org.apache.hadoop.mapreduce.jobhistory.AMStarted.Builder clearNodeManagerHttpPort() {
fieldSetFlags()[5] = false;
return this;
}
@Override
@SuppressWarnings("unchecked")
public AMStarted build() {
try {
AMStarted record = new AMStarted();
record.applicationAttemptId = fieldSetFlags()[0] ? this.applicationAttemptId : (java.lang.CharSequence) defaultValue(fields()[0]);
record.startTime = fieldSetFlags()[1] ? this.startTime : (java.lang.Long) defaultValue(fields()[1]);
record.containerId = fieldSetFlags()[2] ? this.containerId : (java.lang.CharSequence) defaultValue(fields()[2]);
record.nodeManagerHost = fieldSetFlags()[3] ? this.nodeManagerHost : (java.lang.CharSequence) defaultValue(fields()[3]);
record.nodeManagerPort = fieldSetFlags()[4] ? this.nodeManagerPort : (java.lang.Integer) defaultValue(fields()[4]);
record.nodeManagerHttpPort = fieldSetFlags()[5] ? this.nodeManagerHttpPort : (java.lang.Integer) defaultValue(fields()[5]);
return record;
} catch (org.apache.hadoop.shaded.org.apache.avro.AvroMissingFieldException e) {
throw e;
} catch (java.lang.Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
@SuppressWarnings("unchecked")
private static final org.apache.hadoop.shaded.org.apache.avro.io.DatumWriter
WRITER$ = (org.apache.hadoop.shaded.org.apache.avro.io.DatumWriter)MODEL$.createDatumWriter(SCHEMA$);
@Override public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException {
WRITER$.write(this, SpecificData.getEncoder(out));
}
@SuppressWarnings("unchecked")
private static final org.apache.hadoop.shaded.org.apache.avro.io.DatumReader
READER$ = (org.apache.hadoop.shaded.org.apache.avro.io.DatumReader)MODEL$.createDatumReader(SCHEMA$);
@Override public void readExternal(java.io.ObjectInput in)
throws java.io.IOException {
READER$.read(this, SpecificData.getDecoder(in));
}
@Override protected boolean hasCustomCoders() { return true; }
@Override public void customEncode(org.apache.hadoop.shaded.org.apache.avro.io.Encoder out)
throws java.io.IOException
{
out.writeString(this.applicationAttemptId);
out.writeLong(this.startTime);
out.writeString(this.containerId);
out.writeString(this.nodeManagerHost);
out.writeInt(this.nodeManagerPort);
out.writeInt(this.nodeManagerHttpPort);
}
@Override public void customDecode(org.apache.hadoop.shaded.org.apache.avro.io.ResolvingDecoder in)
throws java.io.IOException
{
org.apache.avro.Schema.Field[] fieldOrder = in.readFieldOrderIfDiff();
if (fieldOrder == null) {
this.applicationAttemptId = in.readString(this.applicationAttemptId instanceof Utf8 ? (Utf8)this.applicationAttemptId : null);
this.startTime = in.readLong();
this.containerId = in.readString(this.containerId instanceof Utf8 ? (Utf8)this.containerId : null);
this.nodeManagerHost = in.readString(this.nodeManagerHost instanceof Utf8 ? (Utf8)this.nodeManagerHost : null);
this.nodeManagerPort = in.readInt();
this.nodeManagerHttpPort = in.readInt();
} else {
for (int i = 0; i < 6; i++) {
switch (fieldOrder[i].pos()) {
case 0:
this.applicationAttemptId = in.readString(this.applicationAttemptId instanceof Utf8 ? (Utf8)this.applicationAttemptId : null);
break;
case 1:
this.startTime = in.readLong();
break;
case 2:
this.containerId = in.readString(this.containerId instanceof Utf8 ? (Utf8)this.containerId : null);
break;
case 3:
this.nodeManagerHost = in.readString(this.nodeManagerHost instanceof Utf8 ? (Utf8)this.nodeManagerHost : null);
break;
case 4:
this.nodeManagerPort = in.readInt();
break;
case 5:
this.nodeManagerHttpPort = in.readInt();
break;
default:
throw new java.io.IOException("Corrupt ResolvingDecoder.");
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy