val cnvRDD = hbaseRDD.map{ case (_, result) =>
val key = Bytes.toString(result.getRow)
var sex: String = null
var age: String = null
var province: String = null
if (result.containsColumn("attr".getBytes, "population.sex".getBytes)) sex = Bytes.toString(result.getValue("attr".getBytes,"population.sex".getBytes))
if (result.containsColumn("attr".getBytes, "population.age".getBytes)) age = Bytes.toString(result.getValue("attr".getBytes,"population.age".getBytes))
if (result.containsColumn("attr".getBytes, "region.work_province".getBytes)) province = Bytes.toString(result.getValue("attr".getBytes,"region.work_province".getBytes))
(key.reverse, sex, age, province)
}
val ax = cnvRDD.take(20)
ax.foreach(println)