-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update additional queries and expected results
Signed-off-by: YANGDB <[email protected]>
- Loading branch information
Showing
25 changed files
with
490 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SELECT * FROM mys3.default.http_logs_{date} ORDER BY "@timestamp" LIMIT 5; | ||
source = mys3.default.http_logs_plain | sort @timestamp | head 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source = mys3.default.http_logs_plain | | ||
where status >= 400 | sort - @timestamp | head 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source = mys3.default.http_logs_plain | | ||
where status = 200 | stats count(status) by clientip, status | | ||
sort - clientip | head 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DESCRIBE EXTENDED mys3.default.http_logs_plain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SELECT * FROM mys3.default.http_logs_{date} ORDER BY "@timestamp" LIMIT 5; | ||
SELECT * FROM mys3.default.http_logs_plain ORDER BY '@timestamp' LIMIT 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT COUNT(DISTINCT clientip) as unique_client_ips | ||
FROM mys3.default.http_logs_{date}; | ||
FROM mys3.default.http_logs_plain; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
SELECT day, SUM(size) as total_size FROM mys3.default.http_logs_{date} | ||
SELECT day, SUM(size) as total_size FROM mys3.default.http_logs_plain | ||
WHERE year = 1998 AND month =6 | ||
GROUP BY day; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
SELECT count(*) as count, clientip | ||
FROM mys3.default.http_logs_{date} | ||
FROM mys3.default.http_logs_plain | ||
WHERE clientip BETWEEN '208.0.0.0' AND '210.0.0.0' | ||
GROUP BY clientip | ||
ORDER BY DESC count | ||
limit 20; | ||
ORDER BY count DESC | ||
limit 20; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Explain | ||
SELECT | ||
day, | ||
status | ||
FROM mys3.default.http_logs_plain | ||
WHERE status >= 400 | ||
GROUP BY day, status | ||
LIMIT 100; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"data": { | ||
"ok": true, | ||
"resp": { | ||
"status": "SUCCESS", | ||
"schema": [ | ||
{ | ||
"name": "@timestamp", | ||
"type": "date" | ||
}, | ||
{ | ||
"name": "clientip", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "request", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "status", | ||
"type": "integer" | ||
}, | ||
{ | ||
"name": "size", | ||
"type": "integer" | ||
}, | ||
{ | ||
"name": "year", | ||
"type": "integer" | ||
}, | ||
{ | ||
"name": "month", | ||
"type": "integer" | ||
}, | ||
{ | ||
"name": "day", | ||
"type": "integer" | ||
} | ||
], | ||
"datarows": [ | ||
[ | ||
"1998-06-14T19:59:55.000Z", | ||
"185.163.25.0", | ||
"GET /images/comp_bg2_hm.gif HTTP/1.1", | ||
404, | ||
340, | ||
1998, | ||
6, | ||
14 | ||
], | ||
[ | ||
"1998-06-14T19:59:55.000Z", | ||
"161.62.26.0", | ||
"GET /images/comp_bg2_hm.gif HTTP/1.0", | ||
404, | ||
343, | ||
1998, | ||
6, | ||
14 | ||
], | ||
[ | ||
"1998-06-14T19:59:55.000Z", | ||
"63.158.15.0", | ||
"GET /images/comp_bg2_hm.gif HTTP/1.1", | ||
404, | ||
335, | ||
1998, | ||
6, | ||
14 | ||
], | ||
[ | ||
"1998-06-14T19:59:55.000Z", | ||
"190.10.13.0", | ||
"GET /images/comp_bg2_hm.gif HTTP/1.1", | ||
404, | ||
335, | ||
1998, | ||
6, | ||
14 | ||
], | ||
[ | ||
"1998-06-14T19:59:53.000Z", | ||
"28.87.6.0", | ||
"GET /images/comp_bg2_hm.gif HTTP/1.0", | ||
404, | ||
349, | ||
1998, | ||
6, | ||
14 | ||
] | ||
], | ||
"total": 5, | ||
"size": 5 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"data": { | ||
"ok": true, | ||
"resp": { | ||
"status": "SUCCESS", | ||
"schema": [ | ||
{ | ||
"name": "count(status)", | ||
"type": "long" | ||
}, | ||
{ | ||
"name": "clientip", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "status", | ||
"type": "integer" | ||
} | ||
], | ||
"datarows": [ | ||
[ | ||
78, | ||
"99.99.9.0", | ||
200 | ||
], | ||
[ | ||
133, | ||
"99.99.8.0", | ||
200 | ||
], | ||
[ | ||
542, | ||
"99.99.6.0", | ||
200 | ||
], | ||
[ | ||
15, | ||
"99.99.5.0", | ||
200 | ||
], | ||
[ | ||
4, | ||
"99.99.4.0", | ||
200 | ||
], | ||
[ | ||
71, | ||
"99.99.3.0", | ||
200 | ||
], | ||
[ | ||
143, | ||
"99.99.20.0", | ||
200 | ||
], | ||
[ | ||
39, | ||
"99.99.2.0", | ||
200 | ||
], | ||
[ | ||
156, | ||
"99.99.19.0", | ||
200 | ||
], | ||
[ | ||
64, | ||
"99.99.18.0", | ||
200 | ||
] | ||
], | ||
"total": 10, | ||
"size": 10 | ||
} | ||
} | ||
} |
Oops, something went wrong.