HW5 - Work with Hive
Overview
- HW5: Work with Hive on Amazon EMR (Homework Assignment 5, 5 marks)
- Goal: learn how to use Hive to process data
- Your assignment tasks:
- Follow the tutorial steps and capture screen along the way
- Complete an exercise
- Make sure each screenshot includes both the command (SQL) and the result
- Steps:
- Prepare EMR with Hive Environment
- Upload data to Hadoop (EMR)
- Connect to Hive CLI with ssh
- Create table and import data
- Calculate statistics for data quality check
- Ready for analysis
- Exercise: Preprocessing and redo statistics again
- What I did (summary): cloned an EMR cluster (
emr-7.9.0, Hadoop 3.4.1, Hive 3.1.3, Hue 4.11.0; 1 primary + 2 core nodes), uploaded 2 days of Bangkok taxi GPS probe data (20180801.csv.out,20180802.csv.out, ~470 MB) withscp, built a partitioned Hive table, ran data quality statistics, cleaned the data into a new ORC table, re-ran the statistics, and used Hue to plot unique vehicles per hour
Assignment Checklist (What to Submit)
- 1. Screen Capture of Tutorial Part
- 1.1 AWS EMR Screen
- 1.2 Create a table and import data
- 1.3 Calculate statistics for data quality check
- 1.3.1 How many data in the system?
- 1.3.2 How many days of data?
- 1.3.3 How many data for each day?
- 1.3.4 How many unique taxis for each day?
- 1.3.5 Find min, max, avg speed by hour
- 1.4 Check Hive data files on HDFS
- 1.5 Check Hive process on YARN
- 2. Exercise
- Preprocessing: create
taxi_data_orcand insert the cleaned data - 2.1 How many data in the system?
- 2.2 How many days of data?
- 2.3 How many data for each day?
- 2.4 How many unique taxis for each day?
- 2.5 Find min, max, avg speed by hour
- 2.6 Use Hue to calculate and make graph
- Preprocessing: create
0. Hadoop on Cloud: AWS EMR
- Access the AWS Learner Lab (50 USD credits)
- Select the recent EMR cluster and click "Clone"
- EMR will stop after some time or after you stop the lab
- Make sure to select components:
- Hadoop, Tez
- Hive, Hue, Pig
- Spark, Livy
- JupyterHub, Zeppelin


Cloning is like "Save As" on last week's cluster — same settings, new machine, so you don't have to tick all the boxes again.
1. Prepare EMR with Hive Environment
- Wait until status shows Waiting → EMR is ready to use (CAPTURE SCREEN)
- Use the Primary node public DNS for remote connection
- EMR also provides a Web GUI for each service on Hadoop — replace the URL with your EMR URL (
master-public-dns-name) - We normally check:
- Hadoop HDFS NameNode
- YARN ResourceManager
- Hue for Hive access
| Interface | URI |
|---|---|
| Hadoop HDFS NameNode (EMR 6.x+) | http://master-public-dns-name:9870/ |
| Hadoop HDFS DataNode (EMR 6.x+) | http://coretask-public-dns-name:9865/ |
| HBase | http://master-public-dns-name:16010/ |
| Hue | http://master-public-dns-name:8888/ |
| JupyterHub | https://master-public-dns-name:9443/ |
| Livy | http://master-public-dns-name:8998/ |
| Spark HistoryServer | http://master-public-dns-name:18080/ |
| Tez | http://master-public-dns-name:8080/tez-ui |
| YARN NodeManager | http://coretask-public-dns-name:8042/ |
| YARN ResourceManager | http://master-public-dns-name:8088/ |
| Zeppelin | http://master-public-dns-name:8890/ |
| Flink history server (EMR 5.33+) | http://master-public-dns-name:8082/ |
| Ganglia | http://master-public-dns-name/ganglia/ |
- Older EMR (pre-6.x) used NameNode
:50070/:50470and DataNode:50075/:50475
My Answer — 1.1 AWS EMR Screen
- The cluster was cloned from the previous EMR cluster and reached the Waiting state (ready to use)
emr-7.9.0with Hadoop, Hive, Hue, JupyterHub, Livy, Pig, Spark, Tez and Zeppelin installed; capacity 1 Primary / 2 Core- The primary node public DNS is used for SSH,
scpand the web interfaces

2. Upload Data to Hadoop (EMR)
- Download file: PROBE-201808.zip
- Extract → contains two files:
20180801.csv.outand20180802.csv.out - Link: https://drive.google.com/open?id=1tBnq7vFTPiLEnYyjPn0SalhFqUGuk7F_&usp=drive_fs
- Header: Vehicle ID, GPS Valid, lat, lon, timestamp, speed, heading, for_hire_light, engine_acc
5yc/f14Tqe9XCRu5qCGxv5qo+ug,1,13.83610,100.47647,2017-04-11 09:10:26,0,288,0,1
EO8d8iuEH3vjgNQURcvOM/PxgQo,1,13.82045,100.46629,2018-08-01 00:00:10,0,169,1,0
7D8GUsE79mc8lTjsrfnVPrxRgU0,0,13.72489,100.54439,2018-08-01 00:00:11,10,8,0,1
jO66susXra8+ggJKVz0rfAh0tyA,0,13.72504,100.54420,2018-07-31 23:59:43,12,5,0,1
S94VbUQxHCfO0HyPSOFvY/bK3L0,1,13.81945,100.41950,2018-07-31 23:59:14,0,30,1,0
lFXyziHxuJO+hcyZ5fzWLixxaK0,1,13.72528,100.54395,2018-08-01 00:09:33,0,84,1,0- Notice: the very first sample row is dated 2017-04-11 and some are 2018-07-31 even though the file is "20180801" → a hint of the data quality problem found later
Taxi Header Info
- Vehicle ID: unique vehicle ID
- GPS Valid: 1 = enough satellites for a GPS fix
- lat / lon: GPS location up to 5 decimal places
- timestamp: GPS timestamp (GMT+7)
- speed: km/h
- heading: vehicle heading direction degrees from North
- for_hire_light: [for taxis] whether the "For Hire" light is ON
- 1 = light on ⇒ possibly no passenger
- 0 = light off ⇒ possibly carrying passengers
- engine_acc: car key status active, can be:
- 1 (active, data collected every minute)
- 0 (inactive, data collected every 3 minutes)
- In the Hive table these are named:
vehicle_id, gps_valid, lat, lon, gps_time, speed, heading, meter, engine(someter= for_hire_light,engine= engine_acc)
Uploading
- Connect to EMR using FileZilla Client (Windows) or scp (Mac)
- Specify IP address (Primary node public DNS), port: 22
- Specify User: hadoop and Private Key (PEM from the AWS Details of the lab learner)
- Create directory
dataunder/home/hadoop


- Mac (SCP):
scp -i pem_file file_to_upload hadoop@<primary node public DNS>:/home/hadoop/<path>/
# EX:
scp -i pem_file 20180801.csv.out hadoop@<primary node public DNS>:/home/hadoop/data/
scp -i pem_file 20180802.csv.out hadoop@<primary node public DNS>:/home/hadoop/data/- Note: the target folder must exist first, e.g.
ssh -i pem_file hadoop@<primary node public DNS> "mkdir -p ~/data"
3. Connect to Hive CLI with ssh
- Connect to EMR with ssh with user: hadoop (for Mac, use the ssh CLI)
- Run command
hiveto access the Hive shell - Run initial commands:
- Show header
- Enable dynamic partition
ssh -i pem_file hadoop@<primary node public DNS>$ hive
hive> set hive.cli.print.header=true;
hive> set hive.exec.dynamic.partition.mode=nonstrict;
hive> set hive.exec.dynamic.partition=true;hive.cli.print.header=true→ print column names with resultshive.exec.dynamic.partition*→ needed later forINSERT ... PARTITION (PD)where Hive figures out the partition value from the data
4. Create Table and Import Data
- Create database and table for storing raw taxi data
- Database:
taxidb - Table:
taxi_raw_datawith partition: date (PDATE)
create database taxidb;
Use taxidb;
CREATE TABLE taxi_raw_data (vehicle_id string, gps_valid int, lat double, lon double, gps_time string, speed double, heading int, meter int, engine int)
PARTITIONED BY (PDATE string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
STORED AS TEXTFILE;- Import data
load data local inpath '/home/hadoop/data/20180801.csv.out' overwrite into table taxi_raw_data
partition (pdate='2018-08-01');
load data local inpath '/home/hadoop/data/20180802.csv.out' overwrite into table taxi_raw_data
partition (pdate='2018-08-02');- Check data (CAPTURE SCREEN)
SELECT PDATE, count(*) as total, count(distinct vehicle_id) as totalvehicle
FROM taxi_raw_data
GROUP BY PDATE
ORDER BY PDATE;My Answer — 1.2 Create a Table and Import Data
- My SQL (same as the tutorial, compacted):
CREATE TABLE taxi_raw_data (vehicle_id string, gps_valid int, lat double, lon double,
gps_time string, speed double, heading int, meter int, engine int)
PARTITIONED BY (PDATE string)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
STORED AS TEXTFILE;
load data local inpath '/home/hadoop/data/20180801.csv.out'
overwrite into table taxi_raw_data partition (pdate='2018-08-01');
load data local inpath '/home/hadoop/data/20180802.csv.out'
overwrite into table taxi_raw_data partition (pdate='2018-08-02');| pdate | total | totalvehicle |
|---|---|---|
| 2018-08-01 | 3,181,459 | 5,931 |
| 2018-08-02 | 2,781,095 | 5,942 |
- Observation: matches the expected result in the tutorial

PARTITIONED BY (PDATE)+partition (pdate='2018-08-01')= putting each day's file into its own labelled folder. Note: the label comes from which file it was, not from the actual GPS timestamps inside — that's why the next checks useto_date(gps_time).
5. Calculate Statistics for Data Quality Check (Tutorial 1.3)
- CAPTURE SCREEN for each result
1.3.1 How many data in the system?
Select count(*) as total from taxi_raw_data;- Answer: 5,962,554 records in total (= 3,181,459 + 2,781,095, the sum of both partitions)
1.3.2 How many days of data?
Select count(distinct to_date(gps_time)) as total_day from taxi_raw_data;- Answer: 52 different dates — even though only two daily files were imported!
1.3.3 How many data for each day?
Select to_date(gps_time) as dateonly, count(*) as total from taxi_raw_data group by
to_date(gps_time) order by dateonly;- Answer (52 rows):
| dateonly | total |
|---|---|
| 1970-01-01 | 118 |
| 2015-08-11 | 205 |
| 2015-08-12 | 579 |
| 2015-08-13 | 271 |
| 2016-12-29 | 469 |
| 2016-12-30 | 596 |
| 2016-12-31 | 142 |
| 2017-03-12 | 1 |
| 2017-04-11 | 2 |
| 2017-11-17 | 2 |
| 2017-12-10 | 4 |
| 2017-12-25 | 2 |
| 2017-12-31 | 2 |
| 2018-01-31 | 2 |
| 2018-02-05 | 2 |
| 2018-04-05 | 2 |
| 2018-04-10 | 2 |
| 2018-04-20 | 1 |
| 2018-04-21 | 8 |
| 2018-05-13 | 4 |
| 2018-05-15 | 7 |
| 2018-05-18 | 7 |
| 2018-06-08 | 1 |
| 2018-06-11 | 8 |
| 2018-06-15 | 320 |
| 2018-06-16 | 9 |
| 2018-06-18 | 1 |
| 2018-07-02 | 2 |
| 2018-07-05 | 1 |
| 2018-07-07 | 2 |
| 2018-07-11 | 13 |
| 2018-07-16 | 1 |
| 2018-07-22 | 2 |
| 2018-07-23 | 1 |
| 2018-07-24 | 5 |
| 2018-07-25 | 1 |
| 2018-07-26 | 2 |
| 2018-07-27 | 5 |
| 2018-07-28 | 10 |
| 2018-07-29 | 5 |
| 2018-07-30 | 155 |
| 2018-07-31 | 3,729 |
| 2018-08-01 | 3,179,230 |
| 2018-08-02 | 2,775,951 |
| 2018-08-03 | 643 |
| 2018-08-22 | 6 |
| 2018-08-23 | 1 |
| 2018-09-19 | 18 |
| 2019-06-11 | 1 |
| 2019-12-04 | 1 |
| 2020-04-01 | 1 |
| 2027-01-20 | 1 |
- Observation:
- Almost all records belong to 2018-08-01 (3,179,230) and 2018-08-02 (2,775,951)
- 3,729 records on 2018-07-31 and 643 on 2018-08-03 come from the hours around midnight
- A small number have clearly wrong dates: 1970-01-01 (118 records — the Unix epoch, i.e. an unset GPS clock), 2015–2017, and even 2027-01-20 (in the future)
- These are GPS timestamp errors and should be removed before analysis
1970-01-01 is the "zero" of computer time. Seeing it is like a receipt printed with date 00/00/0000 — the clock was never set, not that the taxi drove in 1970.
1.3.4 How many unique taxis for each day?
Select to_date(gps_time) as dateonly, count(distinct vehicle_id) as total from taxi_raw_data group
by to_date(gps_time);- Answer: 5,913 taxis on 2018-08-01, 5,920 on 2018-08-02, and 2,843 taxis have records on 2018-07-31
- Observation:
- Most of the wrong dates come from only 1–2 vehicles each → errors from a few GPS devices
- This query has no
ORDER BY, so dates are printed in the order the reducers produced them
1.3.5 Find min, max, avg speed by hour
select hour(gps_time) as hour24,
min(speed) as min_speed, max(speed) as max_speed, avg(speed) as avg_speed
from taxi_raw_data
group by hour(gps_time)
order by hour24;- Answer (24 rows; min_speed = 0.0 for every hour):
| hour24 | max_speed | avg_speed |
|---|---|---|
| 0 | 149.0 | 9.8775 |
| 1 | 139.0 | 7.9923 |
| 2 | 135.0 | 7.0067 |
| 3 | 156.0 | 6.5050 |
| 4 | 161.0 | 8.3651 |
| 5 | 153.0 | 11.7817 |
| 6 | 159.0 | 13.9312 |
| 7 | 149.0 | 13.2038 |
| 8 | 215.0 | 14.3988 |
| 9 | 147.0 | 15.5218 |
| 10 | 161.0 | 16.2517 |
| 11 | 167.0 | 16.5442 |
| 12 | 283.0 | 16.4377 |
| 13 | 148.0 | 16.3885 |
| 14 | 136.0 | 16.2072 |
| 15 | 155.0 | 16.0206 |
| 16 | 139.0 | 15.5861 |
| 17 | 169.0 | 14.1990 |
| 18 | 189.0 | 13.7128 |
| 19 | 199.0 | 13.7759 |
| 20 | 257.0 | 14.0375 |
| 21 | 148.0 | 13.7095 |
| 22 | 160.0 | 12.8088 |
| 23 | 141.0 | 10.9770 |
- Observation:
- Average speed is lowest between 01:00 and 04:00 (about 6.5–8.4 km/h) and highest around midday (about 16.5 km/h), because many taxis are parked or waiting with speed 0 at night
- Some maximum speeds are unrealistic for city taxis, e.g. 283 km/h at 12:00, 257 km/h at 20:00, 215 km/h at 08:00 → noise in the speed values
- Average for an hour :
The average is low at night not because taxis drive slowly, but because lots of parked taxis (speed 0) still send GPS pings, pulling the average down — like averaging the running speed of a team where half are sitting on the bench.
Check Hive Data Files on HDFS (Tutorial 1.4)
- Access the HDFS GUI (NameNode web UI, port 9870) (CAPTURE SCREEN)
- Check files in
/user/hive/warehouse/taxidb.db/taxi_raw_data - Make sure to include the URL in the screenshot
My Answer — 1.4
- Hive stores each partition of the table as a sub-directory:
pdate=2018-08-01andpdate=2018-08-02, owned byhadoop - The loaded
.csv.outfile is inside each directory
/user/hive/warehouse/taxidb.db/taxi_raw_data
├── pdate=2018-08-01/
│ └── 20180801.csv.out
└── pdate=2018-08-02/
└── 20180802.csv.out
- This is exactly the Hive data model from the lecture: database →
taxidb.db, table →taxi_raw_data, partition → sub-directory
Check Hive Process on YARN (Tutorial 1.5)
- Access the YARN GUI (ResourceManager, port 8088) (CAPTURE SCREEN)
- There should be several tasks
My Answer — 1.5
- The YARN ResourceManager lists the Hive applications
- Hive runs queries on the Tez engine and keeps one Tez session (= one YARN application) open per client
- All queries from the Hive CLI ran inside one application (FINISHED / SUCCEEDED after the session closed)
- The Hue queries ran in a second application (RUNNING)

Why only 1–2 apps instead of one per query? Tez keeps a "session" warm like a taxi waiting at the curb — each new query hops into the same running container instead of calling a new taxi every time.
Exercise: Apply Preprocessing Step
-
Create a new table with clean data (remove error and noise)
- From the result of the previous statistics, even though we imported 2 days of data, the files contain data of other days
- Filter data for 2018-07-31 to 2018-08-02
- Filter include only GPS Valid = 1
- Filter include only speed less than 200
- From the result of the previous statistics, even though we imported 2 days of data, the files contain data of other days
-
Create new table (stored as ORC, partitioned by
PD)
CREATE TABLE taxi_data_orc (vehicle_id string, gps_valid int, lat double, lon double, gps_time string, speed double, heading int, meter int, engine int)
PARTITIONED BY (PD string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
STORED AS ORC;- Insert data into the new clean table (tutorial template:
WHERE … <put criteria here>)
INSERT OVERWRITE TABLE taxi_data_orc PARTITION (PD)
SELECT vehicle_id, gps_valid, lat, lon, gps_time, speed, heading, meter, engine,
to_date(gps_time) as PD
FROM taxi_raw_data
WHERE to_date(gps_time) between '2018-07-31' and '2018-08-02' and gps_valid =1 and speed <200My Answer — 2.0 Create taxi_data_orc and Insert Cleaned Data
CREATE TABLE taxi_data_orc (vehicle_id string, gps_valid int, lat double, lon double,
gps_time string, speed double, heading int, meter int, engine int)
PARTITIONED BY (PD string)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
STORED AS ORC;
INSERT OVERWRITE TABLE taxi_data_orc PARTITION (PD)
SELECT vehicle_id, gps_valid, lat, lon, gps_time, speed, heading, meter, engine,
to_date(gps_time) as PD
FROM taxi_raw_data
WHERE to_date(gps_time) between '2018-07-31' and '2018-08-02'
and gps_valid = 1 and speed < 200;- Keeps only clean records: GPS time between 2018-07-31 and 2018-08-02,
gps_valid = 1, speed < 200 km/h - Dynamic partitioning creates one partition per date automatically → 3/3 partitions loaded (2018-07-31, 2018-08-01, 2018-08-02)
- Key ideas:
PARTITION (PD)with no value = dynamic partition → the last column of theSELECT(to_date(gps_time) as PD) decides the partition- Now the partition is based on the real GPS date, not the file name
- This is the Hive way to "update/clean" data: create a new table +
INSERT ... SELECT(noUPDATE/DELETE) STORED AS ORC→ columnar, compressed, faster

Instead of erasing mistakes in the original notebook (Hive can't), you copy only the good lines into a fresh, neatly organized notebook (ORC), with a tab for each real date.
Rerun: Calculate Statistics for Data Quality Check (Exercise 2.1–2.5)
- CAPTURE SCREEN for each result
2.1 How many data in the system?
Select count(*) from taxi_data_orc;- Answer: 5,927,794 records
- Removed: records
- (about 0.6% removed)
- Hive answered in 0.15 seconds without launching a Tez job, because ORC files store the row count in their metadata
2.2 How many days of data?
Select count(distinct to_date(gps_time)) from taxi_data_orc;- Answer: 3 dates (only those inside the filter range; compared with 52 before cleaning)
2.3 How many data for each day?
Select to_date(gps_time) as dateonly, count(*) from taxi_data_orc group by to_date(gps_time)
order by dateonly;| dateonly | count | (before cleaning) |
|---|---|---|
| 2018-07-31 | 3,695 | 3,729 |
| 2018-08-01 | 3,162,041 | 3,179,230 |
| 2018-08-02 | 2,762,058 | 2,775,951 |
- Each date lost some records because of the
gps_validand speed filters
2.4 How many unique taxis for each day?
Select to_date(gps_time) as dateonly, count(distinct vehicle_id) from taxi_data_orc group by
to_date(gps_time);| dateonly | unique taxis | (before cleaning) |
|---|---|---|
| 2018-07-31 | 2,810 | 2,843 |
| 2018-08-01 | 5,908 | 5,913 |
| 2018-08-02 | 5,915 | 5,920 |
- Only a few taxis disappeared → the removed records were scattered across many vehicles rather than coming from a few broken ones
2.5 Find min, max, avg speed by hour
select hour(gps_time) as hour24,
min(speed) as min_speed, max(speed) as max_speed, avg(speed) as avg_speed
from taxi_data_orc
group by hour(gps_time)
order by hour24;- Answer (24 rows; min_speed = 0.0 for every hour):
| hour24 | max_speed | avg_speed | max before cleaning |
|---|---|---|---|
| 0 | 149.0 | 9.9348 | 149.0 |
| 1 | 139.0 | 8.0336 | 139.0 |
| 2 | 135.0 | 7.0407 | 135.0 |
| 3 | 156.0 | 6.5346 | 156.0 |
| 4 | 161.0 | 8.4082 | 161.0 |
| 5 | 153.0 | 11.8556 | 153.0 |
| 6 | 159.0 | 13.9891 | 159.0 |
| 7 | 149.0 | 13.2536 | 149.0 |
| 8 | 169.0 | 14.4517 | 215.0 |
| 9 | 147.0 | 15.5739 | 147.0 |
| 10 | 153.0 | 16.2994 | 161.0 |
| 11 | 167.0 | 16.5971 | 167.0 |
| 12 | 137.0 | 16.4905 | 283.0 |
| 13 | 148.0 | 16.4553 | 148.0 |
| 14 | 136.0 | 16.2629 | 136.0 |
| 15 | 155.0 | 16.0869 | 155.0 |
| 16 | 139.0 | 15.6562 | 139.0 |
| 17 | 169.0 | 14.2643 | 169.0 |
| 18 | 189.0 | 13.7773 | 189.0 |
| 19 | 199.0 | 13.8589 | 199.0 |
| 20 | 187.0 | 14.1264 | 257.0 |
| 21 | 148.0 | 13.8013 | 148.0 |
| 22 | 160.0 | 12.8901 | 160.0 |
| 23 | 141.0 | 11.0548 | 141.0 |
- Observation:
- Every maximum speed is now below 200 km/h (highest is 199 km/h at 19:00)
- Outliers like 283 km/h at 12:00 are gone (new max for 12:00 is 137 km/h)
- Hourly averages increased slightly (e.g. 16.44 → 16.49 km/h at 12:00) because invalid-GPS records were removed
2.6 Use Hue to Calculate and Make Graph
- Find total unique vehicles for each hour and plot on a bar chart (CAPTURE SCREEN)
- Capture the whole screen with SQL

My Answer — 2.6
- Open Hue (port 8888) in the browser → Hive editor → count unique vehicles for each hour from the clean table
- Display as a bar chart with
hour24on the X-axis andtotal_vehicleon the Y-axis
SELECT hour(gps_time) AS hour24,
count(DISTINCT vehicle_id) AS total_vehicle
FROM taxidb.taxi_data_orc
GROUP BY hour(gps_time)
ORDER BY hour24
- Observation:
- Between 4,497 and 4,555 taxis report data in every hour from 00:00–08:00 and 16:00–23:00
- The number jumps to 5,878–5,892 (peak 5,892 at 11:00) between 09:00 and 15:00
- Because the counts are almost flat within each period instead of following a smooth daily curve, this suggests a group of about 1,350 vehicles only sends data during that time window, rather than a real change in the number of taxis on the road
A real "rush hour" would rise and fall gradually like a hill. A flat step up and a flat step down is more like a second shift of devices clocking in at 9 and out at 3 — a data collection pattern, not traffic.
Key Takeaways
- Schema on read:
CREATE TABLE+LOAD DATAjust puts the raw CSV into the table's HDFS folder; nothing is checked at load time → you must run data quality checks - Partition by file ≠ partition by real date:
pdatecame from the file name, butto_date(gps_time)revealed 52 dates (1970 epoch, 2015–2017, 2027…) - Cleaning in Hive = new table +
INSERT OVERWRITE ... SELECT ... WHERE(no UPDATE/DELETE), with dynamic partitioning to split by the real date - ORC makes
count(*)instant (row count stored in metadata) - Hue gives a web SQL editor + quick charts; HDFS UI (9870) shows partitions as directories; YARN UI (8088) shows the Tez applications running the queries