욱'S 노트

HBase - HBase 명령어(DDL) 본문

Programming/HBase

HBase - HBase 명령어(DDL)

devsun 2014. 12. 26. 16:43

alter, alter_async, alter_status, 


create


테이블을 생성한다. 테이블명과 컬럼패밀리 집합 명세들(적어도 하나이상)를 필수적으로 전달해야한다.

옵션으로 테이블 설정을 전달할 수 있다. 컬럼 명세는 간단한 문자(이름) 이나 디렉토리일 수 있다. 


Examples:


테이블을 생성한다. (네임스페이스=ns1, 테이블구분자=t1)

  hbase> create 'ns1:t1', {NAME => 'f1', VERSIONS => 5}


테이블을 생성한다. (네임스페이스=default, 테이블구분자=t1)

  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', {NAME => 'f1', CONFIGURATION => {'hbase.hstore.blockingStoreFiles' => '10'}}


마지막에 테이블 설정 정보를 넣을 수 있다.


Examples:


  hbase> create 'ns1:t1', 'f1', SPLITS => ['10', '20', '30', '40']

  hbase> create 't1', 'f1', SPLITS => ['10', '20', '30', '40']

  hbase> create 't1', 'f1', SPLITS_FILE => 'splits.txt', OWNER => 'johndoe'

  hbase> create 't1', {NAME => 'f1', VERSIONS => 5}, METADATA => { 'mykey' => 'myvalue' }

  hbase> # Optionally pre-split the table into NUMREGIONS, using

  hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)

  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}

  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit', CONFIGURATION => {'hbase.hregion.scan.loadColumnFamiliesOnDemand' => 'true'}}


생성된 테이블의 참조를 지정할 수 있다.


  hbase> t1 = create 't1', 'f1'


t1이라고 테이블의 참조를 지정하면 호출할 수 있다.


describe, disable, disable_all, drop, drop_all, enable, enable_all, exists, get_table, is_disabled, is_enabled, 


list 


HBase의 모든 테이블을 리스팅한다. 선택적으로 Optional regular expression parameter 사용할 수 있다.


  hbase> list

  hbase> list 'abc.*'

  hbase> list 'ns:abc.*'

  hbase> list 'ns:.*'


show_filters



'Programming > HBase' 카테고리의 다른 글

HBase - HBase 명령어(DML)  (0) 2014.12.26
HBase - HBase 데이터모델  (0) 2014.12.26
HBase - HBase 시작하기  (0) 2014.12.24
HBase - HBase 개요  (0) 2014.12.24
Comments