<commit_before>/*!
 * node-hbase-client - lib/client.js
 * Copyright(c) 2013 fengmk2 <<EMAIL>>
 * MIT Licensed
 */

"use strict";

/**
 * Module dependencies.
 */

var debug = require('debug')('hbase:client');
var EventEmitter = require('events').EventEmitter;
var HRegionInfo = require('./hregion_info');
var HRegionLocation = require('./hregion_location');
var ZooKeeperWatcher = require('zookeeper-watcher');
var EventEmitter = require('events').EventEmitter;
var util = require('util');
var Bytes = require('./util/bytes');
var DataOutputBuffer = require('./data_output_buffer');
var DataInputBuffer = require('./data_input_buffer');
var HConstants = require('./hconstants');
var Connection = require('./connection');
var errors = require('./errors');
var TableNotFoundException = errors.TableNotFoundException;
var IOException = errors.IOException;
var Get = require('./get');
var Put = require('./put');
var Delete = require('./delete');
var Scanner = require('./scanner');
var Scan = require('./scan');
var utility = require('utility');
var MultiResponse = require('./multi_response');
var EventProxy = require('eventproxy');
var Pair = require('./pair');
var MultiAction = require('./multi_action');
var Action = require('./action');

/**
 * This character is used as separator between server hostname, port and
 * startcode.
 */
var SERVERNAME_SEPARATOR = ",";

function Client(options) {
  if (!(this instanceof Client)) {
    return new Client(options);
  }
  EventEmitter.call(this);

  this.in = null;
  this.out = null;
  this.socket = null;
  this.logger = options.logger || console;
  this.zk = new ZooKeeperWatcher({
    hosts: options.zookeeperHosts,<commit_msg>add rpcTimeout<commit_after>/*!
 * node-hbase-client - lib/client.js
 * Copyright(c) 2013 fengmk2 <<EMAIL>>
 * MIT Licensed
 */

"use strict";

/**
 * Module dependencies.
 */

var debug = require('debug')('hbase:client');
var EventEmitter = require('events').EventEmitter;
var HRegionInfo = require('./hregion_info');
var HRegionLocation = require('./hregion_location');
var ZooKeeperWatcher = require('zookeeper-watcher');
var EventEmitter = require('events').EventEmitter;
var util = require('util');
var Bytes = require('./util/bytes');
var DataOutputBuffer = require('./data_output_buffer');
var DataInputBuffer = require('./data_input_buffer');
var HConstants = require('./hconstants');
var Connection = require('./connection');
var errors = require('./errors');
var TableNotFoundException = errors.TableNotFoundException;
var IOException = errors.IOException;
var Get = require('./get');
var Put = require('./put');
var Delete = require('./delete');
var Scanner = require('./scanner');
var Scan = require('./scan');
var utility = require('utility');
var MultiResponse = require('./multi_response');
var EventProxy = require('eventproxy');
var Pair = require('./pair');
var MultiAction = require('./multi_action');
var Action = require('./action');

/**
 * This character is used as separator between server hostname, port and
 * startcode.
 */
var SERVERNAME_SEPARATOR = ",";

function Client(options) {
  if (!(this instanceof Client)) {
    return new Client(options);
  }
  EventEmitter.call(this);
  this.rpcTimeout = options.rpcTimeout;
  this.in = null;
  this.out = null;
  this.socket = null;
  this.logger = options.logger || console;
  this.zk = new ZooKeeperWatcher({
    hosts: options.zookeeperHosts,
{'fraction_non_alphanumeric': 0.16470588235294117, 'fraction_numerical': 0.0029411764705882353, 'mean_word_length': 5.051601423487544, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1144772', 'n_tokens_mistral': 977, 'n_tokens_neox': 965, 'n_words': 260}