From dev-return-35539-archive-asf-public=cust-asf.ponee.io@sqoop.apache.org Thu Jan 18 21:51:05 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 06BAA180654 for ; Thu, 18 Jan 2018 21:51:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E9221160C2B; Thu, 18 Jan 2018 20:51:04 +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 3C5CD160C26 for ; Thu, 18 Jan 2018 21:51:04 +0100 (CET) Received: (qmail 42611 invoked by uid 500); 18 Jan 2018 20:51:03 -0000 Mailing-List: contact dev-help@sqoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sqoop.apache.org Delivered-To: mailing list dev@sqoop.apache.org Received: (qmail 42600 invoked by uid 99); 18 Jan 2018 20:51:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jan 2018 20:51:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E4AE2C29E5 for ; Thu, 18 Jan 2018 20:51:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.91 X-Spam-Level: X-Spam-Status: No, score=-99.91 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id rAJyqgABD4zu for ; Thu, 18 Jan 2018 20:51:02 +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 CF4F65F341 for ; Thu, 18 Jan 2018 20:51:01 +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 52AC2E0959 for ; Thu, 18 Jan 2018 20:51: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 12CC121306 for ; Thu, 18 Jan 2018 20:51:01 +0000 (UTC) Date: Thu, 18 Jan 2018 20:51:01 +0000 (UTC) From: "Benjamin BONNET (JIRA)" To: dev@sqoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SQOOP-3271) DirectNetezzaManager Fails for checkTable method for row validation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SQOOP-3271?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1633= 1207#comment-16331207 ]=20 Benjamin BONNET commented on SQOOP-3271: ---------------------------------------- Hi [~shyamsunderrai@gmail.com], actually,after a ResultSet is returned, the cursor is positioned before the= first row (as stated in the [javadoc|https://docs.oracle.com/javase/7/docs= /api/java/sql/ResultSet.html]). So the check seems correct. Are you sure user 'admin' is=C2=A0also=C2=A0table owner ? If he is not, tha= t may explain why SQOOP=C2=A0complain about the table validity. Regards > DirectNetezzaManager Fails for checkTable method for row validation > ------------------------------------------------------------------- > > Key: SQOOP-3271 > URL: https://issues.apache.org/jira/browse/SQOOP-3271 > Project: Sqoop > Issue Type: Bug > Components: connectors > Affects Versions: 1.4.6 > Reporter: Shyam Rai > Priority: Major > > While using --direct method which invokes DirectNetezzaManager, checkTabl= e method tries to validate 1 row using this query > {code:java} > private static final String QUERY_CHECK_DICTIONARY_FOR_TABLE =3D > "SELECT 1 FROM _V_TABLE WHERE OWNER=3D ? " > + " AND TABLENAME =3D ? "; > {code} > For validity, the check introduced for the query > {code:java} > if (!rs.next()) {code} > is already at the first row and when assessed for next ResultSet, gets in= to the exception clause. > Here is an example of the error: > {code:java} > [sqoop@hdp261 sqoopjar]$ sqoop export --connect jdbc:netezza://10.10.20.1= 4:5480/Test --table MYTEST --username admin --password password --hcatalog-= database default --hcatalog-table mysource --input-fields-terminated-by ","= --input-null-string "\\\\N" --input-null-non-string "\\\\N" --direct --bat= ch > Warning: /usr/hdp/2.6.1.0-129/hbase does not exist! HBase imports will fa= il. > Please set $HBASE_HOME to the root of your HBase installation. > Warning: /usr/hdp/2.6.1.0-129/accumulo does not exist! Accumulo imports w= ill fail. > Please set $ACCUMULO_HOME to the root of your Accumulo installation. > Listening for transport dt_socket at address: 14444 > 17/12/22 20:36:35 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.6.1.0-= 129 > 17/12/22 20:36:35 WARN tool.BaseSqoopTool: Setting your password on the c= ommand-line is insecure. Consider using -P instead. > 17/12/22 20:36:35 WARN tool.BaseSqoopTool: Input field/record delimiter o= ptions are not used in HCatalog jobs unless the format is text. It is bet= ter to use --hive-import in those cases. For text formats > 17/12/22 20:36:35 INFO manager.SqlManager: Using default fetchSize of 100= 0 > 17/12/22 20:36:35 INFO tool.CodeGenTool: Beginning code generation > 17/12/22 20:36:45 INFO manager.SqlManager: Executing SQL statement: SELEC= T t.* FROM "MYTEST" AS t WHERE 1=3D0 > 17/12/22 20:36:45 INFO manager.SqlManager: Executing SQL statement: SELEC= T t.* FROM "MYTEST" AS t WHERE 1=3D0 > 17/12/22 20:36:45 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr= /hdp/2.6.1.0-129/hadoop-mapreduce > Note: /tmp/sqoop-sqoop/compile/a82bdc2ed69a4cc79c5ca06fa06c18d8/MYTEST.ja= va uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > 17/12/22 20:36:48 INFO orm.CompilationManager: Writing jar file: /tmp/sqo= op-sqoop/compile/a82bdc2ed69a4cc79c5ca06fa06c18d8/MYTEST.jar > 17/12/22 20:36:48 ERROR manager.DirectNetezzaManager: MYTEST is not a val= id Netezza table. Please make sure that you have connected to the Netezza = DB and the table name is right. The current values are > =09 connection string : jdbc:netezza://10.10.20.14:5480/Test > =09 table owner : admin > =09 table name : MYTEST > 17/12/22 20:36:48 ERROR tool.ExportTool: Encountered IOException running = export job: java.io.IOException: MYTEST is not a valid Netezza table. Plea= se make sure that you have connected to the Netezza DB and the table name i= s right. The current values are > =09 connection string : jdbc:netezza://10.10.20.14:5480/Test > =09 table owner : admin > =09 table name : MYTEST > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)