If the given query supports it, this RDD will read data directly from the
MemSQL cluster's leaf nodes rather than from the master aggregator, which
typically results in much faster reads. However, if the given query does
not support this (e.g. queries involving joins or GROUP BY operations), the
results will be returned in a single partition.
cluster
A connected MemSQLCluster instance.
sql
The text of the query. Can be a prepared statement template,
in which case parameters from sqlParams are substituted.
sqlParams
The parameters of the query if sql is a template.
databaseName
Optionally provide a database name for this RDD.
This is required for Partition Pushdown
mapRow
A function from a ResultSet to a single row of the desired
result type(s). This should only call getInt, getString, etc; the RDD
takes care of calling next. The default maps a ResultSet to an array of
Any.
An org.apache.spark.rdd.RDD that can read data from a MemSQL database based on a SQL query.
If the given query supports it, this RDD will read data directly from the MemSQL cluster's leaf nodes rather than from the master aggregator, which typically results in much faster reads. However, if the given query does not support this (e.g. queries involving joins or GROUP BY operations), the results will be returned in a single partition.
A connected MemSQLCluster instance.
The text of the query. Can be a prepared statement template, in which case parameters from sqlParams are substituted.
The parameters of the query if sql is a template.
Optionally provide a database name for this RDD. This is required for Partition Pushdown
A function from a ResultSet to a single row of the desired result type(s). This should only call getInt, getString, etc; the RDD takes care of calling next. The default maps a ResultSet to an array of Any.