You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Raghavendra K <ra...@gmail.com> on 2008/03/14 12:10:44 UTC

Exception in thread "main"

Hi,
 After some initial hiccups, I was able to get libhdfs compiled and running.
But libhdfs_test gives me this strange error.
What might be the problem?

Thanks in advance.

Opened /tmp/testfile.txt for writing successfully...
Wrote 14 bytes
Current position: 14
Flushed /tmp/testfile.txt successfully!
Exception in thread "main" org.apache.hadoop.ipc.RemoteException:
java.io.IOException: File /tmp/testfile.txt could only be replicated to 0
nodes, instead of 1
        at org.apache.hadoop.dfs.FSNamesystem.getAdditionalBlock(
FSNamesystem.java:1003)
        at org.apache.hadoop.dfs.NameNode.addBlock(NameNode.java:293)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:379)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:596)

        at org.apache.hadoop.ipc.Client.call(Client.java:482)
        at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:184)
        at org.apache.hadoop.dfs.$Proxy0.addBlock(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(
RetryInvocationHandler.java:82)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(
RetryInvocationHandler.java:59)
        at org.apache.hadoop.dfs.$Proxy0.addBlock(Unknown Source)
        at
org.apache.hadoop.dfs.DFSClient$DFSOutputStream.locateFollowingBlock(
DFSClient.java:1554)
        at
org.apache.hadoop.dfs.DFSClient$DFSOutputStream.nextBlockOutputStream(
DFSClient.java:1500)
        at org.apache.hadoop.dfs.DFSClient$DFSOutputStream.endBlock(
DFSClient.java:1626)
        at org.apache.hadoop.dfs.DFSClient$DFSOutputStream.close(
DFSClient.java:1733)
        at org.apache.hadoop.fs.FSDataOutputStream$PositionCache.close(
FSDataOutputStream.java:49)
        at org.apache.hadoop.fs.FSDataOutputStream.close(
FSDataOutputStream.java:64)
Call to org/apache/hadoop/fs/FSDataOutputStream::close failed!
hdfsAvailable: 0
Exception in thread "main" java.io.IOException: Cannot seek after EOF
        at org.apache.hadoop.dfs.DFSClient$DFSInputStream.seek(
DFSClient.java:1286)
        at org.apache.hadoop.fs.FSDataInputStream.seek(
FSDataInputStream.java:37)
Call to org.apache.hadoop.fs.FSDataInputStream::seek failed!
Failed to seek /tmp/testfile.txt for reading!
stopping datanode
stopping namenode
exiting with 255


-- 
Regards,
Raghavendra K