From issues-return-152519-archive-asf-public=cust-asf.ponee.io@flink.apache.org Tue Feb 13 19:17:27 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id DE0F6180718 for ; Tue, 13 Feb 2018 19:17:26 +0100 (CET) Received: (qmail 12016 invoked by uid 500); 13 Feb 2018 18:17:25 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 11998 invoked by uid 99); 13 Feb 2018 18:17:25 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Feb 2018 18:17:25 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 7FC521A08D0 for ; Tue, 13 Feb 2018 18:17:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -102.311 X-Spam-Level: X-Spam-Status: No, score=-102.311 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id HZT0KSWFVqVe for ; Tue, 13 Feb 2018 18:17:24 +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 60D2C60DB8 for ; Tue, 13 Feb 2018 18:17:20 +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 D8B45E01AD for ; Tue, 13 Feb 2018 18:17:18 +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 E012524788 for ; Tue, 13 Feb 2018 18:17:16 +0000 (UTC) Date: Tue, 13 Feb 2018 18:17:16 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-8607) Add a basic embedded SQL CLI client MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-8607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16362816#comment-16362816 ] ASF GitHub Bot commented on FLINK-8607: --------------------------------------- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/5441#discussion_r167922399 --- Diff: flink-libraries/flink-sql-client/src/main/java/org/apache/flink/table/client/gateway/ResultStore.java --- @@ -0,0 +1,124 @@ +/* + * 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.flink.table.client.gateway; + +import org.apache.flink.configuration.Configuration; +import org.apache.flink.configuration.JobManagerOptions; +import org.apache.flink.runtime.net.ConnectionUtils; +import org.apache.flink.table.client.SqlClientException; +import org.apache.flink.table.client.config.Deployment; +import org.apache.flink.table.client.config.Environment; + +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Maintains dynamic results. + */ +public class ResultStore { + + private Configuration flinkConfig; + + private Map results; + + public ResultStore(Configuration flinkConfig) { + this.flinkConfig = flinkConfig; + + results = new HashMap<>(); + } + + public DynamicResult createResult(Environment env) { + if (!env.getExecution().isStreamingExecution()) { + throw new SqlExecutionException("Emission is only supported in streaming environments yet."); --- End diff -- Is this the point at which batch queries will fail? Can we fail earlier with a better error message? > Add a basic embedded SQL CLI client > ----------------------------------- > > Key: FLINK-8607 > URL: https://issues.apache.org/jira/browse/FLINK-8607 > Project: Flink > Issue Type: Sub-task > Components: Table API & SQL > Reporter: Timo Walther > Assignee: Timo Walther > Priority: Major > > This issue describes the Implementation Plan 1 of FLIP-24. > Goal: Add the basic features to play around with Flink's streaming SQL. > {code} > - Add CLI component that reads the configuration files > - "Pre-registered table sources" > - "Job parameters" > - Add executor for retrieving pre-flight information and corresponding CLI SQL parser > - SHOW TABLES > - DESCRIBE TABLE > - EXPLAIN > - Add streaming append query submission to executor > - Submit jars and run SELECT query using the ClusterClient > - Collect results on heap and serve them on the CLI side (Internal Mode with SELECT) > - SOURCE (for executing a SQL statement stored in a local file) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)