JAR statements are used to add user jars into the classpath or remove user jars from the classpath or show added jars in the classpath in the runtime.
JAR语句用于将用户jars添加到类路径中,或从类路径中删除用户jars,或在runtime中的类路径中显示添加的jars。
Flink SQL supports the following JAR statements for now:
Flink SQL目前支持以下JAR语句:
Attention JAR statements only work in the SQL CLI.
注意:JAR语句只能在SQL CLI中工作。
SQL CLI
The following examples show how to run JAR statements in SQL CLI.
以下示例显示了如何在SQL CLI中运行JAR语句。
Flink SQL> ADD JAR '/path/hello.jar';
[INFO] The specified jar is added into session classloader.
Flink SQL> SHOW JARS;
/path/hello.jar
Flink SQL> REMOVE JAR '/path/hello.jar';
[INFO] The specified jar is removed from session classloader.
ADD JAR '.jar'
Currently it only supports to add the local jar into the session classloader.
目前,它只支持将本地jar添加到会话类加载器中。
REMOVE JAR '.jar'
Currently it only supports to remove the jar that is added by the ADD JAR statements.
目前,它只支持删除由ADD JAR语句添加的jar。
SHOW JARS
Show all added jars in the session classloader which are added by ADD JAR statements.
显示会话类加载器中由ADD JAR语句添加的所有jars。