my node.js hbase代码不检索数据

chhkpiq4  于 2021-06-09  发布在  Hbase
关注(0)|答案(0)|浏览(174)

我使用hbase和node.js。我写代码:

var hbase = require('hbase');
http = require('http');
http.createServer(function (request, response) {
hbase()
  .getRow('DatosBicing', '1*')
  .get('datos:bikes',  function(error, value){
          console.log('get');
          console.log(value);
          console.log('get 1');
          response.end();

  }); 

   }).listen(8000,'localhost');

此代码不检索行。它检索null。跟踪消息包括:

[cloudera@localhost ejemplos]$ node  pruebahbase11.js
get
null
get 1

hbase表数据包括:

hbase(main):003:0> scan 'DatosBicing', {LIMIT => 1, FILTER => "PrefixFilter ('1')"}
ROW                                         COLUMN+CELL                                                                                                                 
1                                          column=datos:bikes, timestamp=2752014145010832, value=22                                                                    
1                                          column=datos:height, timestamp=2752014145010832, value=21                                                                  
1                                          column=datos:lat, timestamp=2752014145010832,       value=41.3979520                                                              
1                                          column=datos:long, timestamp=2752014145010832, value=2.18004200                                                             
1                                          column=datos:nearby, timestamp=2752014145010832, value=24*369*387*426                                                       
1                                          column=datos:slots, timestamp=2752014145010832, value=2                                                                     
1                                          column=datos:status, timestamp=2752014145010832, value=OPN                                                                  
1                                          column=datos:street, timestamp=2752014145010832, value=Gran Via Corts Catalanes                                             
1                                          column=datos:streetNumber, timestamp=2752014145010832, value=760

0.0670秒内1行
为什么这个代码检索空值?。是否取决于HBA的配置?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题