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 Aleksandr Elbakyan <ra...@yahoo.com> on 2012/05/10 20:58:24 UTC

Exception closing file

Hello,

I am running the job, when in two similar size clusters, in one it is running fine on other gives fallowing exceptions.

I checked the safe mode is off. 

Not sure what do I need fix to avoid this?

2012-05-10 00:38:02,637 ERROR org.apache.hadoop.hdfs.DFSClient: Exception closing file /user/_temporary/_attempt_201204251940_0258_r_000007_1/part-00007 : 
org.apache.hadoop.ipc.RemoteException: java.io.IOException: Could not complete write to file 
/user/_temporary/_attempt_201204251940_0258_r_000007_1/part-00007 by DFSClient_attempt_201204251940_0258_r_000007_1
at org.apache.hadoop.hdfs.server.namenode.NameNode.complete(NameNode.java:497)
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:597)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:508)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:966)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:962)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:960)

org.apache.hadoop.ipc.RemoteException: java.io.IOException: Could not complete write to file 
/user/_temporary/_attempt_201204251940_0258_r_000007_1/part-00007 by DFSClient_attempt_201204251940_0258_r_000007_1
at org.apache.hadoop.hdfs.server.namenode.NameNode.complete(NameNode.java:497)
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:597)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:508)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:966)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:962)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:960)

at org.apache.hadoop.ipc.Client.call(Client.java:740)
at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)
at $Proxy1.complete(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:597)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:82)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:59)
at $Proxy1.complete(Unknown Source)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.closeInternal(DFSClient.java:3280)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.close(DFSClient.java:3204)
at org.apache.hadoop.hdfs.DFSClient$LeaseChecker.close(DFSClient.java:1034)
at org.apache.hadoop.hdfs.DFSClient.close(DFSClient.java:241)
at org.apache.hadoop.hdfs.DistributedFileSystem.close(DistributedFileSystem.java:269)
at org.apache.hadoop.fs.FileSystem$Cache.closeAll(FileSystem.java:1531)
at org.apache.hadoop.fs.FileSystem$Cache$ClientFinalizer.run(FileSystem.java:1547)



Regards.


Re: Exception closing file

Posted by JunYong Li <li...@gmail.com>.
The client is done writing data to the given filename, and would like to
complete it. The function returns whether the file has been closed
successfully. If the function returns false, the caller should try again. A
call to complete() will not return true until all the file's blocks have
been replicated the minimum number of times. Thus, DataNode failures may
cause a client to call complete() several times before succeeding.

so you should check datanodes have errors in log.

2012/5/11 Aleksandr Elbakyan <ra...@yahoo.com>

> Hello,
>
> I am running the job, when in two similar size clusters, in one it is
> running fine on other gives fallowing exceptions.
>
> I checked the safe mode is off.
>
> Not sure what do I need fix to avoid this?
>
> 2012-05-10 00:38:02,637 ERROR org.apache.hadoop.hdfs.DFSClient: Exception
> closing file
> /user/_temporary/_attempt_201204251940_0258_r_000007_1/part-00007 :
> org.apache.hadoop.ipc.RemoteException: java.io.IOException: Could not
> complete write to file
> /user/_temporary/_attempt_201204251940_0258_r_000007_1/part-00007 by
> DFSClient_attempt_201204251940_0258_r_000007_1
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.complete(NameNode.java:497)
> 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:597)
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:508)
> at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:966)
> at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:962)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:396)
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:960)
>
> org.apache.hadoop.ipc.RemoteException: java.io.IOException: Could not
> complete write to file
> /user/_temporary/_attempt_201204251940_0258_r_000007_1/part-00007 by
> DFSClient_attempt_201204251940_0258_r_000007_1
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.complete(NameNode.java:497)
> 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:597)
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:508)
> at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:966)
> at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:962)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:396)
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:960)
>
> at org.apache.hadoop.ipc.Client.call(Client.java:740)
> at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)
> at $Proxy1.complete(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:597)
> at
> org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:82)
> at
> org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:59)
> at $Proxy1.complete(Unknown Source)
> at
> org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.closeInternal(DFSClient.java:3280)
> at
> org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.close(DFSClient.java:3204)
> at org.apache.hadoop.hdfs.DFSClient$LeaseChecker.close(DFSClient.java:1034)
> at org.apache.hadoop.hdfs.DFSClient.close(DFSClient.java:241)
> at
> org.apache.hadoop.hdfs.DistributedFileSystem.close(DistributedFileSystem.java:269)
> at org.apache.hadoop.fs.FileSystem$Cache.closeAll(FileSystem.java:1531)
> at
> org.apache.hadoop.fs.FileSystem$Cache$ClientFinalizer.run(FileSystem.java:1547)
>
>
>
> Regards.
>
>


-- 
Regards
Junyong