Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.apache.hudi.avro.model;
import org.apache.avro.specific.SpecificData;
import org.apache.avro.message.BinaryMessageEncoder;
import org.apache.avro.message.BinaryMessageDecoder;
import org.apache.avro.message.SchemaStore;
@SuppressWarnings("all")
/** Data file bloom filter details */
@org.apache.avro.specific.AvroGenerated
public class HoodieMetadataBloomFilter extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = 6105769873533293432L;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"HoodieMetadataBloomFilter\",\"namespace\":\"org.apache.hudi.avro.model\",\"doc\":\"Data file bloom filter details\",\"fields\":[{\"name\":\"type\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Bloom filter type code\"},{\"name\":\"timestamp\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Instant timestamp when this metadata was created/updated\"},{\"name\":\"bloomFilter\",\"type\":\"bytes\",\"doc\":\"Bloom filter binary byte array\"},{\"name\":\"isDeleted\",\"type\":\"boolean\",\"doc\":\"Bloom filter entry valid/deleted flag\"}]}");
public static 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 BinaryMessageDecoder instance 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
*/
public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver);
}
/** Serializes this HoodieMetadataBloomFilter to a ByteBuffer. */
public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
return ENCODER.encode(this);
}
/** Deserializes a HoodieMetadataBloomFilter from a ByteBuffer. */
public static HoodieMetadataBloomFilter fromByteBuffer(
java.nio.ByteBuffer b) throws java.io.IOException {
return DECODER.decode(b);
}
/** Bloom filter type code */
@Deprecated public java.lang.String type;
/** Instant timestamp when this metadata was created/updated */
@Deprecated public java.lang.String timestamp;
/** Bloom filter binary byte array */
@Deprecated public java.nio.ByteBuffer bloomFilter;
/** Bloom filter entry valid/deleted flag */
@Deprecated public boolean isDeleted;
/**
* 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 HoodieMetadataBloomFilter() {}
/**
* All-args constructor.
* @param type Bloom filter type code
* @param timestamp Instant timestamp when this metadata was created/updated
* @param bloomFilter Bloom filter binary byte array
* @param isDeleted Bloom filter entry valid/deleted flag
*/
public HoodieMetadataBloomFilter(java.lang.String type, java.lang.String timestamp, java.nio.ByteBuffer bloomFilter, java.lang.Boolean isDeleted) {
this.type = type;
this.timestamp = timestamp;
this.bloomFilter = bloomFilter;
this.isDeleted = isDeleted;
}
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 type;
case 1: return timestamp;
case 2: return bloomFilter;
case 3: return isDeleted;
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: type = (java.lang.String)value$; break;
case 1: timestamp = (java.lang.String)value$; break;
case 2: bloomFilter = (java.nio.ByteBuffer)value$; break;
case 3: isDeleted = (java.lang.Boolean)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'type' field.
* @return Bloom filter type code
*/
public java.lang.String getType() {
return type;
}
/**
* Sets the value of the 'type' field.
* Bloom filter type code
* @param value the value to set.
*/
public void setType(java.lang.String value) {
this.type = value;
}
/**
* Gets the value of the 'timestamp' field.
* @return Instant timestamp when this metadata was created/updated
*/
public java.lang.String getTimestamp() {
return timestamp;
}
/**
* Sets the value of the 'timestamp' field.
* Instant timestamp when this metadata was created/updated
* @param value the value to set.
*/
public void setTimestamp(java.lang.String value) {
this.timestamp = value;
}
/**
* Gets the value of the 'bloomFilter' field.
* @return Bloom filter binary byte array
*/
public java.nio.ByteBuffer getBloomFilter() {
return bloomFilter;
}
/**
* Sets the value of the 'bloomFilter' field.
* Bloom filter binary byte array
* @param value the value to set.
*/
public void setBloomFilter(java.nio.ByteBuffer value) {
this.bloomFilter = value;
}
/**
* Gets the value of the 'isDeleted' field.
* @return Bloom filter entry valid/deleted flag
*/
public java.lang.Boolean getIsDeleted() {
return isDeleted;
}
/**
* Sets the value of the 'isDeleted' field.
* Bloom filter entry valid/deleted flag
* @param value the value to set.
*/
public void setIsDeleted(java.lang.Boolean value) {
this.isDeleted = value;
}
/**
* Creates a new HoodieMetadataBloomFilter RecordBuilder.
* @return A new HoodieMetadataBloomFilter RecordBuilder
*/
public static org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder newBuilder() {
return new org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder();
}
/**
* Creates a new HoodieMetadataBloomFilter RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new HoodieMetadataBloomFilter RecordBuilder
*/
public static org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder newBuilder(org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder other) {
return new org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder(other);
}
/**
* Creates a new HoodieMetadataBloomFilter RecordBuilder by copying an existing HoodieMetadataBloomFilter instance.
* @param other The existing instance to copy.
* @return A new HoodieMetadataBloomFilter RecordBuilder
*/
public static org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder newBuilder(org.apache.hudi.avro.model.HoodieMetadataBloomFilter other) {
return new org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder(other);
}
/**
* RecordBuilder for HoodieMetadataBloomFilter instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
/** Bloom filter type code */
private java.lang.String type;
/** Instant timestamp when this metadata was created/updated */
private java.lang.String timestamp;
/** Bloom filter binary byte array */
private java.nio.ByteBuffer bloomFilter;
/** Bloom filter entry valid/deleted flag */
private boolean isDeleted;
/** 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.hudi.avro.model.HoodieMetadataBloomFilter.Builder other) {
super(other);
if (isValidValue(fields()[0], other.type)) {
this.type = data().deepCopy(fields()[0].schema(), other.type);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.timestamp)) {
this.timestamp = data().deepCopy(fields()[1].schema(), other.timestamp);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.bloomFilter)) {
this.bloomFilter = data().deepCopy(fields()[2].schema(), other.bloomFilter);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.isDeleted)) {
this.isDeleted = data().deepCopy(fields()[3].schema(), other.isDeleted);
fieldSetFlags()[3] = true;
}
}
/**
* Creates a Builder by copying an existing HoodieMetadataBloomFilter instance
* @param other The existing instance to copy.
*/
private Builder(org.apache.hudi.avro.model.HoodieMetadataBloomFilter other) {
super(SCHEMA$);
if (isValidValue(fields()[0], other.type)) {
this.type = data().deepCopy(fields()[0].schema(), other.type);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.timestamp)) {
this.timestamp = data().deepCopy(fields()[1].schema(), other.timestamp);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.bloomFilter)) {
this.bloomFilter = data().deepCopy(fields()[2].schema(), other.bloomFilter);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.isDeleted)) {
this.isDeleted = data().deepCopy(fields()[3].schema(), other.isDeleted);
fieldSetFlags()[3] = true;
}
}
/**
* Gets the value of the 'type' field.
* Bloom filter type code
* @return The value.
*/
public java.lang.String getType() {
return type;
}
/**
* Sets the value of the 'type' field.
* Bloom filter type code
* @param value The value of 'type'.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder setType(java.lang.String value) {
validate(fields()[0], value);
this.type = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'type' field has been set.
* Bloom filter type code
* @return True if the 'type' field has been set, false otherwise.
*/
public boolean hasType() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'type' field.
* Bloom filter type code
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder clearType() {
type = null;
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'timestamp' field.
* Instant timestamp when this metadata was created/updated
* @return The value.
*/
public java.lang.String getTimestamp() {
return timestamp;
}
/**
* Sets the value of the 'timestamp' field.
* Instant timestamp when this metadata was created/updated
* @param value The value of 'timestamp'.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder setTimestamp(java.lang.String value) {
validate(fields()[1], value);
this.timestamp = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'timestamp' field has been set.
* Instant timestamp when this metadata was created/updated
* @return True if the 'timestamp' field has been set, false otherwise.
*/
public boolean hasTimestamp() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'timestamp' field.
* Instant timestamp when this metadata was created/updated
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder clearTimestamp() {
timestamp = null;
fieldSetFlags()[1] = false;
return this;
}
/**
* Gets the value of the 'bloomFilter' field.
* Bloom filter binary byte array
* @return The value.
*/
public java.nio.ByteBuffer getBloomFilter() {
return bloomFilter;
}
/**
* Sets the value of the 'bloomFilter' field.
* Bloom filter binary byte array
* @param value The value of 'bloomFilter'.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder setBloomFilter(java.nio.ByteBuffer value) {
validate(fields()[2], value);
this.bloomFilter = value;
fieldSetFlags()[2] = true;
return this;
}
/**
* Checks whether the 'bloomFilter' field has been set.
* Bloom filter binary byte array
* @return True if the 'bloomFilter' field has been set, false otherwise.
*/
public boolean hasBloomFilter() {
return fieldSetFlags()[2];
}
/**
* Clears the value of the 'bloomFilter' field.
* Bloom filter binary byte array
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder clearBloomFilter() {
bloomFilter = null;
fieldSetFlags()[2] = false;
return this;
}
/**
* Gets the value of the 'isDeleted' field.
* Bloom filter entry valid/deleted flag
* @return The value.
*/
public java.lang.Boolean getIsDeleted() {
return isDeleted;
}
/**
* Sets the value of the 'isDeleted' field.
* Bloom filter entry valid/deleted flag
* @param value The value of 'isDeleted'.
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder setIsDeleted(boolean value) {
validate(fields()[3], value);
this.isDeleted = value;
fieldSetFlags()[3] = true;
return this;
}
/**
* Checks whether the 'isDeleted' field has been set.
* Bloom filter entry valid/deleted flag
* @return True if the 'isDeleted' field has been set, false otherwise.
*/
public boolean hasIsDeleted() {
return fieldSetFlags()[3];
}
/**
* Clears the value of the 'isDeleted' field.
* Bloom filter entry valid/deleted flag
* @return This builder.
*/
public org.apache.hudi.avro.model.HoodieMetadataBloomFilter.Builder clearIsDeleted() {
fieldSetFlags()[3] = false;
return this;
}
@Override
@SuppressWarnings("unchecked")
public HoodieMetadataBloomFilter build() {
try {
HoodieMetadataBloomFilter record = new HoodieMetadataBloomFilter();
record.type = fieldSetFlags()[0] ? this.type : (java.lang.String) defaultValue(fields()[0]);
record.timestamp = fieldSetFlags()[1] ? this.timestamp : (java.lang.String) defaultValue(fields()[1]);
record.bloomFilter = fieldSetFlags()[2] ? this.bloomFilter : (java.nio.ByteBuffer) defaultValue(fields()[2]);
record.isDeleted = fieldSetFlags()[3] ? this.isDeleted : (java.lang.Boolean) defaultValue(fields()[3]);
return record;
} catch (java.lang.Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
@SuppressWarnings("unchecked")
private static final org.apache.avro.io.DatumWriter
WRITER$ = (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.avro.io.DatumReader
READER$ = (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));
}
}