Package org.projectnessie.gc.base
Class ImmutableGCParams
- java.lang.Object
-
- org.projectnessie.gc.base.ImmutableGCParams
-
- All Implemented Interfaces:
Serializable,GCParams
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableGCParams extends Object implements GCParams
Immutable implementation ofGCParams.Use the builder to create immutable instances:
ImmutableGCParams.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableGCParams.BuilderBuilds instances of typeImmutableGCParams.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableGCParams.Builderbuilder()Creates a builder forImmutableGCParams.static ImmutableGCParamscopyOf(GCParams instance)Creates an immutable copy of aGCParamsvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableGCParamsthat have equal attribute values.LonggetBloomFilterExpectedEntries()Optional bloom filter expected live commits entries per reference.doublegetBloomFilterFpp()Optional bloom filter fpp.DurationgetCommitProtectionDuration()Commit protection duration to avoid expiring on going or recent commits.com.google.common.collect.ImmutableMap<String,Instant>getCutOffTimestampPerRef()Optional cutoff time per live reference.InstantgetDeadReferenceCutOffTimeStamp()Optional cutoff time for all the dead references.InstantgetDefaultCutOffTimestamp()Default cutoff time for all the references.StringgetNessieCatalogName()Nessie catalog name to be used with spark to create the output results table.com.google.common.collect.ImmutableMap<String,String>getNessieClientConfigs()Nessie client configurations fromNessieConfigConstants.StringgetOutputBranchName()Branch's name to be used for creating the output table.StringgetOutputTableIdentifier()Output table identifier (namespace and table name) to be used for storing the results ingetOutputBranchName().IntegergetSparkPartitionsCount()Optional spark partitions count to be used for distributing references.inthashCode()Computes a hash code from attributes:nessieClientConfigs,cutOffTimestampPerRef,defaultCutOffTimestamp,deadReferenceCutOffTimeStamp,sparkPartitionsCount,commitProtectionDuration,bloomFilterExpectedEntries,bloomFilterFpp,nessieCatalogName,outputBranchName,outputTableIdentifier.StringtoString()Prints the immutable valueGCParamswith attribute values.ImmutableGCParamswithBloomFilterExpectedEntries(Long value)Copy the current immutable object by setting a value for thebloomFilterExpectedEntriesattribute.ImmutableGCParamswithBloomFilterFpp(double value)Copy the current immutable object by setting a value for thebloomFilterFppattribute.ImmutableGCParamswithCommitProtectionDuration(Duration value)Copy the current immutable object by setting a value for thecommitProtectionDurationattribute.ImmutableGCParamswithCutOffTimestampPerRef(Map<String,? extends Instant> entries)Copy the current immutable object by replacing thecutOffTimestampPerRefmap with the specified map.ImmutableGCParamswithDeadReferenceCutOffTimeStamp(Instant value)Copy the current immutable object by setting a value for thedeadReferenceCutOffTimeStampattribute.ImmutableGCParamswithDefaultCutOffTimestamp(Instant value)Copy the current immutable object by setting a value for thedefaultCutOffTimestampattribute.ImmutableGCParamswithNessieCatalogName(String value)Copy the current immutable object by setting a value for thenessieCatalogNameattribute.ImmutableGCParamswithNessieClientConfigs(Map<String,? extends String> entries)Copy the current immutable object by replacing thenessieClientConfigsmap with the specified map.ImmutableGCParamswithOutputBranchName(String value)Copy the current immutable object by setting a value for theoutputBranchNameattribute.ImmutableGCParamswithOutputTableIdentifier(String value)Copy the current immutable object by setting a value for theoutputTableIdentifierattribute.ImmutableGCParamswithSparkPartitionsCount(Integer value)Copy the current immutable object by setting a value for thesparkPartitionsCountattribute.
-
-
-
Method Detail
-
getNessieClientConfigs
public com.google.common.collect.ImmutableMap<String,String> getNessieClientConfigs()
Nessie client configurations fromNessieConfigConstants.- Specified by:
getNessieClientConfigsin interfaceGCParams
-
getCutOffTimestampPerRef
@Nullable public com.google.common.collect.ImmutableMap<String,Instant> getCutOffTimestampPerRef()
Optional cutoff time per live reference.- Specified by:
getCutOffTimestampPerRefin interfaceGCParams
-
getDefaultCutOffTimestamp
public Instant getDefaultCutOffTimestamp()
Default cutoff time for all the references.- Specified by:
getDefaultCutOffTimestampin interfaceGCParams
-
getDeadReferenceCutOffTimeStamp
@Nullable public Instant getDeadReferenceCutOffTimeStamp()
Optional cutoff time for all the dead references.- Specified by:
getDeadReferenceCutOffTimeStampin interfaceGCParams
-
getSparkPartitionsCount
@Nullable public Integer getSparkPartitionsCount()
Optional spark partitions count to be used for distributing references. Default total reference count (live + dead) will be used.- Specified by:
getSparkPartitionsCountin interfaceGCParams
-
getCommitProtectionDuration
public Duration getCommitProtectionDuration()
Commit protection duration to avoid expiring on going or recent commits. Default is 2 hours.- Specified by:
getCommitProtectionDurationin interfaceGCParams
-
getBloomFilterExpectedEntries
@Nullable public Long getBloomFilterExpectedEntries()
Optional bloom filter expected live commits entries per reference. Default is total commits in the default reference.- Specified by:
getBloomFilterExpectedEntriesin interfaceGCParams
-
getBloomFilterFpp
public double getBloomFilterFpp()
Optional bloom filter fpp. Default value is 0.03d.- Specified by:
getBloomFilterFppin interfaceGCParams
-
getNessieCatalogName
public String getNessieCatalogName()
Nessie catalog name to be used with spark to create the output results table.- Specified by:
getNessieCatalogNamein interfaceGCParams
-
getOutputBranchName
public String getOutputBranchName()
Branch's name to be used for creating the output table.If the branch doesn't exist for this name, branch with this name pointing to beginning of time (aka NO_ANCESTOR hash) will be created.
- Specified by:
getOutputBranchNamein interfaceGCParams
-
getOutputTableIdentifier
public String getOutputTableIdentifier()
Output table identifier (namespace and table name) to be used for storing the results ingetOutputBranchName().- Specified by:
getOutputTableIdentifierin interfaceGCParams
-
withNessieClientConfigs
public final ImmutableGCParams withNessieClientConfigs(Map<String,? extends String> entries)
Copy the current immutable object by replacing thenessieClientConfigsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the nessieClientConfigs map- Returns:
- A modified copy of
thisobject
-
withCutOffTimestampPerRef
public final ImmutableGCParams withCutOffTimestampPerRef(@Nullable Map<String,? extends Instant> entries)
Copy the current immutable object by replacing thecutOffTimestampPerRefmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the cutOffTimestampPerRef map- Returns:
- A modified copy of
thisobject
-
withDefaultCutOffTimestamp
public final ImmutableGCParams withDefaultCutOffTimestamp(Instant value)
Copy the current immutable object by setting a value for thedefaultCutOffTimestampattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for defaultCutOffTimestamp- Returns:
- A modified copy of the
thisobject
-
withDeadReferenceCutOffTimeStamp
public final ImmutableGCParams withDeadReferenceCutOffTimeStamp(@Nullable Instant value)
Copy the current immutable object by setting a value for thedeadReferenceCutOffTimeStampattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deadReferenceCutOffTimeStamp (can benull)- Returns:
- A modified copy of the
thisobject
-
withSparkPartitionsCount
public final ImmutableGCParams withSparkPartitionsCount(@Nullable Integer value)
Copy the current immutable object by setting a value for thesparkPartitionsCountattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sparkPartitionsCount (can benull)- Returns:
- A modified copy of the
thisobject
-
withCommitProtectionDuration
public final ImmutableGCParams withCommitProtectionDuration(Duration value)
Copy the current immutable object by setting a value for thecommitProtectionDurationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for commitProtectionDuration- Returns:
- A modified copy of the
thisobject
-
withBloomFilterExpectedEntries
public final ImmutableGCParams withBloomFilterExpectedEntries(@Nullable Long value)
Copy the current immutable object by setting a value for thebloomFilterExpectedEntriesattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bloomFilterExpectedEntries (can benull)- Returns:
- A modified copy of the
thisobject
-
withBloomFilterFpp
public final ImmutableGCParams withBloomFilterFpp(double value)
Copy the current immutable object by setting a value for thebloomFilterFppattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bloomFilterFpp- Returns:
- A modified copy of the
thisobject
-
withNessieCatalogName
public final ImmutableGCParams withNessieCatalogName(String value)
Copy the current immutable object by setting a value for thenessieCatalogNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for nessieCatalogName- Returns:
- A modified copy of the
thisobject
-
withOutputBranchName
public final ImmutableGCParams withOutputBranchName(String value)
Copy the current immutable object by setting a value for theoutputBranchNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for outputBranchName- Returns:
- A modified copy of the
thisobject
-
withOutputTableIdentifier
public final ImmutableGCParams withOutputTableIdentifier(String value)
Copy the current immutable object by setting a value for theoutputTableIdentifierattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for outputTableIdentifier- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableGCParamsthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:nessieClientConfigs,cutOffTimestampPerRef,defaultCutOffTimestamp,deadReferenceCutOffTimeStamp,sparkPartitionsCount,commitProtectionDuration,bloomFilterExpectedEntries,bloomFilterFpp,nessieCatalogName,outputBranchName,outputTableIdentifier.
-
toString
public String toString()
Prints the immutable valueGCParamswith attribute values.
-
copyOf
public static ImmutableGCParams copyOf(GCParams instance)
Creates an immutable copy of aGCParamsvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable GCParams instance
-
builder
public static ImmutableGCParams.Builder builder()
Creates a builder forImmutableGCParams.ImmutableGCParams.builder() .putNessieClientConfigs|putAllNessieClientConfigs(String => String) //nessieClientConfigsmappings .cutOffTimestampPerRef(Map<String, java.time.Instant> | null) // nullablecutOffTimestampPerRef.defaultCutOffTimestamp(java.time.Instant) // requireddefaultCutOffTimestamp.deadReferenceCutOffTimeStamp(java.time.Instant | null) // nullabledeadReferenceCutOffTimeStamp.sparkPartitionsCount(Integer | null) // nullablesparkPartitionsCount.commitProtectionDuration(java.time.Duration) // optionalcommitProtectionDuration.bloomFilterExpectedEntries(Long | null) // nullablebloomFilterExpectedEntries.bloomFilterFpp(double) // optionalbloomFilterFpp.nessieCatalogName(String) // requirednessieCatalogName.outputBranchName(String) // requiredoutputBranchName.outputTableIdentifier(String) // requiredoutputTableIdentifier.build();- Returns:
- A new ImmutableGCParams builder
-
-