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 1EC8A200CF3 for ; Tue, 29 Aug 2017 18:57:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1CF041671E9; Tue, 29 Aug 2017 16:57:11 +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 63A5F1671EB for ; Tue, 29 Aug 2017 18:57:10 +0200 (CEST) Received: (qmail 22120 invoked by uid 500); 29 Aug 2017 16:57:04 -0000 Mailing-List: contact dev-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 dev@flink.apache.org Received: (qmail 22027 invoked by uid 99); 29 Aug 2017 16:57:04 -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; Tue, 29 Aug 2017 16:57:04 +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 A1BC9C2CF3 for ; Tue, 29 Aug 2017 16:57:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id XGE5kl-hU6hH for ; Tue, 29 Aug 2017 16:57:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 5C89960EF5 for ; Tue, 29 Aug 2017 16:57:02 +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 3106AE0E29 for ; Tue, 29 Aug 2017 16:57:01 +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 8539324163 for ; Tue, 29 Aug 2017 16:57:00 +0000 (UTC) Date: Tue, 29 Aug 2017 16:57:00 +0000 (UTC) From: "Nycholas de Oliveira e Oliveira (JIRA)" To: dev@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (FLINK-7556) Fix fetch size configurable in JDBCInputFormat for MySQL Driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 29 Aug 2017 16:57:11 -0000 Nycholas de Oliveira e Oliveira created FLINK-7556: ------------------------------------------------------ Summary: Fix fetch size configurable in JDBCInputFormat for MySQL Driver Key: FLINK-7556 URL: https://issues.apache.org/jira/browse/FLINK-7556 Project: Flink Issue Type: Bug Components: Batch Connectors and Input/Output Formats Affects Versions: 1.3.2 Reporter: Nycholas de Oliveira e Oliveira Priority: Trivial According to the MySQL documentation[1], it follows: * ResultSet ??By default, ResultSets are completely retrieved and stored in memory. In most cases this is the most efficient way to operate and, due to the design of the MySQL network protocol, is easier to implement. If you are working with ResultSets that have a large number of rows or large values and cannot allocate heap space in your JVM for the memory required, you can tell the driver to stream the results back one row at a time. To enable this functionality, create a Statement instance in the following manner:?? {code:java} stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY); stmt.setFetchSize(Integer.MIN_VALUE); {code} ??The combination of a forward-only, read-only result set, with a fetch size of Integer.MIN_VALUE serves as a signal to the driver to stream result sets row-by-row. After this, any result sets created with the statement will be retrieved row-by-row. ?? Allow the *Integer.MIN_VALUE* to be accepted as a parameter for _setFetchSize_. [1] - https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-implementation-notes.html -- This message was sent by Atlassian JIRA (v6.4.14#64029)