首页 > 解决方案 > HBase shell慢放几行表(单机模式)

问题描述

我有一个独立模式的 Hbase 1.4.9,在 ubuntu 18.04.1 LTS 上运行,4GB 的 RAM,几乎是空的表“summations”

带有PUT的插入必须花费 10 秒或更长时间,并且几次尝试以毫秒为单位。扫描也大部分时间也很慢。

这在独立模式下正常吗?或者有一些我必须调整的设置?

这是捕获并插入:

hbase(main):002:0> put 'summations','row5','reading:kWh_d_0',30
0 row(s) in 20.4030 seconds

这是扫描

hbase(main):003:0> scan 'summations'
ROW                   COLUMN+CELL
 daab-D035016215-2019 column=reading:kWh_d_45900, timestamp=1549635169098, value
 0110                 =7362.332
 daab-D035016215-2019 column=reading:kWh_r_45900, timestamp=1549635169098, value
 0110                 =0
 row1                 column=reading:kWh_d_0, timestamp=1549633002928, value=500
 row2                 column=reading:kWh_d_0, timestamp=1549633101719, value=500
 row3                 column=reading:kWh_d_0, timestamp=1549633184885, value=500
 row5                 column=reading:kWh_d_0, timestamp=1549635435618, value=30
5 row(s) in 0.0490 seconds

这是表的描述

hbase(main):004:0> describe 'summations'
Table summations is ENABLED
summations
COLUMN FAMILIES DESCRIPTION
{NAME => 'reading', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false',
 KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER',
 COMPRESSION => 'NONE', MIN_VERSIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE =>
'65536', REPLICATION_SCOPE => '0'}
1 row(s) in 10.1530 seconds

这是我的 hbase-site.xml 文件

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>
<property>
    <name>hbase.rootdir</name>
    <value>file:///home/user/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/user/zookeeper</value>
  </property>
  <property>
    <name>hbase.unsafe.stream.capability.enforce</name>
    <value>false</value>
    <description>
      Controls whether HBase will check for stream capabilities (hflush/hsync).

      Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
      with the 'file://' scheme, but be mindful of the NOTE below.

      WARNING: Setting this to false blinds you to potential data loss and
      inconsistent system state in the event of process and/or node failures. If
      HBase is complaining of an inability to use hsync or hflush it's most
      likely not a false positive.
    </description>
  </property>
  <property>
          <name>hbase.zookeeper.property.clientPort</name>
          <value>62181</value>
        </property>
        <property>
                <name>hbase.zookeeper.quorum</name>
                <value>192.168.2.223</value>
        </property>

</configuration>

标签: hadoophbase

解决方案


我尝试更改设置无济于事。重新安装 Hbase 即可解决问题。


推荐阅读