From dev-return-33157-apmail-drill-dev-archive=drill.apache.org@drill.apache.org Thu Nov 2 18:53:48 2017 Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A9FC810530 for ; Thu, 2 Nov 2017 18:53:48 +0000 (UTC) Received: (qmail 86698 invoked by uid 500); 2 Nov 2017 18:53:48 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 86630 invoked by uid 500); 2 Nov 2017 18:53:48 -0000 Mailing-List: contact dev-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 dev@drill.apache.org Received: (qmail 86619 invoked by uid 99); 2 Nov 2017 18:53:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2017 18:53:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0F889DFB0E; Thu, 2 Nov 2017 18:53:47 +0000 (UTC) From: Vlad-Storona To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #774: DRILL-5337: OpenTSDB storage plugin Content-Type: text/plain Message-Id: <20171102185348.0F889DFB0E@git1-us-west.apache.org> Date: Thu, 2 Nov 2017 18:53:47 +0000 (UTC) Github user Vlad-Storona commented on a diff in the pull request: https://github.com/apache/drill/pull/774#discussion_r148628656 --- Diff: contrib/storage-opentsdb/src/main/java/org/apache/drill/exec/store/openTSDB/schema/OpenTSDBSchemaFactory.java --- @@ -0,0 +1,126 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.drill.exec.store.openTSDB.schema; + +import com.google.common.collect.Maps; +import org.apache.calcite.schema.SchemaPlus; +import org.apache.calcite.schema.Table; +import org.apache.drill.exec.planner.logical.CreateTableEntry; +import org.apache.drill.exec.planner.logical.DrillTable; +import org.apache.drill.exec.planner.logical.DynamicDrillTable; +import org.apache.drill.exec.store.AbstractSchema; +import org.apache.drill.exec.store.SchemaConfig; +import org.apache.drill.exec.store.SchemaFactory; +import org.apache.drill.exec.store.openTSDB.DrillOpenTSDBTable; +import org.apache.drill.exec.store.openTSDB.OpenTSDBScanSpec; +import org.apache.drill.exec.store.openTSDB.OpenTSDBStoragePlugin; +import org.apache.drill.exec.store.openTSDB.OpenTSDBStoragePluginConfig; +import org.apache.drill.exec.store.openTSDB.client.Schema; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import static org.apache.drill.exec.store.openTSDB.Util.getValidTableName; + +public class OpenTSDBSchemaFactory implements SchemaFactory { --- End diff -- It must be shared among several queries. ---