Packages

o

com.mapr.db.spark

MapRDBSpark

object MapRDBSpark

MapRDBSpark is a static class which contains factory methods to create scala's ojai document and partitioner objects.

Example:
  1. Factory functions to help create scala's ojai documents val doc = MapRDBSpark.newDocument(jsonString) val doc = MapRDBSpark.newDocument(document: org.ojai.Document) Here are the ways to access elements in OJAIDocument val partitioner = MapRDBSpark.newPartitioner(tableName) It creates a partitioiner using the splits specified in tableName. val partitioner = MapRDBSpark.newPartitioner(Seq("AA","CC")) It creates a partitioner using the splits provided in the sequence. Here three splits will be created (null, "AA") , ("AA","CC") and ("CC", null) Note that this call assumes that user supplies the splits in sorted order.

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

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( ... ) @native() @HotSpotIntrinsicCandidate()
  6. def docToRow(ojaiDoc: OJAIDocument, schema: StructType): Row

    A function to convert an OJAI Document to Spark's Row format.

    A function to convert an OJAI Document to Spark's Row format.

    ojaiDoc

    OJAI Document to be converted to Spark's Row format.

    schema

    Schema for the Row.

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def newDocument(jsonString: String): OJAIDocument

    Factory function to create a new OJAIDocument from a json string.

    Factory function to create a new OJAIDocument from a json string.

    jsonString

    a json document.

  14. def newDocument(): OJAIDocument

    Factory function to create a new OJAIDocument from org.ojai.Document.

  15. def newDocument(doc: Document): OJAIDocument

    Factory function to create a new OJAIDocument from org.ojai.Document.

    Factory function to create a new OJAIDocument from org.ojai.Document.

    doc

    org.ojai.Document

  16. def newPartitioner[T](splits: Seq[T])(implicit arg0: OJAIKEY[T]): MapRDBSplitPartitioner[T]

    Factory function to create a new partitioner from splits provided as sequence.

    Factory function to create a new partitioner from splits provided as sequence.

    splits

    a sequence of splits Splits supported at this point are String and ByteBuffer. It is user's responsibility to supply the splits in ascending order.

  17. def newPartitioner[T](table: String, bufferWrites: Boolean = true)(implicit arg0: OJAIKEY[T]): Partitioner

    Factory function to create a new partitioner using existing MapRDBTable.

    Factory function to create a new partitioner using existing MapRDBTable.

    table

    existing tableName in MapRDB

  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def rowToDoc(row: Row): OJAIDocument

    A function to convert a Spark's ROW to OJAIDocument.

    A function to convert a Spark's ROW to OJAIDocument.

    row

    Spark's Dataframe or Dataset Row.

  21. def serializableBinaryValue(buff: ByteBuffer): DBBinaryValue

    Factory function to convert a ByteBuffer into a serializable binary value.

    Factory function to convert a ByteBuffer into a serializable binary value.

    buff

    ByteBuffer

  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

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

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped