vertica/Vertica-Extension-Packages — pull request #23 by jakajancar (2012-10-28 21:24:18+00:00)
Title: shell_load_package major revamp

After adding exit code checking to ExternalSource and trying to add some ENV vars, it pained me to see that ExternalSource and ExternalFilter were implemented completely separately.

I'm sorry for this being all in one commit/pull request. I had some version control issues and I lost history. I'll try to describe the changes here.

ExternalSource and ExternalFilter now "mix in" ProcessLaunchingPlugin and share most of the code, which means:

- ExternalSource, like already ExternalFilter, is no longer using popen,
- ExternalSource, like already ExternalFilrer, fails on stderr,
- ExternalFilter, like already ExternalSource, is checking for command exit status.

Some other minor changes:

- Code cleaned up to use spaces everywhere and 4 space indentation.
- A lot of error checking added.
- Cleaned up the process() function to return from just one place.
- Makefile:
- `make clean` does not fail if not build and deletes the entire build/ directory.
- `make uninstall` does not fail if not installed.
- `make test` uninstalls any previously installed versions of the plugins.
- Environment variables:
- ExternalFilder exposes CURRENT_NODE_NAME
- ExternalSource exposes CURRENT_NODE_NAME, TARGET_NODE_NAMES, SPLIT_INDEX, NUM_SPLITS

Disclaimer: forgive me, this is my first time writing C++ :)

/cc @aseering