get_table

Definition

Locates a table by the given name and returns it as an object, available for user manipulations. All subsequent operations can be applied to this object, without specifying the table name.

Usage

<object_name> = get_table '[<namespace_name>:]<table_name>'
Arguments
Parameter Description

object_name

A name of the variable, which will refer to the table and allow to call it without specifying its name

namespace_name

A namespace name

table_name

A table name

Examples

hbase(main):025:0> t1 = get_table 't1'
Took 0.0003 seconds
=> Hbase::Table - t1
hbase(main):027:0> t1.describe
Table t1 is ENABLED
t1
COLUMN FAMILIES DESCRIPTION
{NAME => 'cf1', VERSIONS => '1', EVICT_BLOCKS_ON_CLOSE => 'false', NEW_VERSION_BEHAVIOR => 'false', KEEP_DELETED_CELLS => 'FALSE', CACHE_DATA_ON_WRITE => 'fa
lse', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', MIN_VERSIONS => '0', REPLICATION_SCOPE => '0', BLOOMFILTER => 'ROW', CACHE_INDEX_ON_WRITE => 'false',
IN_MEMORY => 'false', CACHE_BLOOMS_ON_WRITE => 'false', PREFETCH_BLOCKS_ON_OPEN => 'false', COMPRESSION => 'NONE', BLOCKCACHE => 'true', BLOCKSIZE => '65536'
}
{NAME => 'cf2', VERSIONS => '1', EVICT_BLOCKS_ON_CLOSE => 'false', NEW_VERSION_BEHAVIOR => 'false', KEEP_DELETED_CELLS => 'FALSE', CACHE_DATA_ON_WRITE => 'fa
lse', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', MIN_VERSIONS => '0', REPLICATION_SCOPE => '0', BLOOMFILTER => 'ROW', CACHE_INDEX_ON_WRITE => 'false',
IN_MEMORY => 'false', CACHE_BLOOMS_ON_WRITE => 'false', PREFETCH_BLOCKS_ON_OPEN => 'false', COMPRESSION => 'NONE', BLOCKCACHE => 'true', BLOCKSIZE => '65536'
}
2 row(s)
Took 0.0223 seconds
hbase(main):030:0> t1.put 'r1', 'cf1:c1', 'v2'
Took 0.0051 seconds
Found a mistake? Seleсt text and press Ctrl+Enter to report it