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 53319200B81 for ; Sat, 6 Aug 2016 00:19:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 52021160AAC; Fri, 5 Aug 2016 22:19:22 +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 A2652160AAF for ; Sat, 6 Aug 2016 00:19:21 +0200 (CEST) Received: (qmail 7816 invoked by uid 500); 5 Aug 2016 22:19:20 -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 7665 invoked by uid 99); 5 Aug 2016 22:19:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2016 22:19:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id AEC162C0D5F for ; Fri, 5 Aug 2016 22:19:20 +0000 (UTC) Date: Fri, 5 Aug 2016 22:19:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-4728) Add support for new metadata fetch APIs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 05 Aug 2016 22:19:22 -0000 [ https://issues.apache.org/jira/browse/DRILL-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15410179#comment-15410179 ] ASF GitHub Bot commented on DRILL-4728: --------------------------------------- Github user sudheeshkatkam commented on a diff in the pull request: https://github.com/apache/drill/pull/527#discussion_r73767561 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/pojo/PojoRecordReader.java --- @@ -47,24 +46,30 @@ import org.apache.drill.exec.vector.AllocationHelper; import org.apache.drill.exec.vector.ValueVector; +import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; -public class PojoRecordReader extends AbstractRecordReader { +public class PojoRecordReader extends AbstractRecordReader implements Iterable { private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PojoRecordReader.class); private static final ControlsInjector injector = ControlsInjectorFactory.getInjector(PojoRecordReader.class); - public final int forJsonIgnore = 1; - private final Class pojoClass; - private final Iterator iterator; + private final List pojoObjects; private PojoWriter[] writers; private boolean doCurrent; private T currentPojo; private OperatorContext operatorContext; + private Iterator currentIterator; + + /** + * TODO: Cleanup the callers to pass the List of POJO objects directly rather than iterator. + * @param pojoClass + * @param iterator + */ public PojoRecordReader(Class pojoClass, Iterator iterator) { this.pojoClass = pojoClass; - this.iterator = iterator; + this.pojoObjects = ImmutableList.copyOf(iterator); --- End diff -- I looked; most of the calls are `list.iterator()`, beats the purpose. > Add support for new metadata fetch APIs > --------------------------------------- > > Key: DRILL-4728 > URL: https://issues.apache.org/jira/browse/DRILL-4728 > Project: Apache Drill > Issue Type: Sub-task > Components: Metadata > Reporter: Venki Korukanti > Assignee: Venki Korukanti > Fix For: 1.8.0 > > > Please see the doc attached to the parent JIRA DRILL-4714 for details on APIs. > Add support for following APIs (including {{protobuf}} messages, server handling code and Java client APIs) > {code} > List getCatalogs(Filter catalogNameFilter) > List getSchemas( > Filter catalogNameFilter, > Filter schemaNameFilter > ) > List getTables( > Filter catalogNameFilter, > Filter schemaNameFilter, > Filter tableNameFilter > ) > List getColumns( > Filter catalogNameFilter, > Filter schemaNameFilter, > Filter tableNameFilter, > Filter columnNameFilter > ) > {code} > Note: native client changes are not going to be included in this patch. Will file a separate JIRA. -- This message was sent by Atlassian JIRA (v6.3.4#6332)