<?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: Hive fails with IOException: Error writing to server on really long query in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148737#M111263</link>
    <description>&lt;P&gt;Can you write it as a script and execute script instead of as one query? You can pass script to beeline or hive shell or do source command within CLI. @kevin vasko&lt;/P&gt;</description>
    <pubDate>Sun, 21 Feb 2016 01:51:14 GMT</pubDate>
    <dc:creator>aervits</dc:creator>
    <dc:date>2016-02-21T01:51:14Z</dc:date>
    <item>
      <title>Hive fails with IOException: Error writing to server on really long query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148736#M111262</link>
      <description>&lt;P&gt;Using HDP 2.3.2 sandbox.
This is the second error I got trying to get this working. The first error and "solution" can be found here. &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/18007/hive-fails-with-hive-internal-error-message-full-h.html" target="_blank"&gt;https://community.hortonworks.com/questions/18007/hive-fails-with-hive-internal-error-message-full-h.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have an external table defined over a folder that contains XML documents. There is 1 column in this table with the column containing each documents data as a string.&lt;/P&gt;&lt;P&gt; I am trying to create a view on top of the XML data with xpaths. So for example, &lt;/P&gt;&lt;P&gt; CREATE VIEW myview (column1,...Column N) AS SELECT xpath_string(rawxml, '/my/xpath/to/value'), xpath_string(rawxml, '/another/xpath') FROM myxmltable;&lt;/P&gt;&lt;P&gt; The XML document has 400+ xpaths that I want to grab and put into the view. I can do about 60 columns worth of xpaths before I get this error. &lt;/P&gt;&lt;PRE&gt;FAILED: Hive Internal Error: com.sun.jersey.api.client.ClientHandlerException(java.io.IOException: java.io.IOException: Error writing to server)
com.sun.jersey.api.client.ClientHandlerException: java.io.IOException: java.io.IOException: Error writing to server
  at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
  at com.sun.jersey.api.client.Client.handle(Client.java:648)&lt;/PRE&gt;&lt;P&gt;My cursory research seems to indicate that the query string is too long and is breaking something. I am writing these queries on the hiveCLI so not sure how else I can fix this. I also tried using beeline and get the same error. &lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2016 01:47:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148736#M111262</guid>
      <dc:creator>kvasko</dc:creator>
      <dc:date>2016-02-19T01:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails with IOException: Error writing to server on really long query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148737#M111263</link>
      <description>&lt;P&gt;Can you write it as a script and execute script instead of as one query? You can pass script to beeline or hive shell or do source command within CLI. @kevin vasko&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2016 01:51:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148737#M111263</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-02-21T01:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails with IOException: Error writing to server on really long query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148738#M111264</link>
      <description>&lt;P&gt;I have not tried. I'll try it and see.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 22:05:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148738#M111264</guid>
      <dc:creator>kvasko</dc:creator>
      <dc:date>2016-02-23T22:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails with IOException: Error writing to server on really long query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148739#M111265</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/2337/kvasko.html" nodeid="2337"&gt;@Kevin Vasko&lt;/A&gt;&lt;P&gt;See this thread &lt;A href="http://stackoverflow.com/questions/11534034/shell-script-to-run-hiveql-queries" target="_blank"&gt;http://stackoverflow.com/questions/11534034/shell-script-to-run-hiveql-queries&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 18:45:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148739#M111265</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-02-24T18:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails with IOException: Error writing to server on really long query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148740#M111266</link>
      <description>&lt;P&gt;Thanks but same issue. How can I increase the value of how long of string Hive can take as a query?&lt;/P&gt;&lt;P&gt;I created a SimpleUDF that takes an input of the XML string and does all the xpath parsing on that file and returns a map type. I was hoping that getting rid of all the xpath calls would eliminate the issue but didn't work. I can now do SELECT m["key"] FROM (SELECT myfunc(xmldata) FROM xmlSource). But when I do SELECT m["key1"]....m[key400" FROM ...(...) I'm back at the "full HEAD" issue for some reason. &lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 07:46:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148740#M111266</guid>
      <dc:creator>kvasko</dc:creator>
      <dc:date>2016-02-25T07:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails with IOException: Error writing to server on really long query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148741#M111267</link>
      <description>&lt;P&gt;This may help &lt;A rel="user" href="https://community.cloudera.com/users/2337/kvasko.html" nodeid="2337"&gt;@Kevin Vasko&lt;/A&gt; &lt;A href="https://community.hortonworks.com/questions/6381/limitations-on-of-hive-columns.html" target="_blank"&gt;https://community.hortonworks.com/questions/6381/limitations-on-of-hive-columns.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 08:30:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148741#M111267</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-02-25T08:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails with IOException: Error writing to server on really long query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148742#M111268</link>
      <description>&lt;P&gt;since there isn't really any hard limit, and 400 columns I shouldn't be enough to cause oom memory issues I'm not quite sure on what else to do. This issue to me purely looks like configuration/bugs in Hive or its dependencies. I posted this issue on the user mailing list but I haven't heard anything. Any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 08:55:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148742#M111268</guid>
      <dc:creator>kvasko</dc:creator>
      <dc:date>2016-02-25T08:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails with IOException: Error writing to server on really long query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148743#M111269</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2337/kvasko.html" nodeid="2337"&gt;@Kevin Vasko&lt;/A&gt; I need more information on this.&lt;/P&gt;&lt;P&gt;Please share more information from logs&lt;/P&gt;&lt;OL&gt;
&lt;/OL&gt;&lt;P&gt;com.sun.jersey.api.client.ClientHandlerException: java.io.IOException: java.io.IOException:&lt;STRONG&gt;Error writing to server&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 10:21:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148743#M111269</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2016-02-25T10:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hive fails with IOException: Error writing to server on really long query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148744#M111270</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/140/nsabharwal.html" nodeid="140"&gt;@Neeraj Sabharwal&lt;/A&gt; There are two errors I've been fighting with on getting access to all of these columns in the same query. The second one I *thought* I had a work around for by disabling security (unchecking the security box in Ambari for Hive) but it keeps showing back up. Here is the defect which I think I'm running into for the FULL head issue. &lt;/P&gt;&lt;P&gt;UPDATE: I'm about 99.99% sure I figured out the problem! I started looking further into the ERROR logs. This line here "at org.apache.atlas.security.SecureClientUtils$1$1.run(SecureClientUtils.java:103)" tipped me off that in some way ATLAS was being interacted with. I disabled ATLAS by turning off the atlas service and removing&lt;/P&gt;&lt;PRE&gt;hive.exec.failure.hooks=org.apache.atlas.hive.hook.HiveHook&lt;/PRE&gt;&lt;P&gt;I ran my entire query and it worked without issue! I would venture to say that this is an issue with ATLAS not being able to handle really long queries.&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/HIVE-11720"&gt;https://issues.apache.org/jira/browse/HIVE-11720&lt;/A&gt;&lt;/P&gt;&lt;P&gt;1. Error writing to server&lt;/P&gt;&lt;P&gt;&lt;A href="https://gist.github.com/kur1j/513e5a1499eef6c727a1"&gt;https://gist.github.com/kur1j/513e5a1499eef6c727a1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. FULL head &lt;/P&gt;&lt;P&gt;&lt;A href="https://gist.github.com/kur1j/217eae2065c7953d9cf7"&gt;https://gist.github.com/kur1j/217eae2065c7953d9cf7&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 22:12:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hive-fails-with-IOException-Error-writing-to-server-on/m-p/148744#M111270</guid>
      <dc:creator>kvasko</dc:creator>
      <dc:date>2016-02-25T22:12:43Z</dc:date>
    </item>
  </channel>
</rss>

