diff --git a/engines/hive/conf/engineSettings.conf b/engines/hive/conf/engineSettings.conf index 4b172aa..99f7a89 100644 --- a/engines/hive/conf/engineSettings.conf +++ b/engines/hive/conf/engineSettings.conf @@ -1,3 +1,3 @@ -datagen.output.directory /datagen/output +datagen.output.directory /datagen-0628/output datagen.filesystem.host hdfs://bdpe611n1:9001 -datagen.scale 10000 +datagen.scale 100000 diff --git a/engines/hive/population/hiveCreateLoad.sql b/engines/hive/population/hiveCreateLoad.sql index 8c63e78..2a30289 100644 --- a/engines/hive/population/hiveCreateLoad.sql +++ b/engines/hive/population/hiveCreateLoad.sql @@ -1,8 +1,8 @@ CREATE EXTERNAL TABLE IF NOT EXISTS tbl_data_event_1d_temporary ( record_id DECIMAL(23,0) , cdr_id STRING - , location_code DECIMAL(6,0) - , system_id DECIMAL(5,0) + , location_code DECIMAL(7,0) + , system_id DECIMAL(8,0) , clue_id STRING , hit_element STRING , carrier_code DECIMAL(2,0) @@ -79,7 +79,7 @@ CREATE EXTERNAL TABLE IF NOT EXISTS tbl_data_event_1d_temporary , sms_count DECIMAL(2,0) , remark STRING , content_status DECIMAL(6,0) - , voc_length DECIMAL(10,0) + , voc_length DECIMAL(9,0) , fax_page_count DECIMAL(6,0) , com_over_cause DECIMAL(6,0) , roam_type DECIMAL(1,0) @@ -97,17 +97,10 @@ CREATE EXTERNAL TABLE IF NOT EXISTS tbl_data_event_1d_temporary STORED AS TEXTFILE LOCATION '/datagen/' ; ----DROP TABLE IF EXISTS tbl_data_event_1d; ----CREATE TABLE tbl_data_event_1d ----STORED AS parquet ----AS ----SELECT * FROM tbl_data_event_1d_temporary ----; - -DROP TABLE IF EXISTS tbl_data_event_1d_bf; -CREATE TABLE tbl_data_event_1d_bf +DROP TABLE IF EXISTS tbl_data_event_1d; +CREATE TABLE tbl_data_event_1d STORED AS parquet -TBLPROPERTIES ('parquet.enable.bloom.filter'='true', 'parquet.bloom.filter.enable.column.names'='user_num', 'parquet.bloom.filter.expected.entries'='1000000') AS SELECT * FROM tbl_data_event_1d_temporary ; + diff --git a/engines/hive/population/hiveCreateLoadBF.sql b/engines/hive/population/hiveCreateLoadBF.sql index ec2df59..39e2a7d 100644 --- a/engines/hive/population/hiveCreateLoadBF.sql +++ b/engines/hive/population/hiveCreateLoadBF.sql @@ -1,8 +1,8 @@ CREATE EXTERNAL TABLE IF NOT EXISTS tbl_data_event_1d_temporary ( record_id DECIMAL(23,0) , cdr_id STRING - , location_code DECIMAL(6,0) - , system_id DECIMAL(5,0) + , location_code DECIMAL(7,0) + , system_id DECIMAL(8,0) , clue_id STRING , hit_element STRING , carrier_code DECIMAL(2,0) @@ -79,7 +79,7 @@ CREATE EXTERNAL TABLE IF NOT EXISTS tbl_data_event_1d_temporary , sms_count DECIMAL(2,0) , remark STRING , content_status DECIMAL(6,0) - , voc_length DECIMAL(10,0) + , voc_length DECIMAL(9,0) , fax_page_count DECIMAL(6,0) , com_over_cause DECIMAL(6,0) , roam_type DECIMAL(1,0) diff --git a/pom.xml b/pom.xml index 3ed9988..3fe3ddb 100644 --- a/pom.xml +++ b/pom.xml @@ -44,6 +44,7 @@ 1.4.0 generator.SchemaGenerator + false diff --git a/src/main/java/generator/RowGenerator.java b/src/main/java/generator/RowGenerator.java index 80157ef..ec61549 100644 --- a/src/main/java/generator/RowGenerator.java +++ b/src/main/java/generator/RowGenerator.java @@ -134,7 +134,8 @@ public void run() { br.write(nextRow() + "\n"); } br.close(); -// hdfs.close(); + hdfs.close(); + } catch (Exception e) { e.printStackTrace(); } @@ -142,7 +143,6 @@ public void run() { public void produceRow() throws Exception { start(); -// join(); } public String nextRow() { diff --git a/src/main/java/generator/SchemaGenerator.java b/src/main/java/generator/SchemaGenerator.java index 13df9d3..436a45a 100644 --- a/src/main/java/generator/SchemaGenerator.java +++ b/src/main/java/generator/SchemaGenerator.java @@ -66,12 +66,16 @@ public void generateDataInParallel(int threads) throws Exception{ for (int i=0;i