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]) @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. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def getFilenamePrefix(): String
  13. def getHashType(): HashType
  14. def getKeyClass(): Class[K1]
  15. def getKeyClassSecondary(): Class[K2]
  16. def getKeyCoder(): Coder[K1]
    Annotations
    @JsonIgnore()
  17. def getKeyCoderSecondary(): Coder[K2]
    Annotations
    @JsonIgnore()
  18. def getNumBuckets(): Int
  19. def getNumShards(): Int
  20. def getVersion(): Int
  21. def hasSecondaryKey(): Boolean
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def isPartitionCompatibleForPrimaryAndSecondaryKey(other: BucketMetadata): Boolean
  25. def isPartitionCompatibleForPrimaryKey(other: BucketMetadata): Boolean
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. def populateDisplayData(builder: Builder): Unit
    Definition Classes
    BucketMetadata → HasDisplayData
    Annotations
    @Override()
  30. def primaryAndSecondaryComparableKeyBytes(value: V): ComparableKeyBytes
  31. def primaryComparableKeyBytes(value: V): ComparableKeyBytes
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    BucketMetadata → AnyRef → Any
    Annotations
    @Override()
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from HasDisplayData

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped