HBase Shell缓慢放入几行表中(独立模式)

时间:2019-02-08 14:41:04

标签: hadoop hbase

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

插入 PUT 的插入必须花费10秒或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>

1 个答案:

答案 0 :(得分:0)

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