-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not truncate aggregate tables on each ingest #841
Merged
chakrabortyr
merged 8 commits into
ubccr:xdmod8.1
from
chakrabortyr:RC_DontTruncateAggregates
Mar 18, 2019
+234
−20
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
55aed11
Do not truncate aggregate table
chakrabortyr 5d4c81a
Delete UsageExplorerCloudPostIngestTest.php
chakrabortyr 2b8c55e
partial cleanup
chakrabortyr e778477
Merge branch 'RC_DontTruncateAggregates' of https://github.com/chakra…
chakrabortyr 6f94254
more cleanup
chakrabortyr 34a680b
sigh
chakrabortyr 89b7928
no longer add one line
chakrabortyr deb991e
made the start/stop times make actual sense
chakrabortyr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
36 changes: 36 additions & 0 deletions
36
open_xdmod/modules/xdmod/regression_tests/post_ingest_test.sh
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,36 @@ | ||
#!/bin/sh | ||
# Tests that cloud ETL works after upgrade + reingestion | ||
|
||
BASEDIR=./open_xdmod/modules/xdmod/regression_tests | ||
REF_DIR=/var/tmp/referencedata | ||
last_modified_start_date=$(date +'%F %T') | ||
|
||
oldCount=$(mysql -N -B -e "SELECT SUM(num_sessions_ended) FROM modw_cloud.cloudfact_by_month WHERE month = 4;") | ||
|
||
if [ $oldCount -ne 53 ] | ||
then | ||
echo " Count $oldCount did not match expected result of 53" | ||
exit 1 | ||
fi | ||
|
||
sudo -u xdmod xdmod-shredder -r openstack -d $REF_DIR/openstack_upgrade -f openstack | ||
sudo -u xdmod xdmod-ingestor --datatype=openstack --last-modified-start-date "$last_modified_start_date" | ||
sudo -u xdmod xdmod-ingestor --aggregate=cloud --last-modified-start-date "$last_modified_start_date" | ||
|
||
newCount=$(mysql -N -B -e "SELECT SUM(num_sessions_ended) FROM modw_cloud.cloudfact_by_month WHERE month = 4;") | ||
|
||
if [ $newCount -ne 52 ] | ||
then | ||
echo " Count $newCount did not match expected result of 52" | ||
exit 1 | ||
|
||
fi | ||
|
||
newRows=$(mysql -N -B -e "SELECT SUM(num_sessions_ended) FROM modw_cloud.cloudfact_by_month WHERE month = 5;") | ||
|
||
if [ $newRows -ne 2 ] | ||
then | ||
echo " Count $newRows did not match expected result of 2" | ||
exit 1 | ||
|
||
fi |
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
151 changes: 151 additions & 0 deletions
151
...ifacts/xdmod/referencedata/openstack_upgrade/2018-05-19T00:00:00_2018-05-19T23:59:59.json
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,151 @@ | ||
[{ | ||
"disk_gb": "20", | ||
"ephemeral_gb": "0", | ||
"event_type": "compute.instance.power_on.start", | ||
"generated": "2018-05-19T18:09:40.154919", | ||
"host": "srv-p24-35.cbls.ccr.buffalo.edu", | ||
"instance_id": "85c3287c-c9a7-47d6-9019-52bb41235795", | ||
"instance_type": "c1.m4", | ||
"instance_type_id": "9", | ||
"launched_at": "2018-05-19T14:47:59", | ||
"memory_mb": "4096", | ||
"message_id": "b9c11cb3-b9a2-44af-a69d-cba8986ac67e", | ||
"project_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"project_name": "zealous", | ||
"raw": {}, | ||
"request_id": "req-bd0507cf-69db-4edb-be09-5b386f86da92", | ||
"resource_id": "85c3287c-c9a7-47d6-9019-52bb41235795", | ||
"root_gb": "20", | ||
"service": "compute", | ||
"state": "stopped", | ||
"tenant_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"user_id": "0ce3dbe7d215b55feb049c557f52dc84", | ||
"user_name": "setusca", | ||
"vcpus": "1" | ||
}, | ||
{ | ||
"disk_gb": "20", | ||
"ephemeral_gb": "0", | ||
"event_type": "compute.instance.power_on.end", | ||
"generated": "2018-05-19T18:09:41.061655", | ||
"host": "srv-p24-35.cbls.ccr.buffalo.edu", | ||
"instance_id": "85c3287c-c9a7-47d6-9019-52bb41235795", | ||
"instance_type": "c1.m4", | ||
"instance_type_id": "9", | ||
"launched_at": "2018-05-19T14:47:59", | ||
"memory_mb": "4096", | ||
"message_id": "aa5b4ed2-b65c-4dfd-b2c2-4c876805e7fa", | ||
"project_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"project_name": "zealous", | ||
"raw": {}, | ||
"request_id": "req-bd0507cf-69db-4edb-be09-5b386f86da92", | ||
"resource_id": "85c3287c-c9a7-47d6-9019-52bb41235795", | ||
"root_gb": "20", | ||
"service": "compute", | ||
"state": "active", | ||
"tenant_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"user_id": "0ce3dbe7d215b55feb049c557f52dc84", | ||
"user_name": "setusca", | ||
"vcpus": "1" | ||
}, | ||
{ | ||
"disk_gb": "20", | ||
"ephemeral_gb": "0", | ||
"event_type": "compute.instance.power_off.start", | ||
"generated": "2018-05-19T16:47:16.798308", | ||
"host": "srv-p24-35.cbls.ccr.buffalo.edu", | ||
"instance_id": "85c3287c-c9a7-47d6-9019-52bb41235795", | ||
"instance_type": "c1.m4", | ||
"instance_type_id": "9", | ||
"launched_at": "2018-05-19T14:47:59", | ||
"memory_mb": "4096", | ||
"message_id": "53a271f0-b30b-4f0d-9cbf-b6c9733777e4", | ||
"project_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"project_name": "zealous", | ||
"raw": {}, | ||
"request_id": "req-6fcc1c24-3303-448d-8c72-2789ca1b74f3", | ||
"resource_id": "85c3287c-c9a7-47d6-9019-52bb41235795", | ||
"root_gb": "20", | ||
"service": "compute", | ||
"state": "active", | ||
"tenant_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"user_id": "0ce3dbe7d215b55feb049c557f52dc84", | ||
"user_name": "setusca", | ||
"vcpus": "1" | ||
}, | ||
{ | ||
"disk_gb": "20", | ||
"ephemeral_gb": "0", | ||
"event_type": "compute.instance.power_off.end", | ||
"generated": "2018-05-19T16:47:16.905308", | ||
"host": "srv-p24-35.cbls.ccr.buffalo.edu", | ||
"instance_id": "85c3287c-c9a7-47d6-9019-52bb41235795", | ||
"instance_type": "c1.m4", | ||
"instance_type_id": "9", | ||
"launched_at": "2018-05-19T14:47:59", | ||
"memory_mb": "4096", | ||
"message_id": "65f0085b-3781-47e4-98df-fcdc5e8ece44", | ||
"project_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"project_name": "zealous", | ||
"raw": {}, | ||
"request_id": "req-6fcc1c24-3303-448d-8c72-2789ca1b74f3", | ||
"resource_id": "85c3287c-c9a7-47d6-9019-52bb41235795", | ||
"root_gb": "20", | ||
"service": "compute", | ||
"state": "stopped", | ||
"tenant_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"user_id": "0ce3dbe7d215b55feb049c557f52dc84", | ||
"user_name": "setusca", | ||
"vcpus": "1" | ||
}, | ||
{ | ||
"disk_gb": "20", | ||
"ephemeral_gb": "0", | ||
"event_type": "compute.instance.power_off.start", | ||
"generated": "2018-05-19T23:00:54.193570", | ||
"host": "srv-p24-34.cbls.ccr.buffalo.edu", | ||
"instance_id": "565e8a1e-a83e-4104-a32c-85c79b7737fd", | ||
"instance_type": "c4.m16", | ||
"instance_type_id": "2", | ||
"launched_at": "2018-05-19T17:38:51", | ||
"memory_mb": "16384", | ||
"message_id": "22249a01-917c-47ed-988a-ccd94fbfb389", | ||
"project_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"project_name": "zealous", | ||
"raw": {}, | ||
"request_id": "req-020331fc-0d2d-461c-ab18-06c635bd4e9b", | ||
"resource_id": "565e8a1e-a83e-4104-a32c-85c79b7737fd", | ||
"root_gb": "20", | ||
"service": "compute", | ||
"state": "active", | ||
"tenant_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"user_id": "3abcb51ff942a45b52ac90915ef4c7fb", | ||
"user_name": "yerwa", | ||
"vcpus": "4" | ||
}, | ||
{ | ||
"disk_gb": "20", | ||
"ephemeral_gb": "0", | ||
"event_type": "compute.instance.power_off.end", | ||
"generated": "2018-05-19T23:00:56.194680", | ||
"host": "srv-p24-34.cbls.ccr.buffalo.edu", | ||
"instance_id": "565e8a1e-a83e-4104-a32c-85c79b7737fd", | ||
"instance_type": "c4.m16", | ||
"instance_type_id": "2", | ||
"launched_at": "2018-05-19T17:38:54", | ||
"memory_mb": "16384", | ||
"message_id": "4d0c12a9-9e66-4c08-98dc-1982443bcb20", | ||
"project_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"project_name": "zealous", | ||
"raw": {}, | ||
"request_id": "req-020331fc-0d2d-461c-ab18-06c635bd4e9b", | ||
"resource_id": "565e8a1e-a83e-4104-a32c-85c79b7737fd", | ||
"root_gb": "20", | ||
"service": "compute", | ||
"state": "active", | ||
"tenant_id": "4aeb007a4f9020333a1a1be224bef276", | ||
"user_id": "3abcb51ff942a45b52ac90915ef4c7fb", | ||
"user_name": "yerwa", | ||
"vcpus": "4" | ||
} | ||
] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should come up with a code parser rule that flags this class of whitespace change (and marks it as FAIL).