public < K > CassandraJavaPairRDD < K , R > keyBy ( ClassTag < K > keyClassTag , RowReaderFactory < K > rrf , RowWriterFactory < K > rwf , ColumnRef ... columns ) { Seq < ColumnRef > columnRefs = JavaApiHelper . toScalaSeq ( columns ) ; CassandraRDD < Tuple2 < K , R > > resultRDD = columns . length == 0 ? rdd ( ) . keyBy ( keyClassTag , rrf , rwf ) : rdd ( ) . keyBy ( columnRefs , keyClassTag , rrf , rwf ) ; return new CassandraJavaPairRDD <> ( resultRDD , keyClassTag , classTag ( ) ) ; }
Selects a subset of columns mapped to the key of a JavaPairRDD . The selected columns must be available in the CassandraRDD . If no selected columns are given all available columns are selected .