为什么Hbase只为单元格返回3个版本,无论我是否设置{VERSION = 100}

xmu*_*obi 4 hbase version

    v = data.getValues(XP_PHONE);
    for (int i = 0; i < v.length; i++) {
        put.add(COLFAM, COL_PHONE, i, Bytes.toBytes(v[i].trim()));
    }
Run Code Online (Sandbox Code Playgroud)

这是我使用的代码,电话号码应该是8或者更多,但是在提交了put之后,我只能在hbase shell中查看最新的3版本结果.为什么?以及如何解决它?

cod*_*Foo 6

创建表时,将设置可存储的最大版本数.最大版本的默认值为3:

http://hbase.apache.org/book/schema.versions.html

您可以更改现有表以更改最大版本数.

使用hshell:

hbase> alter 'table_foo', {NAME => 'column_fam_foo', VERSIONS => 100}
Run Code Online (Sandbox Code Playgroud)