2

I am not able to update the value in hbase column family. The condition is - If variable cricketScore is not a number then update the value as "NA", otherwise update the value.

  cricketScore= 100F // isNaN -- > false
 // cricketScore = 0.0/0.0                                        // isNaN -- > true

 hTable.addColumn(Bytes.toBytes("cricket"), Bytes.toBytes("cricket_score"), Bytes.toBytes(cricketScore.isNaN ? "NA" : cricketScore.toString))

I am getting below error:

Cannot resolve overloaded method 'toBytes'

Cannot resolve symbol ?

Cannot resolve symbol cricketScore

May, I know the reason? and how to resolve this?

Nishu Tayal
  • 18,079
  • 8
  • 44
  • 90

0 Answers0