<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: unable to write hive query output to s3 in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171943#M50153</link>
    <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/10616/sgowda.html"&gt;Santhosh B Gowda&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Was this a fresh install or an upgrade from an older version of HDP? If this was an upgrade, this thread may be useful: &lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/33852044/why-can-i-not-read-from-the-aws-s3-in-spark-application-anymore" target="_blank"&gt;http://stackoverflow.com/questions/33852044/why-can-i-not-read-from-the-aws-s3-in-spark-application-anymore&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As I see in your last post, you mention a path /usr/hdp/2.5.3.0-14/hadoop/lib/jets3t-0.9.0.jar, could you also run the following and post the result?&lt;/P&gt;&lt;PRE&gt;ls -lrt /usr/hdp/&lt;/PRE&gt;</description>
    <pubDate>Tue, 27 Dec 2016 04:06:57 GMT</pubDate>
    <dc:creator>cstanca</dc:creator>
    <dc:date>2016-12-27T04:06:57Z</dc:date>
    <item>
      <title>unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171937#M50147</link>
      <description>&lt;P&gt;I am on HDP 2.5 and when trying to write hive query output to S3, I get below exception.&lt;/P&gt;&lt;PRE&gt;


Caused by: java.lang.NoClassDefFoundError: org/jets3t/service/ServiceException

	at org.apache.hadoop.fs.s3native.NativeS3FileSystem.createDefaultStore(NativeS3FileSystem.java:342)

	at org.apache.hadoop.fs.s3native.NativeS3FileSystem.initialize(NativeS3FileSystem.java:332)

	at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2761)

	at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:99)

	at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2795)

	at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2777)

	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:386)

	at org.apache.hadoop.fs.Path.getFileSystem(Path.java:295)

	at org.apache.hadoop.hive.ql.exec.FileSinkOperator.initializeOp(FileSinkOperator.java:348)

	at org.apache.hadoop.hive.ql.exec.vector.VectorFileSinkOperator.initializeOp(VectorFileSinkOperator.java:70)

	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:363)

	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:482)

	at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:439)

	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)

	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:482)

	at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:439)

	at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)

	at org.apache.hadoop.hive.ql.exec.MapOperator.initializeMapOperator(MapOperator.java:489)

	at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:231)

	... 15 more

Caused by: java.lang.ClassNotFoundException: org.jets3t.service.ServiceException

	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

	... 34 more
&lt;/PRE&gt;&lt;P&gt;Below is what I did from hive shell&lt;/P&gt;&lt;PRE&gt;INSERT OVERWRITE DIRECTORY 's3n://santhosh.aws.com/tmp'
SELECT * FROM REGION
&lt;/PRE&gt;&lt;P&gt;The jets3t library is part of the hive classpath ? &lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2016 20:25:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171937#M50147</guid>
      <dc:creator>sgowda</dc:creator>
      <dc:date>2016-12-26T20:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171938#M50148</link>
      <description>&lt;P&gt;what version of jet2st library is on your classpath? Jet3st 0.9.0 has introduced ServiceException, if you have older library then you need to upgrade lib.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2016 20:30:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171938#M50148</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-12-26T20:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171939#M50149</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/8919/rajkumarsingh.html" nodeid="8919"&gt;@Rajkumar Singh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. Should HDP not take care of packaging this correctly ? This issue I see it in HDP 2.5&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2016 21:00:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171939#M50149</guid>
      <dc:creator>sgowda</dc:creator>
      <dc:date>2016-12-26T21:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171940#M50150</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10616/sgowda.html" nodeid="10616"&gt;@Santhosh B Gowda&lt;/A&gt; &lt;/P&gt;&lt;P&gt;I can see hive is picking right jar from these locations, are you seeing different jar version on classpath?&lt;/P&gt;&lt;PRE&gt;


java    25940 hive  mem    REG              252,1   539735  1180054 /usr/hdp/2.5.0.0-1133/hadoop-mapreduce/jets3t-0.9.0.jar

java    25940 hive  mem    REG              252,1   539735  1179933 /usr/hdp/2.5.0.0-1133/hadoop-yarn/lib/jets3t-0.9.0.jar

java    25940 hive  mem    REG              252,1   539735  1053479 /usr/hdp/2.5.0.0-1133/hadoop/lib/jets3t-0.9.0.jar

java    25940 hive  183r   REG              252,1   539735  1053479 /usr/hdp/2.5.0.0-1133/hadoop/lib/jets3t-0.9.0.jar

java    25940 hive  297r   REG              252,1   539735  1179933 /usr/hdp/2.5.0.0-1133/hadoop-yarn/lib/jets3t-0.9.0.jar

java    25940 hive  415r   REG              252,1   539735  1180054 /usr/hdp/2.5.0.0-1133/hadoop-mapreduce/jets3t-0.9.0.jar

&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Dec 2016 21:06:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171940#M50150</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-12-26T21:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171941#M50151</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/8919/rajkumarsingh.html" nodeid="8919"&gt;@Rajkumar Singh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I can see the jar's in specified location, how did we check whether is loading these jars ?&lt;/P&gt;&lt;PRE&gt;ls -lrt /usr/hdp/2.5.3.0-14/hadoop/lib/jets3t-0.9.0.jar
-rw-r--r--. 1 root root 539735 Nov 10 18:00 /usr/hdp/2.5.3.0-14/hadoop/lib/jets3t-0.9.0.jar

&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Dec 2016 23:19:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171941#M50151</guid>
      <dc:creator>sgowda</dc:creator>
      <dc:date>2016-12-26T23:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171942#M50152</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10616/sgowda.html" nodeid="10616"&gt;@Santhosh B Gowda&lt;/A&gt; &lt;/P&gt;&lt;P&gt;if you are using hive-cli/hiveserver2 then get the process id and check &lt;/P&gt;&lt;P&gt;lsof -p &amp;lt;pid&amp;gt; | grep jets3t&lt;/P&gt;&lt;P&gt;it will tell you what jets3t jar available on the classpath&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2016 23:55:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171942#M50152</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-12-26T23:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171943#M50153</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/10616/sgowda.html"&gt;Santhosh B Gowda&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Was this a fresh install or an upgrade from an older version of HDP? If this was an upgrade, this thread may be useful: &lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/33852044/why-can-i-not-read-from-the-aws-s3-in-spark-application-anymore" target="_blank"&gt;http://stackoverflow.com/questions/33852044/why-can-i-not-read-from-the-aws-s3-in-spark-application-anymore&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As I see in your last post, you mention a path /usr/hdp/2.5.3.0-14/hadoop/lib/jets3t-0.9.0.jar, could you also run the following and post the result?&lt;/P&gt;&lt;PRE&gt;ls -lrt /usr/hdp/&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Dec 2016 04:06:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171943#M50153</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-12-27T04:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171944#M50154</link>
      <description>&lt;P&gt;S3N is really old and pretty much deprecated.  Can you change your URL to "&lt;EM&gt;s3a://santhosh.aws.com/tmp&lt;/EM&gt;" and ensure that you have "&lt;EM&gt;fs.s3a.impl=&lt;/EM&gt;&lt;EM&gt;org.apache.hadoop.fs.s3a.&lt;/EM&gt;&lt;EM&gt;S3AFileSystem&lt;/EM&gt;".  If you do not have InstanceProfileCredentialProvider, you have to configure "&lt;EM&gt;fs.s3a.access.key and &lt;/EM&gt;&lt;EM&gt;fs.s3a.secret.key&lt;/EM&gt;".&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2016 06:50:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171944#M50154</guid>
      <dc:creator>rbalamohan</dc:creator>
      <dc:date>2016-12-27T06:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171945#M50155</link>
      <description>&lt;P&gt;See link below to learn why s3a is a better option than s3n, but that may not be the cause for your issue.&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.apache.org/hadoop/AmazonS3"&gt;https://wiki.apache.org/hadoop/AmazonS3&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2016 08:50:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171945#M50155</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-12-27T08:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171946#M50156</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/8919/rajkumarsingh.html" nodeid="8919"&gt;@Rajkumar Singh&lt;/A&gt; Thanks. I could see that jets3t-0.9.0.jar is loaded.&lt;/P&gt;&lt;P&gt;Also as per &lt;A rel="user" href="https://community.cloudera.com/users/311/rbalamohan.html" nodeid="311"&gt;@Rajesh Balamohan&lt;/A&gt; suggestion moving from s3n to s3a , I could get it working.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2016 14:58:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171946#M50156</guid>
      <dc:creator>sgowda</dc:creator>
      <dc:date>2016-12-27T14:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171947#M50157</link>
      <description>&lt;P&gt;Thanks, this works !&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2016 14:58:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171947#M50157</guid>
      <dc:creator>sgowda</dc:creator>
      <dc:date>2016-12-27T14:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: unable to write hive query output to s3</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171948#M50158</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3486/cstanca.html" nodeid="3486"&gt;@Constantin Stanca &lt;/A&gt;I see this issue with both fresh and upgraded system and moving from s3n and s3a help me in uploading to S3.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2016 15:00:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/unable-to-write-hive-query-output-to-s3/m-p/171948#M50158</guid>
      <dc:creator>sgowda</dc:creator>
      <dc:date>2016-12-27T15:00:26Z</dc:date>
    </item>
  </channel>
</rss>

