The Kuiper plugin command line tools allows you to manage plugins, such as create, show and drop plugins. Notice that, drop a plugin will need to restart kuiper to take effect. To update a plugin, do the following:
The command is used for creating a plugin. The plugin's definition is specified with JSON format.
create plugin $plugin_type $plugin_name $plugin_json | create plugin $plugin_type $plugin_name -f $plugin_def_file
The plugin can be created with two ways.
Sample:
# bin/cli create plugin source random {"file":"http://127.0.0.1/plugins/sources/random.zip"}
The command create a source plugin named random
.
-f
option.Sample:
# bin/cli create plugin sink plugin1 -f /tmp/plugin1.txt
Below is the contents of plugin1.txt
.
{
"file":"http://127.0.0.1/plugins/sources/random.zip"
}
["source", "sink", "functions"]
Random
, then the name of this plugin is random
.The command is used for displaying all plugins defined in the server for a plugin type.
show plugins function
Sample:
# bin/cli show plugins function
function1
function2
The command is used to print out the detailed definition of a plugin.
describe plugin $plugin_type $plugin_name
Sample:
# bin/cli describe plugin source plugin1
{
"name": "plugin1",
"version": "1.0.0"
}
The command is used for drop the plugin.
drop plugin $plugin_type $plugin_name -s $stop
In which, -s $stop
is an optional boolean parameter. If it is set to true, the Kuiper server will be stopped for the delete to take effect. The user will need to restart it manually.
Sample:
# bin/cli drop plugin source random
Plugin random is dropped.