How can I use the HBASE Shell to create a table with pre splitting and compression or other options

后端 未结 1 1894
囚心锁ツ
囚心锁ツ 2021-02-14 06:47

In the HBase shell, the help file shows us that there are several allowable syntaxes for creating a table:

 create \'tableName\', {NAME => \'colFamily\', VER         


        
相关标签:
1条回答
  • 2021-02-14 07:07

    What eventually became clear after experimentation was that the Shell syntax will accept a set of Column Family dictionaries, and the SPLIT dictionary is really its own animal (which makes sense as it modifies the whole table, not just a particular column family.

    So an additional useful example to have would be:

     create 'tableName', {NAME => 'colFam', VERSIONS => 2, COMPRESSION => 'SNAPPY'}, 
        {SPLITS => ['333','666','FOO']}
    

    Note that the splits dictionary is separate from the column family dictionary; presumably we could still enter a set of column families and then end with the Splits dictionary.

    0 讨论(0)
提交回复
热议问题