-
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.
add queries, table & results for a generic testing staging framework …
…setup Signed-off-by: YANGDB <[email protected]>
- Loading branch information
Showing
17 changed files
with
561 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SELECT * FROM mys3.default.http_logs 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT COUNT(DISTINCT clientip) as unique_client_ips | ||
FROM mys3.default.http_logs; |
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 @@ | ||
SELECT | ||
FIRST(day) AS day, | ||
status, | ||
COUNT(status) AS status_count_by_day | ||
FROM (SELECT * FROM mys3.default.http_logs LIMIT 1000) | ||
GROUP BY day, status | ||
ORDER BY day, status | ||
LIMIT 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,9 @@ | ||
SELECT | ||
FIRST(day) AS day, | ||
status, | ||
COUNT(status) AS status_count_by_day | ||
FROM mys3.default.http_logs | ||
WHERE status >= 400 | ||
GROUP BY day, status | ||
ORDER BY day, status | ||
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 @@ | ||
SELECT | ||
status, | ||
COUNT(status) AS status_count_by_day | ||
FROM mys3.default.http_logs | ||
WHERE status >= 400 | ||
GROUP BY status | ||
ORDER BY status | ||
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,3 @@ | ||
SELECT day, SUM(size) as total_size FROM mys3.default.http_logs | ||
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SELECT count(*) as count, clientip | ||
FROM mys3.default.http_logs | ||
WHERE clientip BETWEEN '208.0.0.0' AND '210.0.0.0' | ||
GROUP BY clientip | ||
ORDER BY DESC count | ||
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,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-10T14:37:23.000Z", | ||
"76.112.16.0", | ||
"GET /images/102325.gif HTTP/1.0", | ||
200, | ||
1555, | ||
1998, | ||
6, | ||
10 | ||
], | ||
[ | ||
"1998-06-10T14:37:23.000Z", | ||
"78.109.16.0", | ||
"GET /english/images/comp_bu_stage1n.gif HTTP/1.0", | ||
200, | ||
1548, | ||
1998, | ||
6, | ||
10 | ||
], | ||
[ | ||
"1998-06-10T14:37:23.000Z", | ||
"140.48.14.0", | ||
"GET /images/102321.gif HTTP/1.0", | ||
200, | ||
1602, | ||
1998, | ||
6, | ||
10 | ||
], | ||
[ | ||
"1998-06-10T14:37:23.000Z", | ||
"114.113.16.0", | ||
"GET /english/images/team_bu_roster_on.gif HTTP/1.0", | ||
200, | ||
1567, | ||
1998, | ||
6, | ||
10 | ||
], | ||
[ | ||
"1998-06-10T14:37:24.000Z", | ||
"79.48.14.0", | ||
"GET /english/images/comp_bu_stage1n.gif HTTP/1.0", | ||
200, | ||
1548, | ||
1998, | ||
6, | ||
10 | ||
] | ||
], | ||
"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,21 @@ | ||
{ | ||
"data": { | ||
"ok": true, | ||
"resp": { | ||
"status": "SUCCESS", | ||
"schema": [ | ||
{ | ||
"name": "unique_client_ips", | ||
"type": "long" | ||
} | ||
], | ||
"datarows": [ | ||
[ | ||
1149519 | ||
] | ||
], | ||
"total": 1, | ||
"size": 1 | ||
} | ||
} | ||
} |
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,31 @@ | ||
{ | ||
"data": { | ||
"ok": true, | ||
"resp": { | ||
"status": "SUCCESS", | ||
"schema": [ | ||
{ | ||
"name": "day", | ||
"type": "integer" | ||
}, | ||
{ | ||
"name": "status", | ||
"type": "integer" | ||
}, | ||
{ | ||
"name": "status_count_by_day", | ||
"type": "long" | ||
} | ||
], | ||
"datarows": [ | ||
[ | ||
12, | ||
200, | ||
1000 | ||
] | ||
], | ||
"total": 1, | ||
"size": 1 | ||
} | ||
} | ||
} |
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,126 @@ | ||
{ | ||
"data": { | ||
"ok": true, | ||
"resp": { | ||
"status": "SUCCESS", | ||
"schema": [ | ||
{ | ||
"name": "day", | ||
"type": "integer" | ||
}, | ||
{ | ||
"name": "status", | ||
"type": "integer" | ||
}, | ||
{ | ||
"name": "status_count_by_day", | ||
"type": "long" | ||
} | ||
], | ||
"datarows": [ | ||
[ | ||
1, | ||
400, | ||
20 | ||
], | ||
[ | ||
1, | ||
404, | ||
1757 | ||
], | ||
[ | ||
1, | ||
500, | ||
33 | ||
], | ||
[ | ||
2, | ||
400, | ||
4 | ||
], | ||
[ | ||
2, | ||
404, | ||
1743 | ||
], | ||
[ | ||
2, | ||
500, | ||
36 | ||
], | ||
[ | ||
3, | ||
400, | ||
13 | ||
], | ||
[ | ||
3, | ||
404, | ||
12790 | ||
], | ||
[ | ||
3, | ||
500, | ||
56 | ||
], | ||
[ | ||
4, | ||
400, | ||
119 | ||
], | ||
[ | ||
4, | ||
403, | ||
1 | ||
], | ||
[ | ||
4, | ||
404, | ||
48657 | ||
], | ||
[ | ||
4, | ||
500, | ||
513 | ||
], | ||
[ | ||
5, | ||
400, | ||
19 | ||
], | ||
[ | ||
5, | ||
404, | ||
3190 | ||
], | ||
[ | ||
5, | ||
500, | ||
47 | ||
], | ||
[ | ||
6, | ||
400, | ||
35 | ||
], | ||
[ | ||
6, | ||
404, | ||
4596 | ||
], | ||
[ | ||
6, | ||
500, | ||
47 | ||
], | ||
[ | ||
7, | ||
400, | ||
36 | ||
] | ||
], | ||
"total": 20, | ||
"size": 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,38 @@ | ||
{ | ||
"data": { | ||
"ok": true, | ||
"resp": { | ||
"status": "SUCCESS", | ||
"schema": [ | ||
{ | ||
"name": "status", | ||
"type": "integer" | ||
}, | ||
{ | ||
"name": "status_count_by_day", | ||
"type": "long" | ||
} | ||
], | ||
"datarows": [ | ||
[ | ||
400, | ||
2677 | ||
], | ||
[ | ||
403, | ||
224 | ||
], | ||
[ | ||
404, | ||
1224876 | ||
], | ||
[ | ||
500, | ||
6134 | ||
] | ||
], | ||
"total": 4, | ||
"size": 4 | ||
} | ||
} | ||
} |
Oops, something went wrong.