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

Add third-party plug-in folder and Transformer UDF instruction document. #915

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yoreyuan
Copy link

@yoreyuan yoreyuan commented Dec 16, 2020

添加了 local_storage 文件夹,其中 local_storage/transformer 可专门用来放置第三方及自定义的 Transformer UDF,同时添加了使用文档。

说明

源码中 TransformerRegistry 第 47-104 行的代码中已经实现了从local_storage/transformer 延迟加载第三方 Transformer 的功能,是一种更加优雅加载第三方或自定义 Transformer UDF 的方式,提供一份文档,并推荐这样使用。

同时修复了加载用户使用的 Transformer 方法名的日志输出格式, 因为 functionNames 已经是 List,调用默认的 toString 方法输出后本身已经带有中括号[],可以不用重复输出中括号。

@wangweng155
Copy link

wangweng155 commented Jul 23, 2022

自定义在transformer在多任务下,报错:[Description:[Transformer name has existed]]

有四个任务,每个任务好像去初始化一下我自定义的transformer,第一个任务会初始化transformer成功,但是后面三个任务都会初始化失败。
但是流程还是走下去了,只是我四个任务的意义就没有了,因为都是在用一个transformer处理数据。速度还是慢了
请问有什么解决办法吗?

我的transforms是放置在\datax\local_storage\transformer文件夹下,属于运行时加载的那种。没有直接写死注册到TransformerRegistry

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2024-03-11 15:09:44.384 [taskGroup-0] INFO Channel - Channel set record_speed_limit to -1, No tps activated.
2024-03-11 15:09:44.385 [taskGroup-0] INFO TransformerUtil - user config tranformers [[md5]], loading...
2024-03-11 15:09:44.398 [taskGroup-0] ERROR TransformerRegistry - load Transformer class(com.wugui.datax.transformer.Md5
Transformer) error, path = C:\Users\10982\Desktop\datax\datax\local_storage\transformer\md5
Exception in thread "taskGroup-0" com.alibaba.datax.common.exception.DataXException: Code:[TransformerErrorCode-03], Des
cription:[Transformer name not found]. - name=md5
at com.alibaba.datax.common.exception.DataXException.asDataXException(DataXException.java:30)
at com.alibaba.datax.core.util.TransformerUtil.buildTransformerInfo(TransformerUtil.java:58)
at com.alibaba.datax.core.taskgroup.TaskGroupContainer$TaskExecutor.(TaskGroupContainer.java:408)
at com.alibaba.datax.core.taskgroup.TaskGroupContainer.start(TaskGroupContainer.java:228)
at com.alibaba.datax.core.taskgroup.runner.TaskGroupContainerRunner.run(TaskGroupContainerRunner.java:24)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) 操作还是没有成功,你们谁操作成功了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants