org.apache.pig.impl.io
Class FileLocalizer

java.lang.Object
  extended by org.apache.pig.impl.io.FileLocalizer

public class FileLocalizer
extends Object


Nested Class Summary
static class FileLocalizer.DataStorageInputStreamIterator
           
 
Field Summary
static String LOCAL_PREFIX
           
 
Constructor Summary
FileLocalizer()
           
 
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
 

Field Detail

LOCAL_PREFIX

public static final String LOCAL_PREFIX
See Also:
Constant Field Values
Constructor Detail

FileLocalizer

public FileLocalizer()
Method Detail

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