GitHub user mmiklavc opened a pull request:
https://github.com/apache/incubator-metron/pull/312
METRON-505: Add environment variable and system property functions to the
Stellar language
Tested in quick-dev from the Stellar REPL.
Build the platform, as normal. The new functions will get picked up
automatically on the classpath via the annotations.
**Examples:**
```
SYSTEM_ENV_GET for exposing environment variables
[root@node1 bin]# export MIKE_VAR="blah blah blah"
[root@node1 bin]# echo $MIKE_VAR
blah blah blah
[Stellar]>>> mikevar := SYSTEM_ENV_GET('MIKE_VAR')
[Stellar]>>> mikevar
blah blah blah
SYSTEM_PROPERTY_GET for exposing system properties
[Stellar]>>> prop := SYSTEM_PROPERTY_GET( 'os.name' )
[Stellar]>>> prop
Linux
[Stellar]>>> prop := SYSTEM_PROPERTY_GET( 'user.name' )
[Stellar]>>> prop
root
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mmiklavc/incubator-metron add-sysfuncs-stellar
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-metron/pull/312.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #312
----
commit 9ce57ee69e852c8f4816aa5822eb6b21ab9bbdca
Author: Michael Miklavcic <[email protected]>
Date: 2016-10-17T01:26:47Z
METRON-505: Add environment variable and system property functions to the
Stellar language
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---