Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 925DE200C33 for ; Fri, 3 Feb 2017 19:43:58 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 913B5160B43; Fri, 3 Feb 2017 18:43:58 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CCE5A160B3F for ; Fri, 3 Feb 2017 19:43:57 +0100 (CET) Received: (qmail 71232 invoked by uid 500); 3 Feb 2017 18:43:57 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 71179 invoked by uid 99); 3 Feb 2017 18:43:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2017 18:43:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 9A350C0939 for ; Fri, 3 Feb 2017 18:43:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Unbzb4Zs3XpE for ; Fri, 3 Feb 2017 18:43:55 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 453A05FBB2 for ; Fri, 3 Feb 2017 18:43:54 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D3ED7E05E0 for ; Fri, 3 Feb 2017 18:43:52 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id CF5842529B for ; Fri, 3 Feb 2017 18:43:51 +0000 (UTC) Date: Fri, 3 Feb 2017 18:43:51 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5088) Error when reading DBRef column MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 03 Feb 2017 18:43:58 -0000 [ https://issues.apache.org/jira/browse/DRILL-5088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15851910#comment-15851910 ] ASF GitHub Bot commented on DRILL-5088: --------------------------------------- Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/702#discussion_r99396951 --- Diff: contrib/storage-mongo/src/test/java/org/apache/drill/exec/store/mongo/TestTableGenerator.java --- @@ -58,7 +59,16 @@ public static void generateTable(String dbName, String collection, .jsonArray(jsonArray).importFile(jsonFile).build(); MongoImportExecutable importExecutable = MongoImportStarter .getDefaultInstance().prepare(mongoImportConfig); - importExecutable.start(); + MongoImportProcess importProcess = importExecutable.start(); + + try { + while (importProcess.isProcessRunning()) { + Thread.sleep(1000); + } + }catch (Exception ex) { + logger.error("Import mongoDb failed", ex); --- End diff -- Here we log the error but go ahead and return. Should we propagate an exception upward in the call stack so that the caller knows that "Something Is Wrong"? Otherwise, how will the caller know whether the import process is ready or not? > Error when reading DBRef column > ------------------------------- > > Key: DRILL-5088 > URL: https://issues.apache.org/jira/browse/DRILL-5088 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Data Types > Environment: drill 1.9.0 > mongo 3.2 > Reporter: Guillaume Champion > Assignee: Chunhui Shi > > In a mongo database with DBRef, when a DBRef is inserted in the first line of a mongo's collection drill query failed : > {code} > 0: jdbc:drill:zk=local> select * from mongo.mydb.contact2; > Error: SYSTEM ERROR: CodecConfigurationException: Can't find a codec for class com.mongodb.DBRef. > {code} > Simple example to reproduce: > In mongo instance > {code} > db.contact2.drop(); > db.contact2.insert({ "_id" : ObjectId("582081d96b69060001fd8938"), "account" : DBRef("contact", ObjectId("999cbf116b69060001fd8611")) }); > {code} > In drill : > {code} > 0: jdbc:drill:zk=local> select * from mongo.mydb.contact2; > Error: SYSTEM ERROR: CodecConfigurationException: Can't find a codec for class com.mongodb.DBRef. > [Error Id: 2944d766-e483-4453-a706-3d481397b186 on Analytics-Biznet:31010] (state=,code=0) > {code} > If the first line doesn't contain de DBRef, drill will querying correctly : > In a mongo instance : > {code} > db.contact2.drop(); > db.contact2.insert({ "_id" : ObjectId("582081d96b69060001fd8939") }); > db.contact2.insert({ "_id" : ObjectId("582081d96b69060001fd8938"), "account" : DBRef("contact", ObjectId("999cbf116b69060001fd8611")) }); > {code} > In drill : > {code} > 0: jdbc:drill:zk=local> select * from mongo.mydb.contact2; > +--------------------------------------+---------------------------------------------------------------+ > | _id | account | > +--------------------------------------+---------------------------------------------------------------+ > | {"$oid":"582081d96b69060001fd8939"} | {"$id":{}} | > | {"$oid":"582081d96b69060001fd8938"} | {"$ref":"contact","$id":{"$oid":"999cbf116b69060001fd8611"}} | > +--------------------------------------+---------------------------------------------------------------+ > 2 rows selected (0,563 seconds) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)