Sha256: 3aa342db4c90317eb29a990f24dc4a66aae35f431822f7472e230dd88bc5e668
Contents?: true
Size: 497 Bytes
Versions: 4
Compression:
Stored size: 497 Bytes
Contents
require 'thread' class HBase # @private module Admin private def with_admin (@admin_mutex ||= Mutex.new).synchronize do begin admin = HBaseAdmin.new(@config) yield admin ensure admin.close if admin end end end def wait_async_admin admin while true pair = admin.getAlterStatus(@name.to_java_bytes) yet = pair.getFirst total = pair.getSecond break if yet == 0 sleep 1 end end end#Admin end#HBase
Version data entries
4 entries across 4 versions & 1 rubygems