Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2BEC418931 for ; Sun, 20 Mar 2016 09:28:50 +0000 (UTC) Received: (qmail 73430 invoked by uid 500); 20 Mar 2016 09:28:49 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 73348 invoked by uid 500); 20 Mar 2016 09:28:49 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 73339 invoked by uid 99); 20 Mar 2016 09:28:49 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Mar 2016 09:28:49 +0000 Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id B89741A0113 for ; Sun, 20 Mar 2016 09:28:48 +0000 (UTC) Received: by mail-lf0-f46.google.com with SMTP id d82so44710155lfe.3 for ; Sun, 20 Mar 2016 02:28:48 -0700 (PDT) X-Gm-Message-State: AD7BkJIel4KCgMRRP5XQ8GXVKMtB2F8EtDo2hII+6/EAVikuxv196a59ptUdhyOvXFPhWSVSQqwPaDOCUHCf+Q== X-Received: by 10.25.33.1 with SMTP id h1mr9071892lfh.151.1458466127050; Sun, 20 Mar 2016 02:28:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.190.67 with HTTP; Sun, 20 Mar 2016 02:28:27 -0700 (PDT) In-Reply-To: References: From: Robert Metzger Date: Sun, 20 Mar 2016 10:28:27 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Access to S3 from YARN on EC2 To: "user@flink.apache.org" Content-Type: multipart/alternative; boundary=001a1140245a6b8196052e779b80 --001a1140245a6b8196052e779b80 Content-Type: text/plain; charset=UTF-8 Hi, did you check if the "org.apache.hadoop.fs.s3native.NativeS3FileSystem" class is in the flink-dist.jar in the lib/ folder? On Sun, Mar 20, 2016 at 10:19 AM, Ashutosh Kumar wrote: > I have setup a 3 node YARN based cluster on EC2. I am running flink in > cluster mode. I added these lines in core-site.xml > > > > > fs.s3n.awsAccessKeyId > accesskey > > > > fs.s3n.awsSecretAccessKey > secret key > > > fs.s3n.impl > org.apache.hadoop.fs.s3native.NativeS3FileSystem > > > > Also I added this line in conf/flink-conf.yaml > fs.hdfs.hadoopconf: /usr/local/hadoop/etc/hadoop > > > However I am getting class not found error while accessing s3 through s3n. > I am using flink 1.0.0. > > Caused by: org.apache.flink.runtime.JobException: Creating the input > splits caused an error: java.lang.RuntimeException: > java.lang.ClassNotFoundException: Class > org.apache.hadoop.fs.s3native.NativeS3FileSystem not found > at > org.apache.flink.runtime.executiongraph.ExecutionJobVertex.(ExecutionJobVertex.java:172) > at > org.apache.flink.runtime.executiongraph.ExecutionGraph.attachJobGraph(ExecutionGraph.java:696) > at org.apache.flink.runtime.jobmanager.JobManager.org > $apache$flink$runtime$jobmanager$JobManager$$submitJob(JobManager.scala:1023) > ... 25 more > Caused by: java.lang.RuntimeException: java.lang.RuntimeException: > java.lang.ClassNotFoundException: Class > org.apache.hadoop.fs.s3native.NativeS3FileSystem not found > at > org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2227) > at > org.apache.flink.runtime.fs.hdfs.HadoopFileSystem.getHadoopWrapperClassNameForFileSystem(HadoopFileSystem.java:460) > at > org.apache.flink.core.fs.FileSystem.getHadoopWrapperClassNameForFileSystem(FileSystem.java:352) > at org.apache.flink.core.fs.FileSystem.get(FileSystem.java:280) > at org.apache.flink.core.fs.Path.getFileSystem(Path.java:311) > at > org.apache.flink.api.common.io.FileInputFormat.createInputSplits(FileInputFormat.java:450) > at > org.apache.flink.api.common.io.FileInputFormat.createInputSplits(FileInputFormat.java:57) > at > org.apache.flink.runtime.executiongraph.ExecutionJobVertex.(ExecutionJobVertex.java:156) > ... 27 more > Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: > Class org.apache.hadoop.fs.s3native.NativeS3FileSystem not found > at > org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2195) > at > org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2219) > ... 34 more > Caused by: java.lang.ClassNotFoundException: Class > org.apache.hadoop.fs.s3native.NativeS3FileSystem not found > at > org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2101) > at > org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2193) > ... 35 more > > > Thanks > Ashutosh > > --001a1140245a6b8196052e779b80 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

did you check if the "org.apache.hadoop.fs.s3native.NativeS3FileSystem" class is in the flink-dist.j= ar in the lib/ folder?

On Sun, Mar 20, 2016 at 10:19 AM, Ashutosh Kumar <= ashutosh.di= scuss@gmail.com> wrote:
I have setup a 3 node YARN based cluster on EC= 2. I am running flink in cluster mode. I added these lines in core-site.xml=

<=
configuration><=
/span>

<property>
<name>fs.s3n.awsAccessKeyId</name>
<value>accesskey</value>
</property>


<property<= /span>>
= <name>fs= .s3n.awsSecretAccessKey&l= t;/name>
<value>secret key</value>
</property>
<property>
<name>fs.s3n.impl</name>

<value>org.apache.h= adoop.fs.s3native.NativeS= 3FileSystem</value>
<= ;/property>
= </configuration>
Also I added this line in conf/flink-con= f.yaml
=C2=A0=C2=A0 fs.hdfs.hadoopconf: /usr/local/hadoop/etc/hadoop

However I am getting class not found error while accessing s= 3 through s3n. I am using flink 1.0.0.

Caused by: org.apache.flink.r= untime.JobException: Creating the input splits caused an error: java.lang.R= untimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.= fs.s3native.NativeS3FileSystem not found
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 at org.apache.flink.runtime.executiongraph.ExecutionJobVertex.= <init>(ExecutionJobVertex.java:172)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 at org.apache.flink.runtime.executiongraph.ExecutionGraph.atta= chJobGraph(ExecutionGraph.java:696)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 at org.apache.flink.runtime.jobmanager.JobManager.org$apache$flink$runtime$jobmanager$JobManager$$submitJob(JobManager.scala:1= 023)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ... 25 more
Caused by= : java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNo= tFoundException: Class org.apache.hadoop.fs.s3native.NativeS3FileSystem not= found
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.hadoop.c= onf.Configuration.getClass(Configuration.java:2227)
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.flink.runtime.fs.hdfs.HadoopFileSyst= em.getHadoopWrapperClassNameForFileSystem(HadoopFileSystem.java:460)
=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.flink.core.fs.FileSys= tem.getHadoopWrapperClassNameForFileSystem(FileSystem.java:352)
=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.flink.core.fs.FileSystem= .get(FileSystem.java:280)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at = org.apache.flink.core.fs.Path.getFileSystem(Path.java:311)
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.flink.api.common.io.FileInputF= ormat.createInputSplits(FileInputFormat.java:450)
=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 at org.apache.flink.api.common.io.FileInputFormat.cre= ateInputSplits(FileInputFormat.java:57)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 at org.apache.flink.runtime.executiongraph.ExecutionJobVertex.= <init>(ExecutionJobVertex.java:156)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 ... 27 more
Caused by: java.lang.RuntimeException: java.lan= g.ClassNotFoundException: Class org.apache.hadoop.fs.s3native.NativeS3FileS= ystem not found
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache= .hadoop.conf.Configuration.getClass(Configuration.java:2195)
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.hadoop.conf.Configuration.g= etClass(Configuration.java:2219)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 ... 34 more
Caused by: java.lang.ClassNotFoundException: Class org.a= pache.hadoop.fs.s3native.NativeS3FileSystem not found
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.hadoop.conf.Configuration.getClassBy= Name(Configuration.java:2101)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2193)<= br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ... 35 more


= Thanks
Ashutosh


--001a1140245a6b8196052e779b80--