Giter VIP home page Giter VIP logo

simpledatax-service's Introduction

关于simpledatax

背景

simpledatax基于阿里开源数据采集工具datax改造而来,不一定更好,但是适合特定的场景。关于阿里的datax请移步 https://github.com/alibaba/DataX

改动说明

  1. 将datax进程调用改为线程内调用。修复初始化时实例之间的冲突。
  2. 将插件包和调度包集成到同一个包内,方便修改。
  3. 插件间不再使用不同的类加载器。插件预加载机制。同时不改变参数的json配置处理机制。
  4. 新增参数对象作为入参,封装接口,提取关键参数用于配置。
  5. 修改内部调度机制,移除sleep收集任务执行状态的机制,修改为各个任务执行完毕时汇报情况,使用Future获取返回结果,可以稍微提高下效率。
  6. 新增返回调度结果实例。用于界面展现。

一些想法

  1. 我是把datax当成一个插件来使用。而不是把他当成一种工具。这个插件可以方便的集成到各个系统当中。阿里的datax在采集大数据时优势明显,但是不适合我们这种场景。另外一种解决方法是把阿里的datax当做一个进程来调度,同时启动多个进程。一开始有考虑过,但是由于进程的开销比较大,不适合多个并发的情况。所以最后选择修改datax的调度机制。
  2. 修改这个包碰到了很多问题,最主要是datax本身并不支持运行多个实例(伪),底层调度支持,如JobContainer,TaskContainer(部分),Task。最大问题在于信息采集机制不是面向对象的,Task实例的保存也不是面向对象的。还有插件工具类更不是面向对象的。有很多是保存在静态变量的,代码可能是不同人写的,带有很强个人风格啊。
  3. 此外之前为了支持不同的插件使用jar包版本可能的冲突,datax分别对不同插件使用不同的类加载器,现在被我一统江湖了。但是有些代码使用类的全类名字符串做为变量或者参数。所以这块地方做迁移的时候要一键替换,这块调整我没有做,感觉也没有必要做。
  4. 由于datax核心代码没有什么变化。此版本的datax使用的是2019-1月份的github上的datax代码。同时我去除了很多没有用上的插件,如果有需要可以自己添加插件。
  5. 后续应该不会有改动了,还有很多事情要做呢。

simpledatax-service's People

Contributors

eastzq avatar

Watchers

James Cloos avatar 沐风-Qian avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.