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");
}
网友评论