Skip to content
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

Add support for cloud data to xdmod-shredder and xdmod-ingestor #739

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ed0a524
Changes to xdmod-ingestor and xdmod-shredder to support cloud based e…
eiffel777 Oct 24, 2018
56ae3f9
adding checking for exception for when cloud table do not exist. adde…
eiffel777 Nov 8, 2018
c10909b
building filter list after running cloud aggregation in ingestor script
eiffel777 Nov 26, 2018
b55927a
add cloud shredder abstract class to reduce code duplication. renamed…
eiffel777 Nov 26, 2018
a1d9388
added new function to check if a realm is enabled before trying to in…
eiffel777 Nov 28, 2018
7074fc5
adding tests for new shredders
eiffel777 Nov 30, 2018
eef0291
adding phpdocs for realmEnabled function
eiffel777 Nov 30, 2018
901679b
documentation changes
eiffel777 Nov 30, 2018
b6d5609
style and test changes
eiffel777 Nov 30, 2018
ddf1eba
style changes
eiffel777 Nov 30, 2018
29c3801
adding newline that shouldn't have been deleted
eiffel777 Nov 30, 2018
e228e6d
use false instead of null to determine if realm should be aggregated
eiffel777 Dec 3, 2018
ebe18ad
change $realmToAggregate to default to false instead of null
eiffel777 Dec 3, 2018
64abdda
addressing nitpicks from @plessbd
eiffel777 Dec 14, 2018
37564c8
fixing merge conflict
eiffel777 Dec 14, 2018
30a5391
removing minmaxdate statement from bootstrap.sh
eiffel777 Dec 14, 2018
3ba69fc
Merge branch 'xdmod8.1' of https://github.com/ubccr/xdmod into add-cl…
eiffel777 Dec 17, 2018
c1af695
setting etl pipline to use for cloud shredders in constructor.
eiffel777 Dec 17, 2018
45db850
changes to get tests to pass
eiffel777 Dec 17, 2018
b60aa6b
update suggested by @plessbd
eiffel777 Dec 20, 2018
f3dc0ec
Merge branch 'xdmod8.1' into add-cloud-ingestion-to-ingestor-script
Dec 20, 2018
0eb33e0
Merge branch 'xdmod8.1' into add-cloud-ingestion-to-ingestor-script
Dec 20, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions bin/xdmod-shredder
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,17 @@ function main()
$logger->notice("Job errors written to '$jobErrorLogFile'");
}

if (!$dryRun && in_array($format, array('pbs', 'slurm', 'lsf', 'sge', 'uge'))) {
$logger->notice('Normalizing data');
if (!$dryRun) {
$logger->notice('Normalizing data!');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am so excited we are normalizing this data, before I was just fine.


try {
$ingestor = $shredder->getJobIngestor();
$ingestor->ingest();
// The cloud shredders do not have jobs to ingest and return false when
// getJobInestor is called for them so we don't have to hard code skippping
// those formats here.
if($ingestor !== false){
$ingestor->ingest();
}
} catch (Exception $e) {
$logger->crit(array(
'message' => 'Ingestion failed: ' . $e->getMessage(),
Expand Down
8 changes: 4 additions & 4 deletions classes/OpenXdmod/Shredder/Genericcloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

namespace OpenXdmod\Shredder;

use CCR\DB\iDatabase;

class Genericcloud extends aCloud
plessbd marked this conversation as resolved.
Show resolved Hide resolved
{
/**
* @inheritdoc
*/
public function shredDirectory($directory)
{
$this->setEtlPipeline(['jobs-cloud-ingest-eucalyptus']);
return parent::shredDirectory($directory);
public function __construct(iDatabase $db){
parent::__construct($db, ['jobs-cloud-ingest-eucalyptus']);
}
}
8 changes: 4 additions & 4 deletions classes/OpenXdmod/Shredder/Openstack.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

namespace OpenXdmod\Shredder;

use CCR\DB\iDatabase;

class OpenStack extends aCloud
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the filename match the class name OpenStack vs Openstack

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch. It's changed now.

{
/**
* @inheritdoc
*/
public function shredDirectory($directory)
{
$this->setEtlPipeline(['jobs-cloud-ingest-openstack']);
return parent::shredDirectory($directory);
public function __construct(iDatabase $db){
parent::__construct($db, ['jobs-cloud-ingest-openstack']);
}
}
10 changes: 7 additions & 3 deletions classes/OpenXdmod/Shredder/aCloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ abstract class aCloud extends Shredder
/**
* @inheritdoc
*/
public function __construct(iDatabase $db)
public function __construct(iDatabase $db, array $pipelines)
{
$this->logger = \Log::singleton('null');
$this->etlPipelines = $pipelines;
}

/**
Expand Down Expand Up @@ -60,7 +61,10 @@ public function shredDirectory($directory)
);
}

public function setEtlPipeline(array $pipelines){
$this->etlPipelines = $pipelines;
/**
* Returns false so the same function in the parent class is not called since the cloud formats do not have jobs to ingest
*/
public function getJobIngestor(){
return false;
}
}