2012-01-23 05:03:52 +00:00
|
|
|
create table vda_file (
|
|
|
|
id integer not null auto_increment,
|
2012-02-24 03:09:56 +00:00
|
|
|
create_time double not null default 0,
|
2012-01-23 05:03:52 +00:00
|
|
|
dir varchar(254) not null,
|
2012-07-07 19:44:48 +00:00
|
|
|
file_name varchar(254) not null,
|
2012-01-23 05:03:52 +00:00
|
|
|
size double not null default 0,
|
2012-07-07 19:44:48 +00:00
|
|
|
chunk_size double not null default 0,
|
2012-01-23 05:03:52 +00:00
|
|
|
need_update tinyint not null default 0,
|
2012-02-24 03:09:56 +00:00
|
|
|
initialized tinyint not null default 0,
|
2012-02-29 20:58:45 +00:00
|
|
|
retrieving tinyint not null default 0,
|
2012-01-23 05:03:52 +00:00
|
|
|
primary key(id)
|
|
|
|
) engine = InnoDB;
|
|
|
|
|
2012-07-17 03:59:12 +00:00
|
|
|
alter table vda_file add unique(file_name);
|
2012-01-23 05:03:52 +00:00
|
|
|
|
|
|
|
create table vda_chunk_host (
|
2012-02-24 03:09:56 +00:00
|
|
|
create_time double not null default 0,
|
2012-01-23 05:03:52 +00:00
|
|
|
vda_file_id integer not null default 0,
|
|
|
|
host_id integer not null default 0,
|
2012-07-07 19:44:48 +00:00
|
|
|
chunk_name varchar(254) not null,
|
2012-01-23 05:03:52 +00:00
|
|
|
present_on_host tinyint not null default 0,
|
|
|
|
transfer_in_progress tinyint not null default 0,
|
|
|
|
transfer_wait tinyint not null default 0,
|
2012-02-24 03:09:56 +00:00
|
|
|
transfer_request_time double not null default 0,
|
|
|
|
transfer_send_time double not null default 0
|
2012-01-23 05:03:52 +00:00
|
|
|
) engine = InnoDB;
|
|
|
|
|
|
|
|
alter table vda_chunk_host
|
2012-02-24 22:55:11 +00:00
|
|
|
add index vch_file (vda_file_id),
|
|
|
|
add index vch_host (host_id);
|
2012-02-16 00:08:40 +00:00
|
|
|
|
|
|
|
alter table host
|
2012-02-22 19:51:09 +00:00
|
|
|
add index host_cpu_eff (cpu_efficiency);
|