Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Kite CLI IO error: Failed to close appender AvroAppender

Kite CLI IO error: Failed to close appender AvroAppender

New Contributor

Hi, I'm trying to complete the example here http://kitesdk.org/docs/current/guide/Viewing-with-Impala/

 

But I'm getting an error when I try to import the data. I downloaded the movies.csv linked in the example, and changed the dates to the format described.

 

[ kite]$ ./dataset csv-import movies.csv movies
IO error: Failed to close appender AvroAppender{path=hdfs://server:9000/apps/hive/metastore/movies/.64f97bae-5391-4a5e-9dfe-4a1152f6eba5.avro.tmp, schema={"type":"record","name":"movies","doc":"Schema generated by Kite","fields":[{"name":"ID","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Title","type":["null","string"],"doc":"Type inferred from 'Anticoagulance'"},{"name":"Release","type":["null","string"],"doc":"Type inferred from '2003-11-15'"},{"name":"Action","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Adventure","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Animation","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Children","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Comedy","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Crime","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Documentary","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Drama","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Fantasy","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"FilmNoir","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Horror","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Musical","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Mystery","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Romance","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"SciFi","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Thriller","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"War","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Western","type":["null","long"],"doc":"Type inferred from '0'"}]}, fileSystem=DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_1799728198_1, ugi=user(auth:SIMPLE)]], enableCompression=true, dataFileWriter=org.apache.avro.file.DataFileWriter@302384e4, writer=org.apache.avro.reflect.ReflectDatumWriter@6be9ad6c}

4 REPLIES 4

Re: Kite CLI IO error: Failed to close appender AvroAppender

Contributor

Can you run the command again in verbose mode?

 

./dataset -v csv-import movies.csv movies

Re: Kite CLI IO error: Failed to close appender AvroAppender

New Contributor

Thanks, joey. Verbose error below, it sounds almost environmental? I'm running in pseudo-distributed if that helps.

 

[kite]$ ./dataset -v csv-import movies.csv movies
IO error
org.kitesdk.data.DatasetIOException: Failed to close appender AvroAppender{path=hdfs://server:9000/apps/hive/metastore/movies/.266ee3b2-57a4-4560-92e3                                                                              -951cfe5513f4.avro.tmp, schema={"type":"record","name":"movies","doc":"Schema generated by Kite","fields":[{"name":"ID","type":["null","long"],"doc":"Type infe rred from '1'"},{"name":"Title","type":["null","string"],"doc":"Type inferred from 'Anticoagulance'"},{"name":"Release","type":["null","string"],"doc":"Type inferred from '2003-11-15'"},{"name":"Action","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Adventure","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Animation","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Children","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Comedy","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Crime","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Documentary","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Drama","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Fantasy","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"FilmNoir","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Horror","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Musical","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Mystery","type":["null","long"],"doc":" Type inferred from '0'"},{"name":"Romance","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"SciFi","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Thriller","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"War","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Western","type":["null","long"],"doc":"Type inferred from '0'"}]}, fileSystem=DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_-1522970861_1, ugi=user (auth:SIMPLE)]], enableCompression=true, dataFileWriter=org.apache.avro.file.DataFileWriter@6be9ad6c, writer=org.apache.avro.reflect.ReflectDatumWriter@3a78c4cd}
        at org.kitesdk.data.spi.filesystem.FileSystemWriter.close(FileSystemWriter.java:158)
        at com.google.common.io.Closeables.close(Closeables.java:80)
        at org.kitesdk.tools.TransformTask.run(TransformTask.java:152)
        at org.kitesdk.cli.commands.CSVImportCommand.run(CSVImportCommand.java:195)
        at org.kitesdk.cli.Main.run(Main.java:165)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.kitesdk.cli.Main.main(Main.java:243)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /apps/hive/metastore/movies/.266ee3b2-57a4-4560-92e3-951cfe5513f4.avro.tmp could only be replicated to 0 nodes instead of minReplication (=1).  There are 0 datanode(s) running and no node(s) are excluded in this operation.
        at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget(BlockManager.java:1447)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:2703)
        at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:569)
        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:440)
        at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1026)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1986)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1982)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1554)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1980)

        at org.apache.hadoop.ipc.Client.call(Client.java:1409)
        at org.apache.hadoop.ipc.Client.call(Client.java:1362)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
        at com.sun.proxy.$Proxy12.addBlock(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
        at com.sun.proxy.$Proxy12.addBlock(Unknown Source)
        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:362)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.locateFollowingBlock(DFSOutputStream.java:1438)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1260)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:525)

Highlighted

Re: Kite CLI IO error: Failed to close appender AvroAppender

Contributor

> Caused by: org.apache.hadoop.ipc.RemoteException(java.io.IOException): File

> /apps/hive/metastore/movies/.266ee3b2-57a4-4560-92e3-951cfe5513f4.avro.tmp could only be

> replicated to 0 nodes instead of minReplication (=1).  There are 0 datanode(s) running and no node(s)

> are excluded in this operation

 

It looks like you don't have any datanodes running. Are you able to interact with HDFS using the hdfs dfs command line tool?

 

-Joey

Re: Kite CLI IO error: Failed to close appender AvroAppender

New Contributor

Hi Joey,

 

I've got one node up now, but the message is similar:

 
[kite]$ ./dataset -v csv-import movies.csv movies
IO error
org.kitesdk.data.DatasetIOException: Failed to close appender AvroAppender{path=hdfs://server:9000/apps/hive/metastore/movies/.35369c53-9a51-4a02-9490-a967212587cd.avro.tmp, schema={"type":"record","name":"movies","doc":"Schema generated by Kite","fields":[{"name":"ID","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Title","type":["null","string"],"doc":"Type inferred from 'Anticoagulance'"},{"name":"Release","type":["null","string"],"doc":"Type inferred from '2003-11-15'"},{"name":"Action","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Adventure","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Animation","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Children","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Comedy","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Crime","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Documentary","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Drama","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Fantasy","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"FilmNoir","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Horror","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Musical","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Mystery","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"Romance","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"SciFi","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Thriller","type":["null","long"],"doc":"Type inferred from '0'"},{"name":"War","type":["null","long"],"doc":"Type inferred from '1'"},{"name":"Western","type":["null","long"],"doc":"Type inferred from '0'"}]}, fileSystem=DFS[DFSClient[clientName=DFSClient_NONMAPREDUCE_1595266058_1, ugi=user (auth:SIMPLE)]], enableCompression=true, dataFileWriter=org.apache.avro.file.DataFileWriter@72cc5323, writer=org.apache.avro.reflect.ReflectDatumWriter@446659b6}
        at org.kitesdk.data.spi.filesystem.FileSystemWriter.close(FileSystemWriter.java:158)
        at com.google.common.io.Closeables.close(Closeables.java:80)
        at org.kitesdk.tools.TransformTask.run(TransformTask.java:152)
        at org.kitesdk.cli.commands.CSVImportCommand.run(CSVImportCommand.java:195)
        at org.kitesdk.cli.Main.run(Main.java:165)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.kitesdk.cli.Main.main(Main.java:243)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /apps/hive/metastore/movies/.35369c53-9a51-4a02-9490-a967212587cd.avro.tmp could only be replicated to 0 nodes instead of minReplication (=1).  There are 1 datanode(s) running and no node(s) are excluded in this operation.
        at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget(BlockManager.java:1447)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:2703)
        at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:569)
        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:440)
        at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1026)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1986)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1982)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1554)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1980)

        at org.apache.hadoop.ipc.Client.call(Client.java:1409)
        at org.apache.hadoop.ipc.Client.call(Client.java:1362)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
        at com.sun.proxy.$Proxy12.addBlock(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
        at com.sun.proxy.$Proxy12.addBlock(Unknown Source)
        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:362)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.locateFollowingBlock(DFSOutputStream.java:1438)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1260)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:525)

 

 

I get the same message when using the hdfs dfs command line tool. I can -ls but cannot -copyFromLocal

 

hdfs dfs -copyFromLocal etf.psv /user/me
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
14/11/21 04:47:29 WARN hdfs.DFSClient: DataStreamer Exception
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /user/me/etf.psv._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1).  There are 1 datanode(s) running and no node(s) are excluded in this operation.
        at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget(BlockManager.java:1447)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:2703)
        at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:569)
        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:440)
        at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1026)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1986)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1982)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1554)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1980)

        at org.apache.hadoop.ipc.Client.call(Client.java:1409)
        at org.apache.hadoop.ipc.Client.call(Client.java:1362)
        at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
        at com.sun.proxy.$Proxy9.addBlock(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
        at com.sun.proxy.$Proxy9.addBlock(Unknown Source)
        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:362)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.locateFollowingBlock(DFSOutputStream.java:1438)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1260)
        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:525)
copyFromLocal: File /user/me/etf.psv._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1).  There are 1 datanode(s) running and no node(s) are excluded in this operation.