Return-Path: X-Original-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 732051054C for ; Mon, 9 Feb 2015 18:59:45 +0000 (UTC) Received: (qmail 15707 invoked by uid 500); 9 Feb 2015 18:59:38 -0000 Delivered-To: apmail-hadoop-mapreduce-issues-archive@hadoop.apache.org Received: (qmail 15648 invoked by uid 500); 9 Feb 2015 18:59:38 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-issues@hadoop.apache.org Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 15550 invoked by uid 99); 9 Feb 2015 18:59:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Feb 2015 18:59:38 +0000 Date: Mon, 9 Feb 2015 18:59:38 +0000 (UTC) From: "ramtin (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (MAPREDUCE-6246) DBOutputFormat.java appending extra semicolon to query which is incompatible with DB2 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/MAPREDUCE-6246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ramtin updated MAPREDUCE-6246: ------------------------------ Description: In DBOutputFormat class there is constructQuery method that generates "INSERT INTO" statement with semicolon(";") at the end. Semicolon is ANSI SQL-92 standard character for a statement terminator but this feature is disabled(OFF) as a default settings in IBM DB2. Although by using -t we can turn it ON for db2. (http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0010410.html?cp=SSEPGG_9.7.0%2F3-6-2-0-2). But there are some products that already built on top of this default setting (OFF) so by turning ON this feature make them error prone. was: In DBOutputFormat class there is constructQuery method that generates "INSERT INTO" statement with semicolon(";") at the end. Semicolon is ANSI SQL-92 standard character for a statement terminator but this feature is disabled(OFF) as a default settings in IBM DB2. Although by using -t we can turn it ON for db2. (http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0010410.html?cp=SSEPGG_9.7.0%2F3-6-2-0-2). But there are some products that already built on top of this default setting (OFF) so by turning ON this feature make them error prone. I changed the current DBOutputFormat class by checking the product name from connection object to see if it is DB2 then generates "INSERT INTO" command without semicolon(";"). This technique is already used in DBInputFormat class for generating different "SELECT" statements for Oracle and MySQL databases. > DBOutputFormat.java appending extra semicolon to query which is incompatible with DB2 > ------------------------------------------------------------------------------------- > > Key: MAPREDUCE-6246 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-6246 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: mrv1, mrv2 > Affects Versions: 2.4.1 > Environment: OS: RHEL 5.x, RHEL 6.x, SLES 11.x > Platform: xSeries, pSeries > Browser: Firefox, IE > Security Settings: No Security, Flat file, LDAP, PAM > File System: HDFS, GPFS FPO > Reporter: ramtin > Assignee: ramtin > Original Estimate: 24h > Remaining Estimate: 24h > > In DBOutputFormat class there is constructQuery method that generates "INSERT INTO" statement with semicolon(";") at the end. > Semicolon is ANSI SQL-92 standard character for a statement terminator but this feature is disabled(OFF) as a default settings in IBM DB2. > Although by using -t we can turn it ON for db2. (http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0010410.html?cp=SSEPGG_9.7.0%2F3-6-2-0-2). But there are some products that already built on top of this default setting (OFF) so by turning ON this feature make them error prone. -- This message was sent by Atlassian JIRA (v6.3.4#6332)