Module: HbaseClient

Defined in:
lib/version.rb,
lib/hbase-client.rb,
lib/hbase-client/client.rb,
lib/hbase-client/config.rb,
lib/hbase-client/adapters.rb,
lib/hbase-client/thrift/hbase.rb,
lib/hbase-client/thrift/hbase_types.rb,
lib/hbase-client/thrift/hbase_constants.rb

Defined Under Namespace

Modules: Adapters, Thrift Classes: Client

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.configObject



9
10
11
# File 'lib/hbase-client/config.rb', line 9

def config
  @@config ||= {}
end

.configure(opts = {}) ⇒ Object



3
4
5
6
7
# File 'lib/hbase-client/config.rb', line 3

def configure(opts = {})
  default_configuration.each do |key, value|
    config[key] = opts[key] || value
  end
end

.default_configurationObject



15
16
17
18
19
20
21
22
23
24
# File 'lib/hbase-client/config.rb', line 15

def default_configuration
  {
    logger: Logger.new(nil),
    adapter: Adapters::THRIFT,
    host: 'localhost',
    port: 9090,
    transport: ::Thrift::BufferedTransport,
    protocol: ::Thrift::BinaryProtocol
  }
end