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

Initial attempt at discovery plugin #719

Merged
merged 7 commits into from
Mar 23, 2016
Merged

Conversation

johann8384
Copy link
Member

Attempting to build a framework for startup plugins.

Testing with this skeleton plugin that I intend to turn into an Apache Curator plugin.

Fixes #716

@johann8384
Copy link
Member Author

Loaded my test plugin:

2016-03-02 22:17:34,277 INFO  [main] CuratorPlugin: Apache Curator ServiceDiscovery Plugin Initialized
2016-03-02 22:17:34,277 INFO  [main] TSDMain: Successfully initialized startup plugin [io.tsdb.opentsdb.discoveryplugins.CuratorPlugin] version: 2.0.0

@johann8384
Copy link
Member Author

Configuration values:

tsd.startup.enabled = true
tsd.startup.plugin = io.tsdb.opentsdb.discoveryplugins.CuratorPlugin
tsd.core.plugin_path = /tmp/plugins

@johann8384
Copy link
Member Author

Notes for me, I need to add a few things to this:

  • Fix build
  • I would like to add a "ready()" call for when the TSDB is open (about when it prints "listening on 4242" in the logs)
  • Add tests

@johann8384
Copy link
Member Author

My test plugin loads cleanly:

2016-03-14 15:33:20,580 DEBUG [main] TSDMain: Startup Plugin is Enabled
2016-03-14 15:33:20,580 DEBUG [main] TSDMain: Plugin Path: /tmp
2016-03-14 15:33:20,587 DEBUG [main] PluginLoader: Found a jar: /tmp/DiscoveryPlugins-1.0-SNAPSHOT.jar
2016-03-14 15:33:20,587 DEBUG [main] PluginLoader: Found a jar: /tmp/DiscoveryPlugins-all-1.0-SNAPSHOT.jar
2016-03-14 15:33:20,587 WARN  [main] PluginLoader: Access denied to directory: /tmp/launchd-1290.iITGIm
2016-03-14 15:33:20,587 WARN  [main] PluginLoader: Access denied to directory: /tmp/launchd-751.hEI1uL
2016-03-14 15:33:20,591 DEBUG [main] PluginLoader: Successfully added JAR to class loader: /tmp/DiscoveryPlugins-1.0-SNAPSHOT.jar
2016-03-14 15:33:20,591 DEBUG [main] TSDMain: Attempt to Load: io.tsdb.opentsdb.discoveryplugins.IdentityPlugin
2016-03-14 15:33:20,594 DEBUG [main] CuratorPlugin: constructor called
2016-03-14 15:33:20,595 INFO  [main] CuratorPlugin: Apache Curator ServiceDiscovery Plugin Initialized
2016-03-14 15:33:20,595 DEBUG [main] CuratorPlugin: Finished with config
2016-03-14 15:33:20,595 INFO  [main] TSDMain: Successfully initialized startup plugin [io.tsdb.opentsdb.discoveryplugins.IdentityPlugin] version: 2.0.0

@johann8384
Copy link
Member Author

Documentation PR added: OpenTSDB/opentsdb.net#79

@johann8384 johann8384 added this to the v2.3.0 milestone Mar 19, 2016
@johann8384 johann8384 merged commit e895983 into OpenTSDB:next Mar 23, 2016
@johann8384 johann8384 deleted the ISSUE-716 branch March 23, 2016 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants