You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by pooja chitral <po...@gmail.com> on 2012/11/14 09:57:42 UTC

PigLatin : How to find size of the input file

Hi ,

I am Pooja here. I am working on one of the research projects at University
of Houston.

I am using PigLatin for my research.


I wanted to know is there any way we can find the size of the file from
PigLatin query? I mean for example if there is a directory of files, I
should be able to get size's of all the files in the directory and may be
compare these size's with the size of a input file.

please let me know if there is any doubt in understanding the question.

Any help would be really really appreciated.

Thanks a lot in advance.

-- 
*Thanks,*
*Pooja*

Re: PigLatin : How to find size of the input file

Posted by Prashant Kommireddi <pr...@gmail.com>.
Hi Pooja,

You can do a "fs -dus /path/to/dir" to get the size in bytes. If you
need to compare size with something it's easier to use a scripting
language (python etc) to do that, and invoke your pig query from that.

Sent from my iPhone

On Nov 14, 2012, at 6:32 AM, pooja chitral <po...@gmail.com> wrote:

> Hi ,
>
> I am Pooja here. I am working on one of the research projects at University
> of Houston.
>
> I am using PigLatin for my research.
>
>
> I wanted to know is there any way we can find the size of the file from
> PigLatin query? I mean for example if there is a directory of files, I
> should be able to get size's of all the files in the directory and may be
> compare these size's with the size of a input file.
>
> please let me know if there is any doubt in understanding the question.
>
> Any help would be really really appreciated.
>
> Thanks a lot in advance.
>
> --
> *Thanks,*
> *Pooja*