hyperspace dir :
------------------------------------------------------------------
/
hypertable
master[address, next_server_id, lock.generation]
namemap
ids
3 [lock.generation, name]
4 [lock.generation, name]
names
3 [lock.generation, id]
4 [lock.generation, id]
root[Location, lock.generation]
servers
rs1 [lock.generation]
tables
3 [lock.generation, schema, x]
4 [lock.generation, schema, x]
hyperspace
metadata
------------------------------------------------------------------
[root@mdss33 current]# ./bin/hyperspace
SESSION CALLBACK: Safe
Welcome to the hyperspace command interpreter.
For information about Hypertable, visit http://www.hypertable.org/
Type 'help' for a list of commands, or 'help shell' for a
list of shell meta commands.
hyperspace> open /;
hyperspace> readdir /;
(dir) hyperspace
(dir) hypertable
hyperspace> attrlist /;
lock.generation
hyperspace> open /hyperspace/metadata;
hyperspace> attrlist /hyperspace/metadata;
generation
lock.generation
hyperspace> attrget /hyperspace/metadata generation;
1
hyperspace> open /hypertable;
hyperspace> readdir /hypertable;
master
(dir) namemap
root
(dir) servers
(dir) tables
hyperspace> open /hypertable/master;
hyperspace> attrlist /hypertable/master;
address
lock.generation
next_server_id
hyperspace> attrget /hypertable/master address;
192.168.0.133:38050
hyperspace> attrget /hypertable/master next_server_id;
2
hyperspace> open /hypertable/root;
hyperspace> attrlist /hypertable/root;
Location
lock.generation
hyperspace> attrget /hypertable/root Location;
rs1
hyperspace> open /hypertable/servers;
hyperspace> readdir /hypertable/servers;
rs1
hyperspace> open /hypertable/servers/rs1;
hyperspace> attrlist /hypertable/servers/rs1;
lock.generation
hyperspace> open /hypertable/tables;
hyperspace> readdir /hypertable/tables;
(dir) 0
(dir) 2
3
4
hyperspace> open /hypertable/tables/3;
hyperspace> attrlist /hypertable/tables/3;
lock.generation
schema
x
hyperspace> attrget /hypertable/tables/3 schema;
<Schema generation="1">
<AccessGroup name="default">
<ColumnFamily id="1">
<Generation>1</Generation>
<Name>Query</Name>
<Counter>false</Counter>
<deleted>false</deleted>
</ColumnFamily>
<ColumnFamily id="2">
<Generation>1</Generation>
<Name>ItemRank</Name>
<Counter>false</Counter>
<deleted>false</deleted>
</ColumnFamily>
<ColumnFamily id="3">
<Generation>1</Generation>
<Name>ClickURL</Name>
<Counter>false</Counter>
<deleted>false</deleted>
</ColumnFamily>
</AccessGroup>
</Schema>
hyperspace> attrget /hypertable/tables/3 x;
hyperspace> open /hypertable/tables/4;
hyperspace> attrlist /hypertable/tables/4;
lock.generation
schema
x
hyperspace> attrget /hypertable/tables/4 schema;
<Schema generation="1">
<AccessGroup name="default">
<ColumnFamily id="1">
<Generation>1</Generation>
<Name>Query</Name>
<Counter>false</Counter>
<deleted>false</deleted>
</ColumnFamily>
<ColumnFamily id="2">
<Generation>1</Generation>
<Name>ItemRank</Name>
<Counter>false</Counter>
<deleted>false</deleted>
</ColumnFamily>
<ColumnFamily id="3">
<Generation>1</Generation>
<Name>ClickURL</Name>
<Counter>false</Counter>
<deleted>false</deleted>
</ColumnFamily>
</AccessGroup>
</Schema>
hyperspace> open /hypertable/namemap;
hyperspace> readdir /hypertable/namemap;
(dir) ids
(dir) names
hyperspace> open /hypertable/namemap/ids;
hyperspace> readdir /hypertable/namemap/ids;
(dir) 0
(dir) 2
3
4
hyperspace> open /hypertable/namemap/ids/3;
hyperspace> attrlist /hypertable/namemap/ids/3;
lock.generation
name
hyperspace> attrget /hypertable/namemap/ids/3 name;
QueryLogByUserID
hyperspace> open /hypertable/namemap/ids/4;
hyperspace> attrlist /hypertable/namemap/ids/4;
lock.generation
name
hyperspace> attrget /hypertable/namemap/ids/4 name;
QueryLogByTimestamp
hyperspace> open /hypertable/namemap/names;
hyperspace> readdir /hypertable/namemap/names;
QueryLogByTimestamp
QueryLogByUserID
hyperspace> open /hypertable/namemap/names/QueryLogByTimestamp;
hyperspace> attrlist /hypertable/namemap/names/QueryLogByTimestamp;
id
lock.generation
hyperspace> attrget /hypertable/namemap/names/QueryLogByTimestamp id;
4
hyperspace> open /hypertable/namemap/names/QueryLogByUserID;
hyperspace> attrlist /hypertable/namemap/names/QueryLogByUserID;
id
lock.generation
hyperspace> attrget /hypertable/namemap/names/QueryLogByUserID id;
3
hyperspace中存储数据如下:
(1)master在hyperspace中穿件了master节点,并存储master的address
(2)之后是在hyperspace中有从表明name到表id的映射关系
(3)root存储的是root表所在的range server的地址
(4)servers下是每个range server启动之后在改目录下建立一个代表该range server的文件
(5)tables目录下保存每个表的schema信息