2014년 12월 2일 화요일

MongoDB - Hive Authentication

I'm facing hive mongodb authentication issue. I'm using below commands.

create table a1(name string)
     stored by 'com.mongodb.hadoop.hive.MongoStorageHandler'
     WITH SERDEPROPERTIES('mongo.columns.mapping'='{"utime":"utime"}') TBLPROPERTIES('mongo.auth.uri'='mongodb://rvis:12345678@54.204.47.10:27017/a1');

insert into table a1 select name from test;

Error: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row (tag=0) {"key":{},"value":{"_col0":"a731c9faff729ccaf6357205d141c17d119013d9c0588ade504e4c40fc6b32bb"}}
        at org.apache.hadoop.hive.ql.exec.mr.ExecReducer.reduce(ExecReducer.java:283)
        at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:444)
        at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:392)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1614)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163)



If I don't provide username and password then it's work fine.

Can anyone please shed some light on this.


댓글 없음:

댓글 쓰기