<?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: Mongodb with hive : Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/hadoop/io/BSONWritable in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138164#M23454</link>
    <description>&lt;P&gt;Ok, can you also try using hive aux path?&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2016 22:31:57 GMT</pubDate>
    <dc:creator>jyadav</dc:creator>
    <dc:date>2016-03-22T22:31:57Z</dc:date>
    <item>
      <title>Mongodb with hive : Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/hadoop/io/BSONWritable</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138161#M23451</link>
      <description>&lt;P&gt;Jar -&amp;gt; mongo-hadoop-core-1.4.0,mongo-hadoop-hive-1.4.0,mongo-java-driver-2.10.1 &lt;/P&gt;&lt;P&gt;hive&amp;gt; CREATE EXTERNAL TABLE minute_bars
    &amp;gt; (
    &amp;gt;
    &amp;gt; id STRING,
    &amp;gt;     Symbol STRING,
    &amp;gt;     `Timestamp` STRING,
    &amp;gt;     Day INT,
    &amp;gt;     Open DOUBLE,
    &amp;gt;     High DOUBLE,
    &amp;gt;     Low DOUBLE,
    &amp;gt;     Close DOUBLE,
    &amp;gt;     Volume INT
    &amp;gt; )
    &amp;gt; STORED BY 'com.mongodb.hadoop.hive.MongoStorageHandler'
    &amp;gt; WITH SERDEPROPERTIES('mongo.columns.mapping'='{"id":"_id",
    &amp;gt;  "Symbol":"Symbol", "Timestamp":"Timestamp", "Day":"Day", "Open":"Open", "High":"High", "Low":"Low", "Close":"Close", "Volume":"Volume"}')
    &amp;gt; TBLPROPERTIES('mongo.uri'='mongodb://localhost:27017/marketdata.minbars');
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/hadoop/io/BSONWritable
hive&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 14:28:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138161#M23451</guid>
      <dc:creator>hadoopsmi</dc:creator>
      <dc:date>2016-03-22T14:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Mongodb with hive : Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/hadoop/io/BSONWritable</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138162#M23452</link>
      <description>&lt;P&gt;You could try adding both the "mongo-hadoop-hive.jar" and "mongo-hadoop-core.jar" to the hive.aux.jars.path setting in your hive-site.xml.&lt;/P&gt;&lt;P&gt;Or &lt;/P&gt;&lt;P&gt;You can simply add those jars in your hive shell like,&lt;/P&gt;&lt;P&gt;hive&amp;gt; add "somepath/mongo-hadoop-hive.jar"&lt;/P&gt;&lt;P&gt;hive&amp;gt; add "somepath/mongo-hadoop-core.jar"&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 15:15:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138162#M23452</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-03-22T15:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Mongodb with hive : Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/hadoop/io/BSONWritable</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138163#M23453</link>
      <description>&lt;P&gt;i alrady done that step&lt;/P&gt;&lt;P&gt;hive&amp;gt; add "somepath/mongo-hadoop-hive.jar"&lt;/P&gt;&lt;P&gt;hive&amp;gt; add "somepath/mongo-hadoop-core.jar"&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 17:56:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138163#M23453</guid>
      <dc:creator>hadoopsmi</dc:creator>
      <dc:date>2016-03-22T17:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Mongodb with hive : Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/hadoop/io/BSONWritable</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138164#M23454</link>
      <description>&lt;P&gt;Ok, can you also try using hive aux path?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 22:31:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138164#M23454</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-03-22T22:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Mongodb with hive : Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/hadoop/io/BSONWritable</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138165#M23455</link>
      <description>&lt;P&gt;have you seen this &lt;A href="https://community.hortonworks.com/content/repo/4538/hdp-mongo-tutorial.html" target="_blank"&gt;https://community.hortonworks.com/content/repo/4538/hdp-mongo-tutorial.html&lt;/A&gt; ? Also mongo driver is now at 1.4.2, it may be worth your time to use latest jar. &lt;A href="https://github.com/mongodb/mongo-hadoop/releases" target="_blank"&gt;https://github.com/mongodb/mongo-hadoop/releases&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 15:01:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138165#M23455</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-03-23T15:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Mongodb with hive : Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/hadoop/io/BSONWritable</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138166#M23456</link>
      <description>&lt;P&gt;I got it to work with the following in my repo I linked earlier&lt;/P&gt;&lt;PRE&gt;hdfs dfs -put drivers/* /tmp/udfs

beeline
!connect jdbc:hive2://localhost:10000 “” ””

add jar hdfs://sandbox.hortonworks.com:8020/tmp/udfs/mongo-hadoop-hive-1.5.0-SNAPSHOT.jar;
add jar hdfs://sandbox.hortonworks.com:8020/tmp/udfs/mongo-hadoop-core-1.5.0-SNAPSHOT.jar;
add jar hdfs://sandbox.hortonworks.com:8020/tmp/udfs/mongodb-driver-3.0.4.jar;
DROP TABLE IF EXISTS bars;
CREATE EXTERNAL TABLE bars
(
objectid STRING,
    Symbol STRING,
    TS STRING,
    Day INT,
    Open DOUBLE,
    High DOUBLE,
    Low DOUBLE,
    Close DOUBLE,
    Volume INT
)
STORED BY 'com.mongodb.hadoop.hive.MongoStorageHandler'
WITH SERDEPROPERTIES('mongo.columns.mapping'='{"objectid":"_id",
 "Symbol":"Symbol", "TS":"Timestamp", "Day":"Day", "Open":"Open", "High":"High", "Low":"Low", "Close":"Close", "Volume":"Volume"}')
TBLPROPERTIES('mongo.uri'='mongodb://localhost:27017/marketdata.minibars');
&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Mar 2016 06:40:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Mongodb-with-hive-Error-return-code-1-from-org-apache-hadoop/m-p/138166#M23456</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-03-31T06:40:36Z</dc:date>
    </item>
  </channel>
</rss>

