Sha256: 148e28d23a23c81595a7eff6d607f1cc036d7281fba70ed73a7055eb46993bf9

Contents?: true

Size: 871 Bytes

Versions: 5

Compression:

Stored size: 871 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift File.expand_path('..', __FILE__)
require 'helper'

class TestHBase < TestHBaseJRubyBase
  def test_tables
    assert @hbase.table_names.include?(TABLE)
    assert @hbase.tables.map(&:name).include?(TABLE)
  end

  def test_close
    @hbase.close

    # TODO: Still usable after close?
    assert @hbase.table_names.include?(TABLE)
    assert_equal 1, @table.put('rowkey' => { 'cf1:a' => 1 })
  end

  def test_admin
    assert_instance_of org.apache.hadoop.hbase.client.HBaseAdmin, @hbase.admin
    @hbase.admin do |admin|
      assert_instance_of org.apache.hadoop.hbase.client.HBaseAdmin, admin
    end
  end

  def test_config
    assert_instance_of org.apache.hadoop.conf.Configuration, @hbase.config
  end

  def test_shared_config
    hbase2 = HBase.new @hbase.config
    assert_equal @hbase.config, hbase2.config
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hbase-jruby-0.1.6-java test/test_hbase.rb
hbase-jruby-0.1.5-java test/test_hbase.rb
hbase-jruby-0.1.4-java test/test_hbase.rb
hbase-jruby-0.1.3-java test/test_hbase.rb
hbase-jruby-0.1.2-java test/test_hbase.rb