hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: What is the approved way in 0.20 to get a file size
Date Fri, 04 Nov 2011 02:15:47 GMT
Ah, that is a javadoc typo. Has been fixed in HADOOP-6114.

On 04-Nov-2011, at 2:22 AM, Steve Lewis wrote:

> I read that getLen returns the length in Blocks - and I wrong and does it return the
length in bytes 
> the code I see in org.apache.hadoop.fs.FileStatus says
> 
>  /* 
>    * @return the length of this file, in blocks
>    */
>   public long getLen() {
>     return length;
>   }
> 
> 
> On Thu, Nov 3, 2011 at 11:39 AM, Harsh J <harsh@cloudera.com> wrote:
> You need to use:
> 
> http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/fs/FileStatus.html#getLen()
> 
> via http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/fs/FileSystem.html#getFileStatus(org.apache.hadoop.fs.Path)
> 
> On Thu, Nov 3, 2011 at 11:59 PM, Steve Lewis <lordjoe2000@gmail.com> wrote:
> > FileSystem.getLength(Path path) is deprecated
> > getFileStatus(Path path) .getLen(String path)  seems to return the path in
> > Blocks whereas I want it in bytes
> > --
> > Steven M. Lewis PhD
> > 4221 105th Ave NE
> > Kirkland, WA 98033
> > 206-384-1340 (cell)
> > Skype lordjoe_com
> >
> >
> >
> 
> 
> 
> --
> Harsh J
> 
> 
> 
> -- 
> Steven M. Lewis PhD
> 4221 105th Ave NE
> Kirkland, WA 98033
> 206-384-1340 (cell)
> Skype lordjoe_com
> 
> 


Mime
View raw message