-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # 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
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
55aed11
Do not truncate aggregate table
rnchakraborty 5d4c81a
Delete UsageExplorerCloudPostIngestTest.php
rnchakraborty 2b8c55e
partial cleanup
rnchakraborty e778477
Merge branch 'RC_DontTruncateAggregates' of https://github.com/chakra…
rnchakraborty 6f94254
more cleanup
rnchakraborty 34a680b
sigh
rnchakraborty 89b7928
no longer add one line
rnchakraborty deb991e
made the start/stop times make actual sense
rnchakraborty 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
Next
Next commit
Do not truncate aggregate table
- Loading branch information
commit 55aed11b4d89c5f0e5bdfb3ef417009ae455fbc1
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
32 changes: 32 additions & 0 deletions
32
...xdmod/modules/xdmod/regression_tests/lib/Controllers/UsageExplorerCloudPostIngestTest.php
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,32 @@ | ||
<?php | ||
|
||
namespace Controllers; | ||
|
||
class UsageExplorerCloudPostIngestTest extends UsageExplorerTest | ||
{ | ||
|
||
public function csvExportProvider(){ | ||
parent::$baseDir = __DIR__ . '/../../../tests/artifacts/xdmod-test-artifacts/xdmod/post_ingest/'; | ||
parent::defaultSetup(); | ||
|
||
$statistics = array( | ||
'cloud_num_sessions_ended', | ||
'cloud_num_sessions_running', | ||
'cloud_num_sessions_started', | ||
); | ||
|
||
$group_bys = array( | ||
'none', | ||
); | ||
|
||
$varSettings = array( | ||
'realm' => array('Cloud'), | ||
'dataset_type' => array('aggregate', 'timeseries'), | ||
'statistic' => $statistics, | ||
'group_by' => $group_bys, | ||
'aggregation_unit' => array_keys($this->aggregationUnits) | ||
); | ||
|
||
return parent::generateTests($varSettings, '2018-05-19', '2018-05-19'); | ||
} | ||
} |
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
Oops, something went wrong.
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).