Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# SQLDataGen
SQLDataGen is use to generate interactive workload for benchmark the interactive query performance of database.

##How to use SQLDataGen
This project needs to be run on a cluster which installs hadoop,hive.
First, user should run main function in src/main/java/generator/SchemaGenerator.java to generate data on hdfs.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems you can run the jar with maven command.

Then user can run bin/runBenchmark.sh to do the five tests automatically.

##Change Properties
User can change scale,proportion of null,data outputdir in conf/datagen.properties.
User can change which steps to run in engines/hive/conf/engineSettings.conf and test-data in five querys in engines/hive/conf/engineSettings.sql
9 changes: 5 additions & 4 deletions src/main/java/generator/SchemaGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ public static void main(String[] args) {
System.out.println(sql_841);
}
try {
SchemaGenerator sg = new SchemaGenerator();
RowGenerator rg = new RowGenerator(sql_841);
rg.setExpectedRows(sg.scale * 1024 * 1024 / rg.getBytesInRow());
sg.addRowGenerator(rg);
String project_root = System.getProperty("user.dir");
FileInputStream fis = new FileInputStream(project_root + "/conf/datagen.properties");
Properties props = new Properties();
props.load(fis);
SchemaGenerator sg = new SchemaGenerator();
sg.setScale(Integer.parseInt(props.getProperty("datagen.scale")));
RowGenerator rg = new RowGenerator(sql_841);
rg.setExpectedRows(sg.scale * 1024 * 1024 / rg.getBytesInRow());
sg.addRowGenerator(rg);
sg.generateData(props);
fis.close();
} catch (Exception e) {
Expand Down