美文网首页
Driver源码分析

Driver源码分析

作者: zjlearn | 来源:发表于2016-07-19 16:56 被阅读35次

    Dirver类

    在源代码中对于Driver的描述如下:

    /**
     * Sqoop driver that manages the job lifecyle
     *
     * All Sqoop internals are handled in this class:
     * * Submission engine
     * * Execution engine
     * * Driver config
     *
     * Current implementation of entire submission engine is using repository
     * for keeping track of running submissions. Thus, server might be restarted at
     * any time without any affect on running jobs. This approach however might not
     * be the fastest way and we might want to introduce internal structures for
     * running jobs in case that this approach will be too slow.
     */
    

    所以Driver对应于Job,负配置和任务的提交和执行。

    初始化

    其初始化的源代码如下所示:

    public synchronized void initialize(boolean autoUpgrade) {
        LOG.trace("Begin Driver initialization");
    
        // Register driver in repository
        mDriver = RepositoryManager.getInstance().getRepository().registerDriver(mDriver, autoUpgrade);
    
        SqoopConfiguration.getInstance().getProvider().registerListener(new CoreConfigurationListener(this));
    
        LOG.info("Driver initialized: OK");
      }
    

    相关文章

      网友评论

          本文标题:Driver源码分析

          本文链接:https://www.haomeiwen.com/subject/ldhhjttx.html