org.apache.pig.impl.io
Class FileLocalizer
java.lang.Object
org.apache.pig.impl.io.FileLocalizer
public class FileLocalizer
- extends Object
Method Summary |
static OutputStream |
create(String fileSpec,
boolean append,
PigContext pigContext)
|
static OutputStream |
create(String fileSpec,
PigContext pigContext)
|
static void |
deleteTempFiles()
|
static boolean |
fileExists(String filename,
DataStorage store)
|
static boolean |
fileExists(String filename,
PigContext context)
|
static String |
fullPath(String filename,
PigContext pigContext)
|
static ElementDescriptor |
getTemporaryPath(ElementDescriptor relative,
PigContext pigContext)
|
static String |
hadoopify(String filename,
PigContext pigContext)
|
static boolean |
isDirectory(String filename,
DataStorage store)
|
static boolean |
isDirectory(String filename,
PigContext context)
|
static boolean |
isFile(String filename,
DataStorage store)
|
static boolean |
isFile(String filename,
PigContext context)
|
static InputStream |
open(String fileSpec,
PigContext pigContext)
|
static InputStream |
openDFSFile(String fileName)
This function is meant to be used if the mappers/reducers want to access
any HDFS file |
static InputStream |
openDFSFile(String fileName,
Properties properties)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCAL_PREFIX
public static final String LOCAL_PREFIX
- See Also:
- Constant Field Values
FileLocalizer
public FileLocalizer()
openDFSFile
public static InputStream openDFSFile(String fileName)
throws IOException
- This function is meant to be used if the mappers/reducers want to access
any HDFS file
- Throws:
IOException
openDFSFile
public static InputStream openDFSFile(String fileName,
Properties properties)
throws IOException
- Throws:
IOException
open
public static InputStream open(String fileSpec,
PigContext pigContext)
throws IOException
- Throws:
IOException
create
public static OutputStream create(String fileSpec,
PigContext pigContext)
throws IOException
- Throws:
IOException
create
public static OutputStream create(String fileSpec,
boolean append,
PigContext pigContext)
throws IOException
- Throws:
IOException
deleteTempFiles
public static void deleteTempFiles()
getTemporaryPath
public static ElementDescriptor getTemporaryPath(ElementDescriptor relative,
PigContext pigContext)
throws IOException
- Throws:
IOException
hadoopify
public static String hadoopify(String filename,
PigContext pigContext)
throws IOException
- Throws:
IOException
fullPath
public static String fullPath(String filename,
PigContext pigContext)
throws IOException
- Throws:
IOException
fileExists
public static boolean fileExists(String filename,
PigContext context)
throws IOException
- Throws:
IOException
fileExists
public static boolean fileExists(String filename,
DataStorage store)
throws IOException
- Throws:
IOException
isFile
public static boolean isFile(String filename,
PigContext context)
throws IOException
- Throws:
IOException
isFile
public static boolean isFile(String filename,
DataStorage store)
throws IOException
- Throws:
IOException
isDirectory
public static boolean isDirectory(String filename,
PigContext context)
throws IOException
- Throws:
IOException
isDirectory
public static boolean isDirectory(String filename,
DataStorage store)
throws IOException
- Throws:
IOException
Copyright © ${year} The Apache Software Foundation