Class

io.snappydata.collection

DictionaryMap

Related Doc: package collection

Permalink

final class DictionaryMap extends ByteBufferHashMap

An extension of ByteBufferHashMap to store string keys. The dictionary index is stored as part of key bytes while the variable length string value is stored in the value bytes.

Linear Supertypes
ByteBufferHashMap, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DictionaryMap
  2. ByteBufferHashMap
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DictionaryMap(_initialCapacity: Int, _loadFactor: Double, _valueSize: Int, _allocator: BufferAllocator, _keyData: ByteBufferData = null, _valueData: ByteBufferData = null, _valueDataPosition: Long = 0L)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addDictionaryString(key: UTF8String): Int

    Permalink

    Add a new string to the map for dictionaries.

    Add a new string to the map for dictionaries. The key field has the index of the value i.e. (n - 1) for nth distinct string added to the map, with the offset into the value. The string itself is stored back to back in the value portion with its size at the start being variable length. This exactly matches the end format of the dictionary encoding that stores the dictionary string back-to-back in index order and expected by DictionaryDecoders. So the encoder can use the final value serialized array as is for putting into the encoded column batch (followed by the dictionary indexes of actual values themselves).

    The encoded values are read in the initialization of DictionaryDecoder and put into an array, and looked up by its readUTF8String method.

  5. val allocator: BufferAllocator

    Permalink
    Attributes
    protected
    Definition Classes
    ByteBufferHashMap
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. final def capacity: Int

    Permalink
    Definition Classes
    ByteBufferHashMap
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def duplicate(): DictionaryMap

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def getKeyData: ByteBufferData

    Permalink
    Definition Classes
    ByteBufferHashMap
  15. final def getValueData: ByteBufferData

    Permalink
    Definition Classes
    ByteBufferHashMap
  16. def handleExisting(mapKeyObject: AnyRef, mapKeyOffset: Long): Int

    Permalink
    Attributes
    protected
    Definition Classes
    DictionaryMapByteBufferHashMap
  17. def handleNew(mapKeyObject: AnyRef, mapKeyOffset: Long): Int

    Permalink
    Attributes
    protected
    Definition Classes
    DictionaryMapByteBufferHashMap
  18. final def handleNewInsert(): Unit

    Permalink

    Double the table's size and re-hash everything.

    Double the table's size and re-hash everything.

    Attributes
    protected
    Definition Classes
    ByteBufferHashMap
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. var keyData: ByteBufferData

    Permalink
    Attributes
    protected
    Definition Classes
    ByteBufferHashMap
  22. val loadFactor: Double

    Permalink
    Definition Classes
    ByteBufferHashMap
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def newInsert(baseObject: AnyRef, baseOffset: Long, numKeyBytes: Int, numBytes: Int): Int

    Permalink
    Attributes
    protected
    Definition Classes
    ByteBufferHashMap
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def putBufferIfAbsent(baseObject: AnyRef, baseOffset: Long, numKeyBytes: Int, numBytes: Int, hash: Int): Int

    Permalink

    Insert raw bytes with given hash code into the map if not present.

    Insert raw bytes with given hash code into the map if not present. The key bytes for comparison is assumed to be at the start having "numKeyBytes" size, while the total size including value is "numBytes". Normally one would have serialized form of key bytes followed by self-contained serialized form of value bytes (i.e. including its size).

    This method will handle writing only the 8 byte key header while any additional fixed-width bytes to be tracked in read/write should be taken care of in handleExisting and handleNew. These bytes are not part of key equality check itself.

    baseObject

    the base object for the bytes as required by Unsafe API

    baseOffset

    the base offset for the bytes as required by Unsafe API

    numKeyBytes

    number of bytes used by the key which should be at the start of "baseObject" with value after that

    numBytes

    the total number of bytes used by key and value together (excluding the four bytes of "numKeyBytes" itself)

    hash

    the hash code of key bytes

    Definition Classes
    ByteBufferHashMap
  28. final def release(): Unit

    Permalink
    Definition Classes
    ByteBufferHashMap
  29. final def reset(): Unit

    Permalink
    Definition Classes
    ByteBufferHashMap
  30. final def size: Int

    Permalink
    Definition Classes
    ByteBufferHashMap
  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. var valueData: ByteBufferData

    Permalink
    Attributes
    protected
    Definition Classes
    ByteBufferHashMap
  34. var valueDataPosition: Long

    Permalink
    Attributes
    protected
    Definition Classes
    ByteBufferHashMap
  35. final def valueDataSize: Long

    Permalink
    Definition Classes
    ByteBufferHashMap
  36. val valueSize: Int

    Permalink
    Attributes
    protected
    Definition Classes
    ByteBufferHashMap
  37. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ByteBufferHashMap

Inherited from AnyRef

Inherited from Any

Ungrouped