ActiveSpaces’s as-admin 명령어

■ connect : connect 명령어는 metaspace에 연결하기 위해 사용되며 ActiveSpaces에서 작업을 시작하기 위해서는 metaspace에 반드시 연결이 되어야 한다. as-admin은 한번에 하나의 metaspace에 연결할 수 있다(2개이상 안됨). connect 명령 수행시 name 파라메터가 생략되면 “ms” – default metaspace에 연결한다. 그리고 name 파라메터가 명시한 metaspace가 없으면 자동으로 metaspace를 생성한다.

# ms metaspace에 연결
as-admin> connect

# 'sample' metaspace에 연결하고 만약에 없으면 'sample' metaspace를 생성한다.
as-admin> connect name "sample"

 

■ show metaspaces : 연결된 metaspace정보를 조회한다.

as-admin> connect name 'sample'
Connecting to metaspace using command: connect name 'sample'
...[INFO][transport] ip_address=192.168.20.9 port=50002
...[INFO][sample.$gmp] -------------------------------
...[INFO][sample.$gmp] configuring new manager
...[INFO][sample.$gmp] new manager = stat_server (c0a81409-c353-56e7ca13-2ee, 192.168.20.9:50003)
...[INFO][sample.$gmp] self node = c0a81409-c352 (c0a81409-c352-56e7d552-3c7, 192.168.20.9:50002)
...[INFO][sample.$gmp] -------------------------------
...[INFO][sample.metaspace] Connected metaspace name=[sample], listen=[tcp://192.168.20.9:50002], dis
...[INFO][sample.$members] member joined: 192.168.20.9:50003
...[INFO][sample.$members] member joined: 192.168.20.9:50002
as-admin> show metaspaces
Show Metaspaces
    Metaspace Name : sample (current)
    Discovery URL  : tibpgm
    Listen URL     : tcp://192.168.20.9:50002
    Member Name    : c0a81409-c352
as-admin timestamp: [2016-03-15T18:27:02]
as-admin>

 

■ show spaces : 연결된 metaspace의 space 목록을 조회한다.

as-admin> show spaces
Show Spaces:
-------------------------------------------------
    myspace
    myspace1
-------------------------------------------------
as-admin timestamp: [2016-03-15T18:28:33]

 

■ disconnect : 연결된 metaspace에서 연결을 끊는다.

as-admin> disconnect
Disconnecting from metaspace

 
■ defind(or create) space : 연결된 metaspace에서 space를 생성한다.

as-admin> create space name 'myspace1' (field name 'key' type 'integer' field name 'value' type 'string') key (fields ('key'))
Space myspace1 created
as-admin timestamp: [2016-03-15T17:56:43]
as-admin>
as-admin>as-admin> define space name 'usertable3' (field name 'KEY' type 'string', field name 'field0' type 'string', field name 'field1' type 'string',field name 'field2' type 'string',field name 'field3' type 'string',fiel
d name 'field4' type 'string', field name 'field5' type 'string', field name 'field6' type 'string', field name 'field7' type 'string', field name 'field8' type 'string', field name 'field9' type 'string') key (fiel
ds  ('KEY','field0','field1','field2')) distribution_def ('KEY','field0','field1','field2') distribution_policy 'distributed' replication_count 0
Space usertable3 created
as-admin timestamp: [2016-03-15T18:08:55]
as-admin>

 

■ drop space spacename : ‘spacename’ space를 drop한다.

as-admin>drop space 'usertable3'

 

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다