Sha256: e9448dc2d5ccce985158f2bbf73f2af040c03fb4cfa9ef42099ae7d140dfbeef

Contents?: true

Size: 563 Bytes

Versions: 29

Compression:

Stored size: 563 Bytes

Contents

class HBase
# @private
module Admin
private
  def with_admin
    check_closed

    begin
      admin = HBaseAdmin.new(@config)
      yield admin
    ensure
      admin.close if admin
    end
  end

  def wait_async_admin admin, &block
    prev_yet = nil
    while true
      pair  = admin.getAlterStatus(@name.to_java_bytes)
      yet   = pair.getFirst
      total = pair.getSecond

      if block && yet != prev_yet
        block.call(total - yet, total)
        prev_yet = yet
      end

      break if yet == 0
      sleep 1
    end
  end
end#Admin
end#HBase

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
hbase-jruby-0.7.1-java lib/hbase-jruby/admin.rb
hbase-jruby-0.7.0-java lib/hbase-jruby/admin.rb
hbase-jruby-0.6.4-java lib/hbase-jruby/admin.rb
hbase-jruby-0.6.3-java lib/hbase-jruby/admin.rb
hbase-jruby-0.6.2-java lib/hbase-jruby/admin.rb
hbase-jruby-0.6.1-java lib/hbase-jruby/admin.rb
hbase-jruby-0.6.0-java lib/hbase-jruby/admin.rb
hbase-jruby-0.5.1-java lib/hbase-jruby/admin.rb
hbase-jruby-0.5.0-java lib/hbase-jruby/admin.rb
hbase-jruby-0.4.6-java lib/hbase-jruby/admin.rb
hbase-jruby-0.4.5-java lib/hbase-jruby/admin.rb
hbase-jruby-0.4.4-java lib/hbase-jruby/admin.rb
hbase-jruby-0.4.3-java lib/hbase-jruby/admin.rb
hbase-jruby-0.4.2-java lib/hbase-jruby/admin.rb
hbase-jruby-0.4.1-java lib/hbase-jruby/admin.rb
hbase-jruby-0.4.0-java lib/hbase-jruby/admin.rb
hbase-jruby-0.3.5-java lib/hbase-jruby/admin.rb
hbase-jruby-0.3.4-java lib/hbase-jruby/admin.rb
hbase-jruby-0.3.3-java lib/hbase-jruby/admin.rb
hbase-jruby-0.3.2-java lib/hbase-jruby/admin.rb