mongodb-user
[Arriba] [Todas las Listas]

[mongodb-Usuario] Incapaz de conectar Hive con MongoDB utilizando mongo-

To: mongodb-user <mongodb-user@xxxxxxxxxxxxxxxx>
Subject: [mongodb-Usuario] Incapaz de conectar Hive con MongoDB utilizando mongo-hadoop connector
From: Prathamesh joshi <prathamjoshi07@xxxxxxxxx>
Date: Tue, 8 Aug 2017 05:25:43 -0700 (PDT)
Delivery-date: Tue, 08 Aug 2017 09:54:20 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=xpMS8rRLbehlhxC0NjjPXgIKyxL08eRXK7lUTok+UZg=; b=ispWd6sep3Dp3WpnTPDnnnCcQnHvrt1CAZbIPJXKeqI704pXG2/LI36qS+qw1k0TcK b3jvyDhmnAhqIRffXRgFzTDk4G1MXn2FvfBnc2EzhPf9tBTDqqoYxug2iBKzfvU4BUQt 2YMg6pM5YB1ts1dm0SMGYCpYc/JhSVuSaKXbLMOf+GYY7lWnt58JvAL6EksitEm1V8Jz MQzEkr0iesYaSuJl1ICUCvu1IqoF8DUOxMRK2UEDNQvl5/jeZkUVBK8cIVepPSr3/Blz oMW3dQeHFsdn+kNBCoHHdRU9AFfJk3XzkDb0yGFlxMepoArntYxAx6O+yzMbcOp9aPwA q4+w==
Envelope-to: traductor@xxxxxxxxxxx
List-archive: <https://groups.google.com/group/mongodb-use>
List-help: <https://groups.google.com/support/>, <mailto:mongodb-user+help@googlegroups.com>
List-id: <mongodb-user.googlegroups.com>
List-post: <https://groups.google.com/group/mongodb-user/post>, <mailto:mongodb-user@googlegroups.com>
List-subscribe: <https://groups.google.com/group/mongodb-user/subscribe>, <mailto:mongodb-user+subscribe@googlegroups.com>
List-unsubscribe: <mailto:googlegroups-manage+1044811755470+unsubscribe@googlegroups.com>, <https://groups.google.com/group/mongodb-user/subscribe>
Mailing-list: list mongodb-user@xxxxxxxxxxxxxxxx; contact mongodb-user+owners@xxxxxxxxxxxxxxxx
Reply-to: mongodb-user@xxxxxxxxxxxxxxxx
Sender: mongodb-user@xxxxxxxxxxxxxxxx
Hola  

Estoy intentando instalar y configurar **hive* con *mongo-*hadoop-núcleo 2.0.2, 
para el primer tiempo. He instalado **hadoop 2.8.0, *Hive 2.1.1 y *MongoDB 
3.4.6.* Y todo trabaja bien cuándo corriendo individualmente.

   Mi problema es, no soy capaz de conectar *MongoDB con *Hive. Estoy utilizando 
*mongo-*Hadoop *connector para esto tan mencionado aquí 
*https://*github.*com/*mongodb/*mongo-*hadoop/*wiki/*Hive-Uso *El requerido *jars 
es añadió a *Hadoop y *Hive *lib. Incluso les añado en *hive.*sh Y *runtime 
de *hive consola (con ADD *JAR .....).* Estoy consiguiendo error mientras ejecutando 
Crea consulta de mesa 


Mi Consulta es 

CREA MESA EXTERNA *testHive
(
    *id CADENA,
    CADENA de nombre
)
ALMACENADO POR '*com.*mongodb.*hadoop.*hive.*MongoStorageHandler'
CON *SERDEPROPERTIES('*mongo.Columnas.*mapping'='"#unknown{^*id":"_*id","nombre":"nombre"}')
*TBLPROPERTIES('*mongo.*uri'='*mongodb://*localhost:27017/*hiveDb.*testHive');


*Y consigo el siguiendo el error*


FALLÓ: Error de Ejecución, código de regreso 1 de *org.*apache.*hadoop.*hive.*ql.*exec.*DDLTask. *com/*mongodb/*hadoop/*io/*BSONWritable
*hive> ERROR *hive.*ql.*exec.*DDLTask - *java.*lang.*NoClassDefFoundError: *com/*mongodb/*hadoop/*io/*BSONWritable
    En *com.*mongodb.*hadoop.*hive.*BSONSerDe.*initialize(*BSONSerDe.*java:132)
    en *org.*apache.*hadoop.*hive.*serde2.*SerDeUtils.*initializeSerDe(*SerDeUtils.*java:537)
    en *org.*apache.*hadoop.*hive.*metastore.*MetaStoreUtils.*getDeserializer(*MetaStoreUtils.*java:424)
    en *org.*apache.*hadoop.*hive.*metastore.*MetaStoreUtils.*getDeserializer(*MetaStoreUtils.*java:411)
    en *org.*apache.*hadoop.*hive.*ql.*metadata.Mesa.*getDeserializerFromMetaStore(Mesa.*java:279)
    en *org.*apache.*hadoop.*hive.*ql.*metadata.Mesa.*getDeserializer(Mesa.*java:261)



muestra que *com/*mongodb/*hadoop/*io/*BSONWritable la clase no es en *classpath 
pero tengo añadió el requerido(*mongo-*hadoop-núcleo.*jar) *jar Y la clase es 
presente en el *jar. La versión de *jars estoy utilizando 


**mongo-*hadoop-núcleo 2.0.2,*

**mongo-*hadoop-*hive 2.0.2,*

**mongo-*java-conductor 3.0.2*


*Thanks




-- 
recibiste este mensaje porque eres *subscribed al *Google Grupos "*mongodb-grupo"
de usuario.

Para otro *MongoDB opciones de apoyo técnico, ve: *https://*docs.*mongodb.*com/Apoyo/manual/
--- 
recibiste este mensaje porque eres *subscribed al *Google Grupos "*mongodb-grupo" de usuario.
A *unsubscribe de este grupo y la parón que recibe *emails de él, enviar un *email a *mongodb-usuario+unsubscribe@xxxxxxxxxxxxxxxx.
A correo a este grupo, envía *email a *mongodb-user@xxxxxxxxxxxxxxxx.
Visita este grupo en *https://grupos.*google.*com/Grupo/*mongodb-usuario.
Para ver esta discusión en la visita de web *https://grupos.*google.*com/*d/*msgid/*mongodb-Usuario/*eb14*b673-1*c57-4*d4*c-8*e27-73anuncio687*b9*eb9%40*googlegroups.*com.
Para más opciones, visita *https://grupos.*google.*com/*d/*optout.
Hello  

I am trying to install and configure *hive* with mongo-hadoop-core 2.0.2, 
for the first time. I have installed *hadoop 2.8.0, Hive 2.1.1 and MongoDB 
3.4.6.* and everything works fine when running individually.

   My problem is, I am not able to connect MongoDB with Hive. I am using 
mongo-Hadoop connector for this as mentioned here 
https://github.com/mongodb/mongo-hadoop/wiki/Hive-Usage *The required jars 
are added to Hadoop and Hive lib. Even I add them in hive.sh and runtime 
from hive console (with ADD JAR .....).* I am getting error while executing 
Create table query 


My Query is 

CREATE EXTERNAL TABLE testHive
(
    id STRING,
    name STRING
)
STORED BY 'com.mongodb.hadoop.hive.MongoStorageHandler'
WITH SERDEPROPERTIES('mongo.columns.mapping'='{"id":"_id","name":"name"}')
TBLPROPERTIES('mongo.uri'='mongodb://localhost:27017/hiveDb.testHive');


*And I get the following error*


FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. com/mongodb/hadoop/io/BSONWritable
hive> ERROR hive.ql.exec.DDLTask - java.lang.NoClassDefFoundError: com/mongodb/hadoop/io/BSONWritable
    at com.mongodb.hadoop.hive.BSONSerDe.initialize(BSONSerDe.java:132)
    at org.apache.hadoop.hive.serde2.SerDeUtils.initializeSerDe(SerDeUtils.java:537)
    at org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:424)
    at org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:411)
    at org.apache.hadoop.hive.ql.metadata.Table.getDeserializerFromMetaStore(Table.java:279)
    at org.apache.hadoop.hive.ql.metadata.Table.getDeserializer(Table.java:261)



It shows that com/mongodb/hadoop/io/BSONWritable class is not in classpath 
but I have added the required(mongo-hadoop-core.jar) jar and class are 
present in the jar. The version of jars I am using 


*mongo-hadoop-core 2.0.2,*

*mongo-hadoop-hive 2.0.2,*

*mongo-java-driver 3.0.2*


Thanks




-- 
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
--- 
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to mongodb-user@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/eb14b673-1c57-4d4c-8e27-73ad687b9eb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Anterior por Tema] Tema Actual [Siguiente por Tema>