hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mich Talebzadeh <mich.talebza...@gmail.com>
Subject Reading specific column family and columns in Hbase table through spark
Date Thu, 29 Dec 2016 12:10:02 GMT

I have a routine in Spark that iterates  through Hbase rows and tries to
read columns.

My question is how can I read the correct ordering of columns?


val hBaseRDD = sc.newAPIHadoopRDD(conf, classOf[TableInputFormat],

val parsed = hBaseRDD.map{ case(b, a) => val iter = a.list().iterator();
            ( Bytes.toString(a.getRow()).toString,
            Bytes.toString( iter.next().getValue()).toString,
            Bytes.toString( iter.next().getValue()).toString,
            Bytes.toString( iter.next().getValue()).toString,

The above reads the column family columns sequentially. How can I force it
to read specific columns only?


Dr Mich Talebzadeh

LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw


*Disclaimer:* Use it at your own risk. Any and all responsibility for any
loss, damage or destruction of data or any other property which may arise
from relying on this email's technical content is explicitly disclaimed.
The author will in no case be liable for any monetary damages arising from
such loss, damage or destruction.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message