I have an application where a function needs access to the results of a
select from a parquet database. Creating a JavaSQLContext and from it
a JavaSchemaRDD
as shown below works but the parallelism is not needed - a simple JDBC call
would work -
Are there alternative non-parallel ways to achieve the same result
JavaSQLContext sqlContext = <application code>
JavaSchemaRDD parquetFile = sqlContext.parquetFile("MyDatabase);
parquetFile.registerAsTable("peptides");
JavaSchemaRDD binCounts = sqlContext.sql("SELECT * FROM " + "peptides"
+ " Where massBin = " + mzAsInt);
Iterator<Row> rowIterator = binCounts.toLocalIterator();
while (rowIterator.hasNext()) {
Row rw = rowIterator.next();
... <application code>
}