You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2021/08/27 04:02:28 UTC

[iotdb] branch iotdb-1591 created (now 02153b6)

This is an automated email from the ASF dual-hosted git repository.

rong pushed a change to branch iotdb-1591
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


      at 02153b6  [IOTDB-1591] Execute CREATE FUNCTION on 1 node, this FUNCTION is invisible to other nodes

This branch includes the following new commits:

     new 02153b6  [IOTDB-1591] Execute CREATE FUNCTION on 1 node, this FUNCTION is invisible to other nodes

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[iotdb] 01/01: [IOTDB-1591] Execute CREATE FUNCTION on 1 node, this FUNCTION is invisible to other nodes

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rong pushed a commit to branch iotdb-1591
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 02153b65f3cec887cf27e01509a99dead6c1b82c
Author: Steve Yurong Su <ro...@apache.org>
AuthorDate: Fri Aug 27 11:45:51 2021 +0800

    [IOTDB-1591] Execute CREATE FUNCTION on 1 node, this FUNCTION is invisible to other nodes
---
 docs/UserGuide/Advanced-Features/UDF-User-Defined-Function.md    | 7 ++++---
 docs/zh/UserGuide/Advanced-Features/UDF-User-Defined-Function.md | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/docs/UserGuide/Advanced-Features/UDF-User-Defined-Function.md b/docs/UserGuide/Advanced-Features/UDF-User-Defined-Function.md
index 5ed6539..203b7ee 100644
--- a/docs/UserGuide/Advanced-Features/UDF-User-Defined-Function.md
+++ b/docs/UserGuide/Advanced-Features/UDF-User-Defined-Function.md
@@ -388,7 +388,8 @@ The process of registering a UDF in IoTDB is as follows:
 
 1. Implement a complete UDF class, assuming the full class name of this class is `org.apache.iotdb.udf.ExampleUDTF`.
 2. Package your project into a JAR. If you use Maven to manage your project, you can refer to the Maven project example above.
-3. Place the JAR package in the directory `iotdb-server-0.13.0-SNAPSHOT/ext/udf` or in a subdirectory of `iotdb-server-0.13.0-SNAPSHOT/ext/udf`.
+3. Place the JAR package in the directory `iotdb-server-0.13.0-SNAPSHOT-all-bin/ext/udf` or in a subdirectory of `iotdb-server-0.13.0-SNAPSHOT-all-bin/ext/udf`.
+   **Note that when deploying a cluster, you need to ensure that there is a corresponding JAR package in the UDF JAR package path of each node. **
     
     > You can specify the root path for the UDF to load the Jar by modifying the 'udf_root_dir' in the configuration file.
 4. Register the UDF with the SQL statement, assuming that the name given to the UDF is `example`.
@@ -581,7 +582,7 @@ Q1: **How to modify the registered UDF? **
 A1: Assume that the name of the UDF is `example` and the full class name is `org.apache.iotdb.udf.ExampleUDTF`, which is introduced by `example.jar`.
 
 1. Unload the registered function by executing `DROP FUNCTION example`.
-2. Delete `example.jar` under `iotdb-server-0.13.0-SNAPSHOT/ext/udf`.
+2. Delete `example.jar` under `iotdb-server-0.13.0-SNAPSHOT-all-bin/ext/udf`.
 3. Modify the logic in `org.apache.iotdb.udf.ExampleUDTF` and repackage it. The name of the JAR package can still be `example.jar`.
-4. Upload the new JAR package to `iotdb-server-0.13.0-SNAPSHOT/ext/udf`.
+4. Upload the new JAR package to `iotdb-server-0.13.0-SNAPSHOT-all-bin/ext/udf`.
 5. Load the new UDF by executing `CREATE FUNCTION example AS "org.apache.iotdb.udf.ExampleUDTF"`.
diff --git a/docs/zh/UserGuide/Advanced-Features/UDF-User-Defined-Function.md b/docs/zh/UserGuide/Advanced-Features/UDF-User-Defined-Function.md
index a10f6eb..0f010bc 100644
--- a/docs/zh/UserGuide/Advanced-Features/UDF-User-Defined-Function.md
+++ b/docs/zh/UserGuide/Advanced-Features/UDF-User-Defined-Function.md
@@ -349,7 +349,8 @@ UDTF 的结束方法,您可以在此方法中进行一些资源释放等的操
 
 1. 实现一个完整的 UDF 类,假定这个类的全类名为`org.apache.iotdb.udf.UDTFExample`
 2. 将项目打成 JAR 包,如果您使用 Maven 管理项目,可以参考上述 Maven 项目示例的写法
-3. 将 JAR 包放置到目录 `iotdb-server-0.13.0-SNAPSHOT/ext/udf` (也可以是`iotdb-server-0.13.0-SNAPSHOT/ext/udf`的子目录)下。
+3. 将 JAR 包放置到目录 `iotdb-server-0.13.0-SNAPSHOT-all-bin/ext/udf` (也可以是`iotdb-server-0.13.0-SNAPSHOT-all-bin/ext/udf`的子目录)下。
+   **注意,在部署集群的时候,需要保证每一个节点的 UDF JAR 包路径下都存在相应的 JAR 包。**
    
     > 您可以通过修改配置文件中的`udf_root_dir`来指定 UDF 加载 Jar 的根路径。
 4. 使用 SQL 语句注册该 UDF,假定赋予该 UDF 的名字为`example`
@@ -512,7 +513,7 @@ SHOW FUNCTIONS
 A1: 假设 UDF 的名称为`example`,全类名为`org.apache.iotdb.udf.UDTFExample`,由`example.jar`引入
 
 1. 首先卸载已经注册的`example`函数,执行`DROP FUNCTION example`
-2. 删除 `iotdb-server-0.13.0-SNAPSHOT/ext/udf` 目录下的`example.jar`
+2. 删除 `iotdb-server-0.13.0-SNAPSHOT-all-bin/ext/udf` 目录下的`example.jar`
 3. 修改`org.apache.iotdb.udf.UDTFExample`中的逻辑,重新打包,JAR 包的名字可以仍然为`example.jar`
-4. 将新的 JAR 包上传至 `iotdb-server-0.13.0-SNAPSHOT/ext/udf` 目录下
+4. 将新的 JAR 包上传至 `iotdb-server-0.13.0-SNAPSHOT-all-bin/ext/udf` 目录下
 5. 装载新的 UDF,执行`CREATE FUNCTION example AS "org.apache.iotdb.udf.UDTFExample"`