org.apache.hadoop.hbase.mapreduce.hadoopbackport
Class JarFinder

java.lang.Object
  extended by org.apache.hadoop.hbase.mapreduce.hadoopbackport.JarFinder

public class JarFinder
extends Object

Finds the Jar for a class. If the class is in a directory in the classpath, it creates a Jar on the fly with the contents of the directory and returns the path to that Jar. If a Jar is created, it is created in the system temporary directory. This file was forked from hadoop/common/branches/branch-2@1377176.


Constructor Summary
JarFinder()
           
 
Method Summary
static String getJar(Class klass)
          Returns the full path to the Jar containing the class.
static void jarDir(File dir, String relativePath, ZipOutputStream zos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarFinder

public JarFinder()
Method Detail

jarDir

public static void jarDir(File dir,
                          String relativePath,
                          ZipOutputStream zos)
                   throws IOException
Throws:
IOException

getJar

public static String getJar(Class klass)
Returns the full path to the Jar containing the class. It always return a JAR.

Parameters:
klass - class.
Returns:
path to the Jar containing the class.


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.