Hi,

I'm trying to use FileLocalizer in a UDF to check if a path passed in as a
parameter is a file or a directory.
I saw in some of the pig interval code that something like this:
PigContext pc = (PigContext)
ObjectSerializer.deserialize(PigMapReduce.sJobConf.get("pig.pigContext"));
if (FileLocalizer.isFile(Path, pc)) ...

But I'm getting a NullPointerExecption. Probably I missed something.
Could someone provide an example of how to do this ?

Also, Is it possible to get a list of files in a dfs directory somehow?


Thanks,
Tamir

Reply via email to