test_class.declarator: CONF_TMPJARS = "tmpjars"
test_class.modifier: private static final
test_class.original_string: private static final String CONF_TMPJARS = "tmpjars";
test_class.type: String
test_class.var_name: CONF_TMPJARS
test_class.file: kiji-mapreduce/src/test/java/org/kiji/mapreduce/TestDistributedCacheJars.java
test_class.identifier: TestDistributedCacheJars
test_class.superclass: extends KijiClientTest
test_case.body: @Test
    public void testJarsDeDupe() throws IOException {
      final File tempDir = getLocalTempDir();
  
      // Jar list should de-dupe to {"myjar_a, "myjar_b", "myjar_0", "myjar_1"}
      Set<String> dedupedJarNames = new HashSet<String>(4);
      dedupedJarNames.add("myjar_a.jar");
      dedupedJarNames.add("myjar_b.jar");
      dedupedJarNames.add("myjar_0.jar");
      dedupedJarNames.add("myjar_1.jar");
  
      Job job = new Job();
  
      List<String> someJars = new ArrayList<String>();
      // Some unique jar names.
      someJars.add("/somepath/myjar_a.jar");
      someJars.add("/another/path/myjar_b.jar");
      someJars.add("/myjar_0.jar");
  
      // Duplicate jars.
      someJars.add("/another/path/myjar_b.jar");
      someJars.add("/yet/another/path/myjar_b.jar");
  
      job.getConfiguration().set(CONF_TMPJARS, StringUtils.join(someJars, ","));
  
      // Now add some duplicate jars from mTempDir.
      assertEquals(0, tempDir.list().length);
      createTestJars(tempDir, "myjar_0.jar", "myjar_1.jar");
      assertEquals(2, tempDir.list().length);
      DistributedCacheJars.addJarsToDistributedCache(job, tempDir);
  
      // Confirm each jar appears in de-dupe list exactly once.
      String listedJars = job.getConfiguration().get(CONF_TMPJARS);
      String[] jars = listedJars.split(",");
      for (String jar : jars) {
        // Check that path terminates in an expected jar.
        Path p = new Path(jar);
        assertTrue(dedupedJarNames.contains(p.getName()));
        dedupedJarNames.remove(p.getName());
      }
      assertEquals(0, dedupedJarNames.size());
    }
test_case.class_method_signature: TestDistributedCacheJars.testJarsDeDupe()
test_case.full_signature: @Test public void testJarsDeDupe()
test_case.identifier: testJarsDeDupe
test_case.invocations: getLocalTempDir add add add add add add add add add set getConfiguration join assertEquals list createTestJars assertEquals list addJarsToDistributedCache get getConfiguration split assertTrue contains getName remove getName assertEquals size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testJarsDeDupe()
focal_class.declarator: LOG = LoggerFactory.getLogger(DistributedCacheJars.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(DistributedCacheJars.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: CONF_TMPJARS = "tmpjars"
focal_class.modifier: private static final
focal_class.original_string: private static final String CONF_TMPJARS = "tmpjars";
focal_class.type: String
focal_class.var_name: CONF_TMPJARS
focal_class.file: kiji-mapreduce/src/main/java/org/kiji/mapreduce/DistributedCacheJars.java
focal_class.identifier: DistributedCacheJars
focal_class.class_method_signature: DistributedCacheJars.DistributedCacheJars()
focal_class.full_signature: private  DistributedCacheJars()
focal_class.identifier: DistributedCacheJars
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  DistributedCacheJars()
focal_class.class_method_signature: DistributedCacheJars.qualifiedPathFromString(String pathStr, Configuration conf)
focal_class.full_signature: private static Path qualifiedPathFromString(String pathStr, Configuration conf)
focal_class.identifier: qualifiedPathFromString
focal_class.modifiers: private static
focal_class.parameters: (String pathStr, Configuration conf)
focal_class.return: Path
focal_class.signature: Path qualifiedPathFromString(String pathStr, Configuration conf)
focal_class.class_method_signature: DistributedCacheJars.addJarsToDistributedCache(Job job, String jarDirectory)
focal_class.full_signature: public static void addJarsToDistributedCache(Job job, String jarDirectory)
focal_class.identifier: addJarsToDistributedCache
focal_class.modifiers: public static
focal_class.parameters: (Job job, String jarDirectory)
focal_class.return: void
focal_class.signature: void addJarsToDistributedCache(Job job, String jarDirectory)
focal_class.class_method_signature: DistributedCacheJars.addJarsToDistributedCache(Job job, File jarDirectory)
focal_class.full_signature: public static void addJarsToDistributedCache(Job job, File jarDirectory)
focal_class.identifier: addJarsToDistributedCache
focal_class.modifiers: public static
focal_class.parameters: (Job job, File jarDirectory)
focal_class.return: void
focal_class.signature: void addJarsToDistributedCache(Job job, File jarDirectory)
focal_class.class_method_signature: DistributedCacheJars.addJarsToDistributedCache(Job job, Path jarDirectory)
focal_class.full_signature: public static void addJarsToDistributedCache(Job job, Path jarDirectory)
focal_class.identifier: addJarsToDistributedCache
focal_class.modifiers: public static
focal_class.parameters: (Job job, Path jarDirectory)
focal_class.return: void
focal_class.signature: void addJarsToDistributedCache(Job job, Path jarDirectory)
focal_class.class_method_signature: DistributedCacheJars.addJarsToDistributedCache(Job job, Collection<Path> jarFiles)
focal_class.full_signature: public static void addJarsToDistributedCache(Job job, Collection<Path> jarFiles)
focal_class.identifier: addJarsToDistributedCache
focal_class.modifiers: public static
focal_class.parameters: (Job job, Collection<Path> jarFiles)
focal_class.return: void
focal_class.signature: void addJarsToDistributedCache(Job job, Collection<Path> jarFiles)
focal_class.class_method_signature: DistributedCacheJars.getJarsFromConfiguration(Configuration conf)
focal_class.full_signature: public static List<Path> getJarsFromConfiguration(Configuration conf)
focal_class.identifier: getJarsFromConfiguration
focal_class.modifiers: public static
focal_class.parameters: (Configuration conf)
focal_class.return: List<Path>
focal_class.signature: List<Path> getJarsFromConfiguration(Configuration conf)
focal_class.class_method_signature: DistributedCacheJars.listJarFilesFromDirectory(Configuration conf, Path jarDirectory)
focal_class.full_signature: public static Collection<Path> listJarFilesFromDirectory(Configuration conf, Path jarDirectory)
focal_class.identifier: listJarFilesFromDirectory
focal_class.modifiers: public static
focal_class.parameters: (Configuration conf, Path jarDirectory)
focal_class.return: Collection<Path>
focal_class.signature: Collection<Path> listJarFilesFromDirectory(Configuration conf, Path jarDirectory)
focal_class.class_method_signature: DistributedCacheJars.deDuplicateFilenames(Iterable<Path> jarFiles)
focal_class.full_signature: public static List<Path> deDuplicateFilenames(Iterable<Path> jarFiles)
focal_class.identifier: deDuplicateFilenames
focal_class.modifiers: public static
focal_class.parameters: (Iterable<Path> jarFiles)
focal_class.return: List<Path>
focal_class.signature: List<Path> deDuplicateFilenames(Iterable<Path> jarFiles)
focal_method.body: public static void addJarsToDistributedCache(Job job, String jarDirectory) throws IOException {
      addJarsToDistributedCache(job, qualifiedPathFromString(jarDirectory, job.getConfiguration()));
    }
focal_method.class_method_signature: DistributedCacheJars.addJarsToDistributedCache(Job job, String jarDirectory)
focal_method.full_signature: public static void addJarsToDistributedCache(Job job, String jarDirectory)
focal_method.identifier: addJarsToDistributedCache
focal_method.invocations: addJarsToDistributedCache qualifiedPathFromString getConfiguration
focal_method.modifiers: public static
focal_method.parameters: (Job job, String jarDirectory)
focal_method.return: void
focal_method.signature: void addJarsToDistributedCache(Job job, String jarDirectory)