code: public <K> JavaPairRDD<K, Iterable<R>> spanBy(Function<R, K> f, ClassTag<K> keyClassTag) {
          return CassandraJavaUtil.javaFunctions(rdd()).spanBy(f, keyClassTag);
      }
docs: Applies a function to each item, and groups consecutive items having the same value together.
  Contrary to `groupBy`, items from the same group must be already next to each other in the
  original collection. Works locally on each partition, so items from different partitions will
  never be placed in the same group.