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

DM-1350: General cleanup of Events package #1

Merged
merged 21 commits into from Mar 31, 2015
Merged

Conversation

PaulPrice
Copy link
Contributor

No description provided.

Change copyright notices to new standard copyright
Event (and their subclasses) carry certain standard keywords in message headers that are filterable server-side, when used in conjunction with selectors.   The rest of the property set information is kept in the payload of the message, and is not filterable with selectors.

This change allows the user to add keywords and values that will be added into the message header, so they can be filtered server-side as well.
Added Host and LocationID objects.
Changed references from OriginatorID value to LocationID objects in CommandEvent and StatusEvent.
Added references to Host and Location in eventsLib.i, and removed PipelineLogEvent.h
Added unit tests for Host and LocationID

further notes about this change:

CommandEvent - Remove old references to OriginatorID.  These are replaced
with hostname and local id; these are used in conjunction with process id
to achieve the same purpose as OriginatorID, while fixing the issue of
the OriginatorID having a localID value that can potentially churn too
quickly.

The process ID in OriginatorID was originally 16-bits, but this broken on
Mac because it can have a larger than 16-bit pid.  This was temporarily
changed to 17-bits (to get a build running), and is now 32-bit with this
change.  Hostname was used to make it more user-friendly.  OriginatorID
could be addressed as one value before in an event selector; this can
still be achieved by using hostname, ipid, and localid together.  These
values can be retrieved together in a LocationID object.
Note that LogEvent.h is going to be change to depend on log instead
of pex_logging in the near future.
wasn’t being used when this package was originally written. Nearly
all the tests were renamed to better describe what was being tested. In
tests where Policy was being used, those tests were removed.  Note that
nearly all these tests depend on sending messages to the central
activemq broker.
…es to policy.

Note that current references to pex_logging will change to the new log package in the near future.
…a typemap that

mapped a vector of std::string to list;  without it, it gets returned as a tuple.  Added
the correct typemap so this mapping is performed.
@@ -25,10 +25,12 @@

if __name__ == "__main__":
print "starting...\n"
x = events.EventReceiver("lsst8.ncsa.uiuc.edu", "LSSTLogging")
x = events.EventReceiver("lsst8.ncsa.illinois.edu", events.EventLog.LOGGING_TOPIC)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I realise you're inheriting it from previous work, but x is not a very helpful variable name.

* for this process. When created, this represents a unique location ID.
*/
LocationID::LocationID() {
Host host = Host().getHost();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Host::getHost(); --- don't instantiate it just to get to the static method.

…og.py

2. Moved locations of "const" as per LSST C++ style guide and changed
    const PropertySet::Ptr to CONST_PTR(PropertySet).
3. Removed unused variable in EventFactory.cc
4. Added base to get CONST_PTR declaration.
2. Change LocationID returns for CommandEvent methods to return shared pointers
3. Change tests/CommandEvent.py tests to tests against created object's local id.
4. Fix line lengths over 110.
2. Remove constructor/deconstructor and add const to methods in Host.h
3. Remove commented out code, and fix iterators in Events.cc
4. Remove code that created pointers and immediately dereferenced them.
5. Add braces to two line if statements.
…nID.cc

Remove unnecessary includes, namespace and using from Host.cc
Use system constant HOST_NAME_MAX in place of 255.
(didn't include EventLogging.py in that because it's going away real soon now)
Removed packages that weren't necessary in .cfg file
fixed the tests so that they run in the specified domain (ncsa) and are
otherwise skipped.
Some of these (the logging ones) weren't done, because they're going to
be removed and replaced soon.
@srp3rd srp3rd merged commit 727d9bf into master Mar 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants