adaltas / node-hbase

Asynchronous HBase client for NodeJs using REST

Home Page:https://hbase.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scan with support of batch/startTime/endTime options

cccvvv2012 opened this issue · comments

It said in document it support batch/startTime/endTime options but it actually did not support.
Related JS codes need to update.

scanner.js
Scanner.prototype.init = function(callback) {
params = {};
  if (params.batch == null) {
    params.batch = 1000;
  }
key = "/" + this.options.table + "/scanner";
  encoding
}

after update(I just write js codes not coffee script)

scanner.js
Scanner.prototype.init = function(callback) {
params = {};
//update for batch options 
 params.batch = isNaN(this.options.batch)?1000: Number(this.options.batch);
key = "/" + this.options.table + "/scanner";
encoding = this.options.encoding === 'undefined' ? this.options.encoding : this.client.options.encoding;
//update for startTime/endTime options 
 if (this.options.startTime) {
    params.startTime = this.options.startTime;
  }
  if (this.options.endTime) {
    params.endTime = this.options.endTime;
  }
}

closing after #47