abstract class BucketMetadata[K1, K2, V] extends Serializable with HasDisplayData

Represents metadata in a JSON-serializable format to be stored alongside sorted-bucket files in a SortedBucketSink transform, and read/checked for compatibility in a SortedBucketSource transform.

Key encoding

BucketMetadata controls over how values are mapped to a key type (see: `[[#extractKeyPrimary(Object)]]`) and (see: `[[ #extractKeySecondary(Object)]]`), and how those bytes are encoded into byte[] (see: `[[ #getKeyBytesPrimary(Object)]]`, `[[#getKeyBytesSecondary(Object)]]`). Therefore, in order for two sources to be compatible in a `[[SortedBucketSource]]` transform, the `[[#keyClass]]` does not have to be the same, as long as the final byte encoding is equivalent. A `[[ #coderOverrides()]]` method is provided for any encoding overrides: for example, in Avro sources the `[[CharSequence]]` type should be encoded as a UTF-8 string.

Annotations
@JsonTypeInfo()
Source
BucketMetadata.java
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BucketMetadata
  2. HasDisplayData
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new BucketMetadata(version: Int, numBuckets: Int, numShards: Int, keyClass: Class[K1], keyClassSecondary: Class[K2], hashType: HashType, filenamePrefix: String)
  2. new BucketMetadata(version: Int, numBuckets: Int, numShards: Int, keyClass: Class[K1], keyClassSecondary: Class[K2], hashType: HashType)
  3. new BucketMetadata(version: Int, numBuckets: Int, numShards: Int, keyClass: Class[K1], hashType: HashType)

Abstract Value Members

  1. abstract def extractKeyPrimary(value: V): K1
  2. abstract def extractKeySecondary(value: V): K2

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  6. def coderOverrides(): Map[Class[_ <: AnyRef], Coder[_ <: AnyRef]]
    Annotations
    @JsonIgnore()
  7. def compatibleMetadataTypes(): Set[Class[_ <: BucketMetadata]]
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  11. def getFilenamePrefix(): String
  12. def getHashType(): HashType
  13. def getKeyClass(): Class[K1]
  14. def getKeyClassSecondary(): Class[K2]
  15. def getKeyCoder(): Coder[K1]
    Annotations
    @JsonIgnore()
  16. def getKeyCoderSecondary(): Coder[K2]
    Annotations
    @JsonIgnore()
  17. def getNumBuckets(): Int
  18. def getNumShards(): Int
  19. def getVersion(): Int
  20. def hasSecondaryKey(): Boolean
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def isPartitionCompatibleForPrimaryAndSecondaryKey(other: BucketMetadata): Boolean
  24. def isPartitionCompatibleForPrimaryKey(other: BucketMetadata): Boolean
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  28. def populateDisplayData(builder: Builder): Unit
    Definition Classes
    BucketMetadata → HasDisplayData
    Annotations
    @Override()
  29. def primaryAndSecondaryComparableKeyBytes(value: V): ComparableKeyBytes
  30. def primaryComparableKeyBytes(value: V): ComparableKeyBytes
  31. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    BucketMetadata → AnyRef → Any
    Annotations
    @Override()
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from HasDisplayData

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped