hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha <m...@umail.ucsb.edu>
Subject Re: Check file is sequence?
Date Tue, 22 Mar 2011 17:38:28 GMT
The Reader idea worked fine I guess :) Thanks,

Maha

On Mar 22, 2011, at 1:28 AM, Harsh J wrote:

> I do not know of an API-side thing that does this, but basically the
> first three bytes of a given sequence file would be 'S', 'E', 'Q'
> (which is checked), and following that is a version indicator numeral
> byte.
> 
> A silly (but working) way to use the libs itself to do this would be
> to construct a Reader object for the file and handle an IOException in
> case of 'not a sequence file'?
> 
> On Tue, Mar 22, 2011 at 12:41 PM, maha <maha@umail.ucsb.edu> wrote:
>> Hello,
>> 
>>  Is there a way to check if a file foo is a Hadoop SequenceFile ?
>> 
>>  Thanks,
>>  Maha
>> 
> 
> 
> 
> -- 
> Harsh J
> http://harshj.com


Mime
View raw message