com.uber.hoodie.avro.model.HoodieCompactionWriteStat Maven / Gradle / Ivy
The newest version!
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package com.uber.hoodie.avro.model;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class HoodieCompactionWriteStat extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"HoodieCompactionWriteStat\",\"namespace\":\"com.uber.hoodie.avro.model\",\"fields\":[{\"name\":\"partitionPath\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}]},{\"name\":\"totalLogRecords\",\"type\":[\"null\",\"long\"]},{\"name\":\"totalLogFiles\",\"type\":[\"null\",\"long\"]},{\"name\":\"totalUpdatedRecordsCompacted\",\"type\":[\"null\",\"long\"]},{\"name\":\"hoodieWriteStat\",\"type\":[\"null\",{\"type\":\"record\",\"name\":\"HoodieWriteStat\",\"fields\":[{\"name\":\"fileId\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"path\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"prevCommit\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"numWrites\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"numDeletes\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"numUpdateWrites\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"totalWriteBytes\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"totalWriteErrors\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"partitionPath\",\"type\":[\"null\",{\"type\":\"string\",\"avro.java.string\":\"String\"}],\"default\":null},{\"name\":\"totalLogRecords\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"totalLogFiles\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"totalUpdatedRecordsCompacted\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"numInserts\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"totalLogBlocks\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"totalCorruptLogBlock\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"totalRollbackBlocks\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"fileSizeInBytes\",\"type\":[\"null\",\"long\"],\"default\":null}]}]}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
@Deprecated public java.lang.String partitionPath;
@Deprecated public java.lang.Long totalLogRecords;
@Deprecated public java.lang.Long totalLogFiles;
@Deprecated public java.lang.Long totalUpdatedRecordsCompacted;
@Deprecated public com.uber.hoodie.avro.model.HoodieWriteStat hoodieWriteStat;
/**
* 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 HoodieCompactionWriteStat() {}
/**
* All-args constructor.
*/
public HoodieCompactionWriteStat(java.lang.String partitionPath, java.lang.Long totalLogRecords, java.lang.Long totalLogFiles, java.lang.Long totalUpdatedRecordsCompacted, com.uber.hoodie.avro.model.HoodieWriteStat hoodieWriteStat) {
this.partitionPath = partitionPath;
this.totalLogRecords = totalLogRecords;
this.totalLogFiles = totalLogFiles;
this.totalUpdatedRecordsCompacted = totalUpdatedRecordsCompacted;
this.hoodieWriteStat = hoodieWriteStat;
}
public 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 partitionPath;
case 1: return totalLogRecords;
case 2: return totalLogFiles;
case 3: return totalUpdatedRecordsCompacted;
case 4: return hoodieWriteStat;
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: partitionPath = (java.lang.String)value$; break;
case 1: totalLogRecords = (java.lang.Long)value$; break;
case 2: totalLogFiles = (java.lang.Long)value$; break;
case 3: totalUpdatedRecordsCompacted = (java.lang.Long)value$; break;
case 4: hoodieWriteStat = (com.uber.hoodie.avro.model.HoodieWriteStat)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'partitionPath' field.
*/
public java.lang.String getPartitionPath() {
return partitionPath;
}
/**
* Sets the value of the 'partitionPath' field.
* @param value the value to set.
*/
public void setPartitionPath(java.lang.String value) {
this.partitionPath = value;
}
/**
* Gets the value of the 'totalLogRecords' field.
*/
public java.lang.Long getTotalLogRecords() {
return totalLogRecords;
}
/**
* Sets the value of the 'totalLogRecords' field.
* @param value the value to set.
*/
public void setTotalLogRecords(java.lang.Long value) {
this.totalLogRecords = value;
}
/**
* Gets the value of the 'totalLogFiles' field.
*/
public java.lang.Long getTotalLogFiles() {
return totalLogFiles;
}
/**
* Sets the value of the 'totalLogFiles' field.
* @param value the value to set.
*/
public void setTotalLogFiles(java.lang.Long value) {
this.totalLogFiles = value;
}
/**
* Gets the value of the 'totalUpdatedRecordsCompacted' field.
*/
public java.lang.Long getTotalUpdatedRecordsCompacted() {
return totalUpdatedRecordsCompacted;
}
/**
* Sets the value of the 'totalUpdatedRecordsCompacted' field.
* @param value the value to set.
*/
public void setTotalUpdatedRecordsCompacted(java.lang.Long value) {
this.totalUpdatedRecordsCompacted = value;
}
/**
* Gets the value of the 'hoodieWriteStat' field.
*/
public com.uber.hoodie.avro.model.HoodieWriteStat getHoodieWriteStat() {
return hoodieWriteStat;
}
/**
* Sets the value of the 'hoodieWriteStat' field.
* @param value the value to set.
*/
public void setHoodieWriteStat(com.uber.hoodie.avro.model.HoodieWriteStat value) {
this.hoodieWriteStat = value;
}
/** Creates a new HoodieCompactionWriteStat RecordBuilder */
public static com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder newBuilder() {
return new com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder();
}
/** Creates a new HoodieCompactionWriteStat RecordBuilder by copying an existing Builder */
public static com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder newBuilder(com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder other) {
return new com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder(other);
}
/** Creates a new HoodieCompactionWriteStat RecordBuilder by copying an existing HoodieCompactionWriteStat instance */
public static com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder newBuilder(com.uber.hoodie.avro.model.HoodieCompactionWriteStat other) {
return new com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder(other);
}
/**
* RecordBuilder for HoodieCompactionWriteStat instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.String partitionPath;
private java.lang.Long totalLogRecords;
private java.lang.Long totalLogFiles;
private java.lang.Long totalUpdatedRecordsCompacted;
private com.uber.hoodie.avro.model.HoodieWriteStat hoodieWriteStat;
/** Creates a new Builder */
private Builder() {
super(com.uber.hoodie.avro.model.HoodieCompactionWriteStat.SCHEMA$);
}
/** Creates a Builder by copying an existing Builder */
private Builder(com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder other) {
super(other);
if (isValidValue(fields()[0], other.partitionPath)) {
this.partitionPath = data().deepCopy(fields()[0].schema(), other.partitionPath);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.totalLogRecords)) {
this.totalLogRecords = data().deepCopy(fields()[1].schema(), other.totalLogRecords);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.totalLogFiles)) {
this.totalLogFiles = data().deepCopy(fields()[2].schema(), other.totalLogFiles);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.totalUpdatedRecordsCompacted)) {
this.totalUpdatedRecordsCompacted = data().deepCopy(fields()[3].schema(), other.totalUpdatedRecordsCompacted);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.hoodieWriteStat)) {
this.hoodieWriteStat = data().deepCopy(fields()[4].schema(), other.hoodieWriteStat);
fieldSetFlags()[4] = true;
}
}
/** Creates a Builder by copying an existing HoodieCompactionWriteStat instance */
private Builder(com.uber.hoodie.avro.model.HoodieCompactionWriteStat other) {
super(com.uber.hoodie.avro.model.HoodieCompactionWriteStat.SCHEMA$);
if (isValidValue(fields()[0], other.partitionPath)) {
this.partitionPath = data().deepCopy(fields()[0].schema(), other.partitionPath);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.totalLogRecords)) {
this.totalLogRecords = data().deepCopy(fields()[1].schema(), other.totalLogRecords);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.totalLogFiles)) {
this.totalLogFiles = data().deepCopy(fields()[2].schema(), other.totalLogFiles);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.totalUpdatedRecordsCompacted)) {
this.totalUpdatedRecordsCompacted = data().deepCopy(fields()[3].schema(), other.totalUpdatedRecordsCompacted);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.hoodieWriteStat)) {
this.hoodieWriteStat = data().deepCopy(fields()[4].schema(), other.hoodieWriteStat);
fieldSetFlags()[4] = true;
}
}
/** Gets the value of the 'partitionPath' field */
public java.lang.String getPartitionPath() {
return partitionPath;
}
/** Sets the value of the 'partitionPath' field */
public com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder setPartitionPath(java.lang.String value) {
validate(fields()[0], value);
this.partitionPath = value;
fieldSetFlags()[0] = true;
return this;
}
/** Checks whether the 'partitionPath' field has been set */
public boolean hasPartitionPath() {
return fieldSetFlags()[0];
}
/** Clears the value of the 'partitionPath' field */
public com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder clearPartitionPath() {
partitionPath = null;
fieldSetFlags()[0] = false;
return this;
}
/** Gets the value of the 'totalLogRecords' field */
public java.lang.Long getTotalLogRecords() {
return totalLogRecords;
}
/** Sets the value of the 'totalLogRecords' field */
public com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder setTotalLogRecords(java.lang.Long value) {
validate(fields()[1], value);
this.totalLogRecords = value;
fieldSetFlags()[1] = true;
return this;
}
/** Checks whether the 'totalLogRecords' field has been set */
public boolean hasTotalLogRecords() {
return fieldSetFlags()[1];
}
/** Clears the value of the 'totalLogRecords' field */
public com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder clearTotalLogRecords() {
totalLogRecords = null;
fieldSetFlags()[1] = false;
return this;
}
/** Gets the value of the 'totalLogFiles' field */
public java.lang.Long getTotalLogFiles() {
return totalLogFiles;
}
/** Sets the value of the 'totalLogFiles' field */
public com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder setTotalLogFiles(java.lang.Long value) {
validate(fields()[2], value);
this.totalLogFiles = value;
fieldSetFlags()[2] = true;
return this;
}
/** Checks whether the 'totalLogFiles' field has been set */
public boolean hasTotalLogFiles() {
return fieldSetFlags()[2];
}
/** Clears the value of the 'totalLogFiles' field */
public com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder clearTotalLogFiles() {
totalLogFiles = null;
fieldSetFlags()[2] = false;
return this;
}
/** Gets the value of the 'totalUpdatedRecordsCompacted' field */
public java.lang.Long getTotalUpdatedRecordsCompacted() {
return totalUpdatedRecordsCompacted;
}
/** Sets the value of the 'totalUpdatedRecordsCompacted' field */
public com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder setTotalUpdatedRecordsCompacted(java.lang.Long value) {
validate(fields()[3], value);
this.totalUpdatedRecordsCompacted = value;
fieldSetFlags()[3] = true;
return this;
}
/** Checks whether the 'totalUpdatedRecordsCompacted' field has been set */
public boolean hasTotalUpdatedRecordsCompacted() {
return fieldSetFlags()[3];
}
/** Clears the value of the 'totalUpdatedRecordsCompacted' field */
public com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder clearTotalUpdatedRecordsCompacted() {
totalUpdatedRecordsCompacted = null;
fieldSetFlags()[3] = false;
return this;
}
/** Gets the value of the 'hoodieWriteStat' field */
public com.uber.hoodie.avro.model.HoodieWriteStat getHoodieWriteStat() {
return hoodieWriteStat;
}
/** Sets the value of the 'hoodieWriteStat' field */
public com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder setHoodieWriteStat(com.uber.hoodie.avro.model.HoodieWriteStat value) {
validate(fields()[4], value);
this.hoodieWriteStat = value;
fieldSetFlags()[4] = true;
return this;
}
/** Checks whether the 'hoodieWriteStat' field has been set */
public boolean hasHoodieWriteStat() {
return fieldSetFlags()[4];
}
/** Clears the value of the 'hoodieWriteStat' field */
public com.uber.hoodie.avro.model.HoodieCompactionWriteStat.Builder clearHoodieWriteStat() {
hoodieWriteStat = null;
fieldSetFlags()[4] = false;
return this;
}
@Override
public HoodieCompactionWriteStat build() {
try {
HoodieCompactionWriteStat record = new HoodieCompactionWriteStat();
record.partitionPath = fieldSetFlags()[0] ? this.partitionPath : (java.lang.String) defaultValue(fields()[0]);
record.totalLogRecords = fieldSetFlags()[1] ? this.totalLogRecords : (java.lang.Long) defaultValue(fields()[1]);
record.totalLogFiles = fieldSetFlags()[2] ? this.totalLogFiles : (java.lang.Long) defaultValue(fields()[2]);
record.totalUpdatedRecordsCompacted = fieldSetFlags()[3] ? this.totalUpdatedRecordsCompacted : (java.lang.Long) defaultValue(fields()[3]);
record.hoodieWriteStat = fieldSetFlags()[4] ? this.hoodieWriteStat : (com.uber.hoodie.avro.model.HoodieWriteStat) defaultValue(fields()[4]);
return record;
} catch (Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy