Update scanner.js
fixes parameter
Could you provide more explanation, what's wrong with the current implementation, if params.batch is undefined or null, it default to "1000" ?
I saw batch option at this page. However, it seems that the parameters that finally be sent to server do not include the batch option.
Not sure how your pull request could fix anything, please send me an associated test case illustrating the issue
https://github.com/adaltas/node-hbase/blob/ba72f40d8d58893493d308d3324ff0ad2740a2e5/lib/scanner.js#L33
params = {};
if (params.batch == null) {
params.batch = 1000;
}
Without a test case, I think I can fully explain. Because params object does not nave batch
property, IF statement doesn't mean anything.
In addition, this.options variable contains attributes for scanner. If you allow users to use batch attribute, I think this value should be imported from here.
https://github.com/adaltas/node-hbase/blob/ba72f40d8d58893493d308d3324ff0ad2740a2e5/lib/scanner.js#L129
I don't trust this function because it sometimes behaves oddly.
Therefore, I could not help but implement a logic to get all of record from hbase. At this case, the batch s parameter is very important option.
I would like to say the problem of that function, but I wouldn't comment on it if you might know.
@wdavidw Can we close this PR ?