java.lang.NoClassDefFoundError: Could not initialize class io.netty.channel.epoll.Native

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

java.lang.NoClassDefFoundError: Could not initialize class io.netty.channel.epoll.Native

wayasxxx
Hi,

I set up a small alluxio 1.8 cluster and try alluxio API to operate the cluster.

Here is my code:

Configuration.set(PropertyKey.MASTER_HOSTNAME, "n8-152-045");
FileSystem fs = FileSystem.Factory.get();
AlluxioURI path = new AlluxioURI("/testfile");
//Create a file and get its output stream
FileOutStream out = fs.createFile(path);
// Write data
String data = "abc";
byte[] buf = data.getBytes();
out.write(buf);
// Close and complete file
out.close();

but I get NoClassDefFoundError when I try to do any IO operations.(other APIs like exists, listStatus, free can work)

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class io.netty.channel.epoll.Native
at io.netty.channel.epoll.IovArray.<clinit>(IovArray.java:56)
at io.netty.channel.epoll.EpollEventLoop.<init>(EpollEventLoop.java:57)
at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:119)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:64)
at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:50)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:97)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:84)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:65)
at alluxio.util.network.NettyUtils.createEventLoop(NettyUtils.java:72)
at alluxio.network.netty.NettyClient.<clinit>(NettyClient.java:54)
at alluxio.client.file.FileSystemContext.acquireNettyChannel(FileSystemContext.java:338)
at alluxio.client.block.stream.NettyPacketWriter.create(NettyPacketWriter.java:127)
at alluxio.client.block.stream.PacketWriter$Factory.create(PacketWriter.java:67)
at alluxio.client.block.stream.BlockOutStream.create(BlockOutStream.java:65)
at alluxio.client.block.AlluxioBlockStore.getOutStream(AlluxioBlockStore.java:259)
at alluxio.client.block.AlluxioBlockStore.getOutStream(AlluxioBlockStore.java:283)
at alluxio.client.file.FileOutStream.getNextBlock(FileOutStream.java:262)
at alluxio.client.file.FileOutStream.writeInternal(FileOutStream.java:228)
at alluxio.client.file.FileOutStream.write(FileOutStream.java:190)
at AlluxioClient.main(AlluxioClient.java:127)

Could you help me about thhis error?

My key need is to ask the alluxio cluster load data from hdfs to alluxio memory through a java/scala client.
I am looking for API which can behave like "alluxio fs load $path" but it seems not exist.
Any suggestion about it?

Appreciate your help in advance.


--
You received this message because you are subscribed to the Google Groups "Alluxio Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class io.netty.channel.epoll.Native

wayasxxx
It seems it can work on Linux but can't on Mac because of the restriction of netty-transport-native-epoll.
Do you know how to avoid this on Mac?

在 2018年10月15日星期一 UTC+8下午3:58:08,waya...@gmail.com写道:
Hi,

I set up a small alluxio 1.8 cluster and try alluxio API to operate the cluster.

Here is my code:

Configuration.set(PropertyKey.MASTER_HOSTNAME, "n8-152-045");
FileSystem fs = FileSystem.Factory.get();
AlluxioURI path = new AlluxioURI("/testfile");
//Create a file and get its output stream
FileOutStream out = fs.createFile(path);
// Write data
String data = "abc";
byte[] buf = data.getBytes();
out.write(buf);
// Close and complete file
out.close();

but I get NoClassDefFoundError when I try to do any IO operations.(other APIs like exists, listStatus, free can work)

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class io.netty.channel.epoll.Native
at io.netty.channel.epoll.IovArray.<clinit>(IovArray.java:56)
at io.netty.channel.epoll.EpollEventLoop.<init>(EpollEventLoop.java:57)
at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:119)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:64)
at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:50)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:97)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:84)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:65)
at alluxio.util.network.NettyUtils.createEventLoop(NettyUtils.java:72)
at alluxio.network.netty.NettyClient.<clinit>(NettyClient.java:54)
at alluxio.client.file.FileSystemContext.acquireNettyChannel(FileSystemContext.java:338)
at alluxio.client.block.stream.NettyPacketWriter.create(NettyPacketWriter.java:127)
at alluxio.client.block.stream.PacketWriter$Factory.create(PacketWriter.java:67)
at alluxio.client.block.stream.BlockOutStream.create(BlockOutStream.java:65)
at alluxio.client.block.AlluxioBlockStore.getOutStream(AlluxioBlockStore.java:259)
at alluxio.client.block.AlluxioBlockStore.getOutStream(AlluxioBlockStore.java:283)
at alluxio.client.file.FileOutStream.getNextBlock(FileOutStream.java:262)
at alluxio.client.file.FileOutStream.writeInternal(FileOutStream.java:228)
at alluxio.client.file.FileOutStream.write(FileOutStream.java:190)
at AlluxioClient.main(AlluxioClient.java:127)

Could you help me about thhis error?

My key need is to ask the alluxio cluster load data from hdfs to alluxio memory through a java/scala client.
I am looking for API which can behave like "alluxio fs load $path" but it seems not exist.
Any suggestion about it?

Appreciate your help in advance.


--
You received this message because you are subscribed to the Google Groups "Alluxio Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: Could not initialize class io.netty.channel.epoll.Native

David Zhu
Hi, 

You can not use Epoll on Mac because Mac does not support the epoll interface. You can set it to use NIO instead. 
Assuming you are using Alluxio 1.8.0,  this may be a known issue that is documented in https://alluxio.atlassian.net/browse/ALLUXIO-3260
The workaround is to set the property 
alluxio.user.network.netty.channel=NIO 
on the client side. 

As for your need to load the file into Alluxio memory, you are correct there is no direct API available. 
for examples on how load is implemented in the CLI.

- David

On Mon, Oct 15, 2018 at 2:30 AM <[hidden email]> wrote:
It seems it can work on Linux but can't on Mac because of the restriction of netty-transport-native-epoll.
Do you know how to avoid this on Mac?

在 2018年10月15日星期一 UTC+8下午3:58:08,[hidden email]写道:
Hi,

I set up a small alluxio 1.8 cluster and try alluxio API to operate the cluster.

Here is my code:

Configuration.set(PropertyKey.MASTER_HOSTNAME, "n8-152-045");
FileSystem fs = FileSystem.Factory.get();
AlluxioURI path = new AlluxioURI("/testfile");
//Create a file and get its output stream
FileOutStream out = fs.createFile(path);
// Write data
String data = "abc";
byte[] buf = data.getBytes();
out.write(buf);
// Close and complete file
out.close();

but I get NoClassDefFoundError when I try to do any IO operations.(other APIs like exists, listStatus, free can work)

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class io.netty.channel.epoll.Native
at io.netty.channel.epoll.IovArray.<clinit>(IovArray.java:56)
at io.netty.channel.epoll.EpollEventLoop.<init>(EpollEventLoop.java:57)
at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:119)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:64)
at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:50)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:97)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:84)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:65)
at alluxio.util.network.NettyUtils.createEventLoop(NettyUtils.java:72)
at alluxio.network.netty.NettyClient.<clinit>(NettyClient.java:54)
at alluxio.client.file.FileSystemContext.acquireNettyChannel(FileSystemContext.java:338)
at alluxio.client.block.stream.NettyPacketWriter.create(NettyPacketWriter.java:127)
at alluxio.client.block.stream.PacketWriter$Factory.create(PacketWriter.java:67)
at alluxio.client.block.stream.BlockOutStream.create(BlockOutStream.java:65)
at alluxio.client.block.AlluxioBlockStore.getOutStream(AlluxioBlockStore.java:259)
at alluxio.client.block.AlluxioBlockStore.getOutStream(AlluxioBlockStore.java:283)
at alluxio.client.file.FileOutStream.getNextBlock(FileOutStream.java:262)
at alluxio.client.file.FileOutStream.writeInternal(FileOutStream.java:228)
at alluxio.client.file.FileOutStream.write(FileOutStream.java:190)
at AlluxioClient.main(AlluxioClient.java:127)

Could you help me about thhis error?

My key need is to ask the alluxio cluster load data from hdfs to alluxio memory through a java/scala client.
I am looking for API which can behave like "alluxio fs load $path" but it seems not exist.
Any suggestion about it?

Appreciate your help in advance.


--
You received this message because you are subscribed to the Google Groups "Alluxio Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Alluxio Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.