[ http://issues.apache.org/jira/browse/NUTCH-46?page=comments#action_63458 
]
     
zhangjin commented on NUTCH-46:
-------------------------------

I know your meaning,I think the nutch can be used in Linux very good,but I use 
it in the windows 2000 environment.My code is showed below.
public void testPutFile() throws Exception {
        File testFile = getTestFile();
        InetSocketAddress addr = new InetSocketAddress("127.0.0.1", 10000);
        NDFSClient client = new NDFSClient(addr);

         long totalLen = 0;
        DataInputStream in = new DataInputStream(new FileInputStream(testFile));
        try {
            DataOutputStream out = new DataOutputStream(client.create(new UTF8(
                    "/blabla2")));  //I cann't see the dir,
            try {
                byte buf[] = new byte[2048];
                int bytesRead = in.read(buf);
                while (bytesRead >= 0) {
                    out.write(buf, 0, bytesRead);
                    totalLen = buf.length;
                    bytesRead = in.read(buf);
                }
            }
            catch (Exception ex) {
              ex.printStackTrace();
            }

            finally {
                out.close();
            }
        }
        catch (Exception ex) {
          ex.printStackTrace();
        }

        finally {
            in.close();  //error here
        }

     
    }
In the examples I can only  create file,but can't open,delete,get the file.
I will try it in the linux!




> the NDFS problem(Could not obtain new output block for file)
> ------------------------------------------------------------
>
>          Key: NUTCH-46
>          URL: http://issues.apache.org/jira/browse/NUTCH-46
>      Project: Nutch
>         Type: Bug
>   Components: fetcher
>  Environment: jdk1.4.1,nutch0.6,lucene1.4.3,windows2000
>     Reporter: zhangjin
>     Priority: Critical

>
> Ndfs is very important to  distributed handling.But I never get good result 
> by NDfS, The error is Like "
> Hit uncaught exception java.io.IOException java.io.IOException: Could not 
> obtain new output block for file  1.txt"
> Please tell me
> Thanks thanks very much!
> msn:[EMAIL PROTECTED]
> mail:[EMAIL PROTECTED]
> blog0:http://blog.csdn.net/prettyheart
> blog1:http://soacn.blogchina.com

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to