org.apache.pig.impl.util
Class JarManager

java.lang.Object
  extended by org.apache.pig.impl.util.JarManager

public class JarManager
extends Object


Constructor Summary
JarManager()
           
 
Method Summary
static void addDependencyJars(org.apache.hadoop.mapreduce.Job job, Class<?>... classes)
          Add the jars containing the given classes to the job's configuration such that JobClient will ship them to the cluster and add them to the DistributedCache
static void createJar(OutputStream os, Set<String> funcs, PigContext pigContext)
          Create a jarfile in a temporary path, that is a merge of all the jarfiles containing the functions and the core pig classes.
static String findContainingJar(Class my_class)
          Find a jar that contains a class of the same name, if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarManager

public JarManager()
Method Detail

createJar

public static void createJar(OutputStream os,
                             Set<String> funcs,
                             PigContext pigContext)
                      throws ClassNotFoundException,
                             IOException
Create a jarfile in a temporary path, that is a merge of all the jarfiles containing the functions and the core pig classes.

Parameters:
funcs - the functions that will be used in a job and whose jar files need to be included in the final merged jar file.
Throws:
ClassNotFoundException
IOException

findContainingJar

public static String findContainingJar(Class my_class)
Find a jar that contains a class of the same name, if any. It will return a jar file, even if that is not the first thing on the class path that has a class with the same name.

Parameters:
my_class - the class to find
Returns:
a jar file that contains the class, or null
Throws:
IOException

addDependencyJars

public static void addDependencyJars(org.apache.hadoop.mapreduce.Job job,
                                     Class<?>... classes)
                              throws IOException
Add the jars containing the given classes to the job's configuration such that JobClient will ship them to the cluster and add them to the DistributedCache

Parameters:
job - Job object
classes - classes to find
Throws:
IOException


Copyright © 2007-2012 The Apache Software Foundation