Object

com.mapr.db.spark

MapRDBSpark

Related Doc: package spark

Permalink

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

    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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def docToRow(ojaiDoc: OJAIDocument, schema: StructType): Row

    Permalink

    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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def newDocument(jsonString: String): OJAIDocument

    Permalink

    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.

  15. def newDocument(): OJAIDocument

    Permalink

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

  16. def newDocument(doc: Document): OJAIDocument

    Permalink

    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

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

    Permalink

    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.

  18. def newPartitioner[T](table: String)(implicit arg0: OJAIKEY[T]): Partitioner

    Permalink

    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

  19. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  21. def rowToDoc(row: Row): OJAIDocument

    Permalink

    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.

  22. def serializableBinaryValue(buff: ByteBuffer): DBBinaryValue

    Permalink

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

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

    buff

    ByteBuffer

  23. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped