object MapRDBSpark
MapRDBSpark is a static class which contains factory methods to create scala's ojai document and partitioner objects.
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.
- Alphabetic
- By Inheritance
- MapRDBSpark
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
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.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
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.
-
def
newDocument(): OJAIDocument
Factory function to create a new OJAIDocument from org.ojai.Document.
-
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
-
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.
-
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
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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.
-
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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
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.