/** * Adds a local directory of jars to the distributed cache of the job. * * @param jarDirectory The path to a directory of jar files in the local file system. * @return This builder instance so you may chain configuration method calls. */ public T addJarDirectory(File jarDirectory) { return addJarDirectory("file:" + jarDirectory.getAbsolutePath()); }
/** * Adds a directory of jars to the distributed cache of the job. * * @param jarDirectory The path to a directory of jar files. * Path may be qualified (eg. "hdfs://path/to/dir", or "file:/path/to/dir"), * or unqualified (eg. "path/to/dir"), in which case it will be resovled against the * local file system. * @return This builder instance so you may chain configuration method calls. */ public T addJarDirectory(String jarDirectory) { return addJarDirectory(new Path(jarDirectory)); }
LOG.debug("Adding lib/*.jar directory from system property {}: '{}'.", JOB_LIB_PROPERTY, jobLibProperty); addJarDirectory(jobLibProperty);
/** * Configures the job builder by applying the flags from the user. * * @param jobBuilder The job builder to configure. * @throws ClassNotFoundException If a mapper, reducer, or other user class can not be loaded. * @throws IOException if there is an error reading configuration input data. * @throws JobIOSpecParseException If the input or output for the job can not configured. */ protected void configure(B jobBuilder) throws ClassNotFoundException, IOException { // Get Hadoop config files (hdfs-site.xml, etc) into Configuration objects. // The Configuration for this instance will also get the new default values as // an underlay. SchemaPlatformBridge.get().initializeHadoopResources(); // Use default environment configuration: jobBuilder.withConf(getConf()); // Add user dependency jars if specified. if (!mLibDir.isEmpty()) { jobBuilder.addJarDirectory(mLibDir); } // Add user-specified KVStore definitions, if specified. if (!mKvStoreFile.isEmpty()) { jobBuilder.withStoreBindingsFile(mKvStoreFile); } }