CassandraJavaRDD < CassandraRow > function ( String arg0 , String arg1 ) { RowReaderFactory < CassandraRow > loc0 = genericRowReaderFactory ( ) ; return cassandraTable ( arg0 , arg1 , loc0 , CassandraRow . class ) ; }
returns a view of a cassandra table as a cassandrajavardd . with this method , each row is converted to a cassandrarow object . example : create keyspace test with replication = ` class ' : ` simplestrategy ' , ` replication_factor ' : 1 ; create table test.words word text primary key , count int ; insert into test.words word , count values ` foo ' , 20 ; insert into test.words word , count values ` bar ' , 20 ; ... / / obtaining rdd of cassandrarow objects : cassandrajavardd rdd = cassandrajavautil.javafunctions jsc . cassandratable `` test '' , `` words '' ; rdd.first . getstring `` word '' ; / / foo rdd.first . getint `` count '' ; / / 20 concode_field_sep SparkContext sparkContext concode_elem_sep SparkContextFunctions scf concode_field_sep CassandraJavaRDD<T> toJavaRDD