hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jane Wayne <jane.wayne2...@gmail.com>
Subject Re: is there anyway to detect the file size as am i writing a sequence file?
Date Tue, 06 Mar 2012 15:27:44 GMT
Thanks Joey. That's what I meant (I've been staring at the screen too
long). :)

On Tue, Mar 6, 2012 at 10:00 AM, Joey Echeverria <joey@cloudera.com> wrote:

> I think you mean Writer.getLength(). It returns the current position
> in the output stream in bytes (more or less the current size of the
> file).
>
> -Joey
>
> On Tue, Mar 6, 2012 at 9:53 AM, Jane Wayne <jane.wayne2978@gmail.com>
> wrote:
> > hi,
> >
> > i am writing a little util class to recurse into a directory and add all
> > *.txt files into a sequence file (key is the file name, value is the
> > content of the corresponding text file). as i am writing (i.e.
> > SequenceFile.Writer.append(key, value)), is there any way to detect how
> > large the sequence file is?
> >
> > for example, i want to create a new sequence file as soon as the current
> > one exceeds 64 MB.
> >
> > i notice there is a SequenceFile.Writer.getLong() which the javadocs says
> > "returns the current length of the output file," but that is vague. what
> is
> > this Writer.getLong() method? is it the number of bytes, kilobytes,
> > megabytes, or something else?
> >
> > thanks,
>
>
>
> --
> Joseph Echeverria
> Cloudera, Inc.
> 443.305.9434
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message