Ô¤Ö÷ÖÇø¿ÉÒԲο¼ÏÂÃæÀý×Ó
ÓÃHBase Shell½¨±íµÄʱºò£¬³ýÁËһЩ³£ÓõÄoptionÒÔÍ⣬ÎÒÃÇ»¹¿ÉÒÔͬʱ½¨Á¢Ò»Ð©Ô¤·ÖÇø£¬ÕâÑù¿ÉÒÔÔ¤·À³õ´Î²åÈëÊý¾ÝʱÈȵãÎÊÌâ¡£
ͨ¹ýÖ±½ÓÊäÈëcreate£¬ÎÒÃÇ¿ÉÒÔ¿´µ½ÓÐÈçÏÂÌáʾ£º
- Examples:
-
- hbase> create 't1', {NAME => 'f1', VERSIONS => 5}
- hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
- hbase> # The above in shorthand would be the following:
- hbase> create 't1', 'f1', 'f2', 'f3'
- hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000, BLOCKCACHE => true}
- hbase> create 't1', 'f1', {SPLITS => ['10', '20', '30', '40']}
- hbase> create 't1', 'f1', {SPLITS_FILE => 'splits.txt'}
- hbase> # Optionally pre-split the table into NUMREGIONS, using
- hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
- hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}
¸´ÖÆ´úÂë
Àý×ÓÖнö¸ø³öÁËҪôÓÐÆÕͨoption£¬ÒªÃ´ÊÇÓÐÖ¸¶¨·ÖÇøµÈÑ¡Ïµ«ÊÇûÓиø³ö¼ÈÓÐÆÕͨoption(ÀýÈçVERSIONS£¬COMPRESSIONµÈ)£¬ÓÖ´´½¨Ô¤·ÖÇøµÄÀý×Ó¡£
Èç¹ûÓÐÕâ¸öÐèÇóÄØ£¿Èç϶ÔÂð£¿
- create 't', {NAME => 'f', VERSIONS => 1, COMPRESSION => 'SNAPPY', SPLITS => ['10','20','30']
¸´ÖÆ´úÂë
ÔËÐкó·¢Ïֿ϶¨ÊDz»Ðеġ£ÕýÈ·µÄд·¨Ó¦¸ÃÊÇÕâÑùµÄ£º
- create 't', {NAME => 'f', VERSIONS => 1, COMPRESSION => 'SNAPPY'},
- {SPLITS => ['10','20','30']}
¸´ÖÆ´úÂë
ÒòΪ·ÖÇøʱÕë¶ÔÈ«±í¶ø·Çij¸öColumn FamilyµÄ¡£
|