Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add PlugIn structure in AnalyticsDataCollector
- Loading branch information
1 parent
d6c68d7
commit 2f5e7f8
Showing
3 changed files
with
37 additions
and
2 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
20 changes: 20 additions & 0 deletions
20
src/python/WMComponent/AnalyticsDataCollector/PlugIns/PlugInInterface.py
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,20 @@ | ||
|
||
class PlugInInterface(object): | ||
"""Interface for policies""" | ||
def __init__(self, **args): | ||
""" initialize args if needed""" | ||
pass | ||
|
||
def __call__(self, requestDocs, localSummaryCouchDB, centralWMStatsCouchDB): | ||
""" | ||
this needs to be overwritten | ||
requestDocs is request info collected from other resources, which has couchdb doc format. | ||
localSummaryCouchDB, centralWMStatsCouchDB are WMCore.Services.WMStats.WMStatsWriter instances | ||
for local wmagent_summary db and central wmstats couchdb respectfully. | ||
If data needed to be written to wmstats, write to local it will be replicated, | ||
Only in case data doesn't exist in local, write to central wmstats couchdb. | ||
requestDocs can be modified and it will be updated outside the plug in, | ||
So don't push requestDocs to couchdb directly here. | ||
""" | ||
msg = "%s.__call__ is not implemented" % self.__class__.__name__ | ||
raise NotImplementedError(msg) |