SequenceFile.Reader. Access denied

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SequenceFile.Reader. Access denied

Ilya Vishnevsky
Hi. I'm trying to read the crawl_generate sequence file from my Nutch:

SequenceFile.Reader reader = new SequenceFile.Reader (fs, genPath,
conf);

Here is the exception I get when I try to run my code:

java.io.FileNotFoundException:
C:\webdb\aco\segments\20070515133433\crawl_generate (Access is denied)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at
org.apache.hadoop.fs.LocalFileSystem$LocalFSFileInputStream.<init>(Local
FileSystem.java:92)
        at
org.apache.hadoop.fs.LocalFileSystem.openRaw(LocalFileSystem.java:143)
        at
org.apache.hadoop.fs.FSDataInputStream$Checker.<init>(FSDataInputStream.
java:52)
        at
org.apache.hadoop.fs.FSDataInputStream.<init>(FSDataInputStream.java:271
)
        at org.apache.hadoop.fs.FileSystem.open(FileSystem.java:254)
        at
org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:973)
        at
org.apache.hadoop.io.SequenceFile$Reader.<init>(SequenceFile.java:967)

The path C:\webdb\aco\segments\20070515133433\crawl_generate really
exists and contains two files: "part-00000" and "part-00000.crc"
This occurs when I try to read crawl_generate from any other segment
too.
What am I doing wrong?
Reply | Threaded
Open this post in threaded view
|

Re: SequenceFile.Reader. Access denied

Andrzej Białecki-2
Ilya Vishnevsky wrote:
> Hi. I'm trying to read the crawl_generate sequence file from my Nutch:
>
> SequenceFile.Reader reader = new SequenceFile.Reader (fs, genPath,
> conf);
>
> Here is the exception I get when I try to run my code:
>
> java.io.FileNotFoundException:
> C:\webdb\aco\segments\20070515133433\crawl_generate (Access is denied)

You are using Windows (obviously). Unless this is a real issue with
permissions (Administrator created this file and you're just a user),
the problem may lie in file locking. Windows imposes this moronic limit
that you can't read a file that is in use by some other process. It's
likely that some other process has opened this file in read-write mode.

Open your Task Manager and start killing java.exe processes. If you
opened this file in an editor, quit the editor. And so on.


--
Best regards,
Andrzej Bialecki     <><
  ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com

Reply | Threaded
Open this post in threaded view
|

RE: SequenceFile.Reader. Access denied

Ilya Vishnevsky

Yes, I'm using Windows. But I checked and made sure that none of
processes uses this file. Still I get this exception.
I tried this code on another computer (also with Windows), but result
was the same.
Maybe somebody could try to test this code on his Nutch? I would be very
grateful for this.




> Ilya Vishnevsky wrote:
>> Hi. I'm trying to read the crawl_generate sequence file from my
Nutch:
>>
>> SequenceFile.Reader reader = new SequenceFile.Reader (fs, genPath,
>> conf);
>>
>> Here is the exception I get when I try to run my code:
>>
>> java.io.FileNotFoundException:
>> C:\webdb\aco\segments\20070515133433\crawl_generate (Access is
denied)

> You are using Windows (obviously). Unless this is a real issue with
> permissions (Administrator created this file and you're just a user),
> the problem may lie in file locking. Windows imposes this moronic
limit
> that you can't read a file that is in use by some other process. It's
> likely that some other process has opened this file in read-write
mode.

> Open your Task Manager and start killing java.exe processes. If you
> opened this file in an editor, quit the editor. And so on.


> --
> Best regards,
> Andrzej Bialecki     <><
>   ___. ___ ___ ___ _ _   __________________________________
> [__ || __|__/|__||\/|  Information Retrieval, Semantic Web
> ___|||__||  \|  ||  |  Embedded Unix, System Integration
> http://www.sigram.com  Contact: info at sigram dot com