gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GORA-388) MongoStore: Fix handling of Utf8 in filters
Date Wed, 14 Jan 2015 23:11:34 GMT

    [ https://issues.apache.org/jira/browse/GORA-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14277862#comment-14277862
] 

Hudson commented on GORA-388:
-----------------------------

SUCCESS: Integrated in gora-trunk #1367 (See [https://builds.apache.org/job/gora-trunk/1367/])
GORA-388: Fix handling of Utf8 type in MongoStore local filters. (drazzib: rev 8ce063466a2c833efa7324540a9c5b780f56ee48)
* gora-mongodb/src/main/java/org/apache/gora/mongodb/filters/DefaultFactory.java
* CHANGES.txt
* gora-mongodb/src/test/java/org/apache/gora/mongodb/filters/DefaultFactoryTest.java


> MongoStore: Fix handling of Utf8 in filters
> -------------------------------------------
>
>                 Key: GORA-388
>                 URL: https://issues.apache.org/jira/browse/GORA-388
>             Project: Apache Gora
>          Issue Type: Bug
>          Components: gora-mongodb
>    Affects Versions: 0.5
>            Reporter: Damien Raude-Morvan
>             Fix For: 0.6
>
>
> Gora 0.5 MongoDB driver fail to properly serialize Utf8 instance passed to its local
filters implementation.
> Here is sample code
> {noformat}
> filter.getOperands().add(new Utf8(batchId));
> {noformat}
> that will trigger the following exception at runtime
> {noformat}
> java.lang.IllegalArgumentException: can't serialize class
> org.apache.avro.util.Utf8
> at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:284)
> at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:185)
> at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:131)
> at com.mongodb.DefaultDBEncoder.writeObject(DefaultDBEncoder.java:33)
> at com.mongodb.OutMessage.putObject(OutMessage.java:289)
> at com.mongodb.OutMessage.writeQuery(OutMessage.java:211)
> at com.mongodb.OutMessage.query(OutMessage.java:86)
> at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:81)
> at com.mongodb.DBCollectionImpl.find(DBCollectionImpl.java:66)
> at com.mongodb.DBCursor._check(DBCursor.java:458)
> at com.mongodb.DBCursor._hasNext(DBCursor.java:546)
> at com.mongodb.DBCursor.hasNext(DBCursor.java:571)
> at
> org.apache.gora.mongodb.query.MongoDBResult.nextInner(MongoDBResult.java:69)
> at org.apache.gora.query.impl.ResultBase.next(ResultBase.java:114)
> at
> org.apache.gora.mapreduce.GoraRecordReader.nextKeyValue(GoraRecordReader.java:119)
> at
> org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:531)
> at org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)
> at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
> at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
> at org.apache.hadoop.mapred.MapTask.run(MapTask.java:364)
> at
> org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:223)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:744)
> {noformat}
> This pattern is extensively used by Apache Nutch :
> * [FetcherJob|https://github.com/apache/nutch/blob/2.x/src/java/org/apache/nutch/fetcher/FetcherJob.java#L218]
> * [ParserJob|https://github.com/apache/nutch/blob/2.x/src/java/org/apache/nutch/parse/ParserJob.java#L274]
> * [DbUpdaterJob|https://github.com/apache/nutch/blob/2.x/src/java/org/apache/nutch/crawl/DbUpdaterJob.java#L128]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message