Drill has got a great rest support and we can leverage the rest interface to create/update Drill Storage plugins via curl requests.
Request to create a new storage plugin –
curl -X POST -H “Content-Type: application/json” -d ‘{ “name”:”newplugin”, “config”:{“type”: “cassandra”, “host”: “localhost”, “port”: 9042, “enabled”: false}}’ http://localhost:8047/storage/newplugin.json
This creates a new plugin named newplugin for us.
This plugin can then be enabled by this get request –
curl -X GET http://localhost:8047/storage/newplugin/enable/true
We can now use the plugin as we would normally use in Drill.
More details on all other API support can be fetched from the code here –
https://github.com/apache/drill/blob/9e164662f5296f7048c880c40bc551030fb58cca/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/StorageResources.java
Hope this small post was helpful.
Cheers \m/