Skip to content

Latest commit

 

History

History
96 lines (63 loc) · 3.18 KB

如何复现实验.md

File metadata and controls

96 lines (63 loc) · 3.18 KB

复现实验

  1. 生成密钥文件
mvn EDBSetup_keyUtilsTest#getKeyTest
  1. 生成索引(很耗时)
mvn exec:java -Dexec.mainClass="com.zhong.concurrent.BlockingQueueModel"

如果你有sql文件,可以从sql文件中恢复索引,而不需要重新生成

cmd> mysql -uroot -proot -P3306

mysql> DROP DATABASE IF EXISTS vsse;

mysql> CREATE DATABASE vsse DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

cmd> mysql --default-character-set=utf8 -uroot -proot vsse < F:\睿云实验室\王剑锋\关键词检索\第6阶段\CashScheme_Split_Memory\vsse_TSets.sql

cmd> mysql --default-character-set=utf8 -uroot -proot vsse < F:\睿云实验室\王剑锋\关键词检索\第6阶段\CashScheme_Split_Memory\vsse_XSets.sql

注:如果你采用导入的方式生成索引的话,一定要注意不能重复生成索引,否则将不能解密和搜索

  1. 生成查询所需的子TSets表:
cmd> mysql -uroot -proot -hlocalhost

mysql> use vsse;

mysql> create table TSets_32768 select * from TSets limit 0,32768;

mysql> create table TSets_65536 select * from TSets limit 0,65536;

mysql> create table TSets_131072 select * from TSets limit 0,131072;

mysql> create table TSets_262144 select * from TSets limit 0,262144;

mysql> create table TSets_524288 select * from TSets limit 0,524288;

mysql> create table TSets_1048576 select * from TSets limit 0,1048576;
  1. 查询TSets表的大小
cmd> mysql -uroot -proot -hlocalhost

mysql> use information_schema;

mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data 
from TABLES where table_schema='vsse' and table_name='TSets_32768';

mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='vsse' and table_name='TSets_65536';

mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='vsse' and table_name='TSets_131072';

mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='vsse' and table_name='TSets_262144';

mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='vsse' and table_name='TSets_524288';

mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='vsse' and table_name='TSets_1048576';
  1. 生成XSets的BloonFilter
mvn test -Dtest=MySqlUtilsTest#getXSetsTest2
  1. 打乱所有的Tset表,注意rand是一个很耗时的工作
cmd> use vsse;

mysql> create table TSets_32768_rand select * from TSets_32768 order by rand();

mysql> create table TSets_65536_rand select * from TSets_65536 order by rand();

mysql> create table TSets_131072_rand select * from TSets_131072 order by rand();

mysql> create table TSets_262144_rand select * from TSets_262144 order by rand();

mysql> create table TSets_524288_rand select * from TSets_524288 order by rand();

mysql> create table TSets_1048576_rand select * from TSets_1048576 order by rand();  
  1. 测试查询正确性
mvn test -Dtest=SearchProtocol_Split_memory_Test#search_serverTest12
  1. 测试查询时间
mvn test -Dtest=SearchProtocol_Split_memory_Test#searchProtocolTest13