分类: 项目管理
2013-01-09 07:38:14
- FTPClient ftpClient = new FTPClient();
- ftpClient.setConnectTimeout(1000);
- static List
getClassPaths(JobConf conf, File workDir, - TaskDistributedCacheManager taskDistributedCacheManager)
- throws IOException {
- // Accumulates class paths for child.
- List
classPaths = new ArrayList (); - boolean userClassesTakesPrecedence = conf.userClassesTakesPrecedence();
- // 这个参数项可以改变系统classpath加载的优先顺序, 默认应该是false
- if (!userClassesTakesPrecedence) { // 默认是false, tasktrack机器的系统classpath总是优先加载
- // start with same classpath as parent process
- appendSystemClasspaths(classPaths);
- }
- // include the user specified classpath
- appendJobJarClasspaths(conf.getJar(), classPaths);
- // Distributed cache paths
- if (taskDistributedCacheManager != null)
- classPaths.addAll(taskDistributedCacheManager.getClassPaths());
- // Include the working dir too
- classPaths.add(workDir.toString());
- if (userClassesTakesPrecedence) {
- // parent process's classpath is added last
- appendSystemClasspaths(classPaths);
- }
- return classPaths;
- }