Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-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 E57CE10B1D for ; Mon, 5 Aug 2013 18:30:50 +0000 (UTC) Received: (qmail 52649 invoked by uid 500); 5 Aug 2013 18:30:50 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 52602 invoked by uid 500); 5 Aug 2013 18:30:50 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 52569 invoked by uid 500); 5 Aug 2013 18:30:50 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 52558 invoked by uid 99); 5 Aug 2013 18:30:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Aug 2013 18:30:49 +0000 Date: Mon, 5 Aug 2013 18:30:49 +0000 (UTC) From: "Thejas M Nair (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-4573) Support alternate table types for HiveServer2 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/HIVE-4573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13729763#comment-13729763 ] Thejas M Nair commented on HIVE-4573: ------------------------------------- bq. Although it seems that eventually (.13?) you would want the default to be CLASSIC If we don't set the default to CLASSIC sooner, it would never happen. As time goes by, more applications would start relying this behavior. As [~the6campbells] points out, the CLASSIC behavior is documented to be the 'normal' behavior. While we should aim for backward compatibility, I am not sure if that applies to bugs as well. The managed vs external table information can certainly be very useful. It would be good to get that without changing the server configuration. Should we rely on something like 'describe table extended' for that ? While I don't agree on the default, I don't think perfect should get in way of good. This improves things by making the classic behavior possible. We can discuss the default in a separate jira. +1 for the patch. > Support alternate table types for HiveServer2 > --------------------------------------------- > > Key: HIVE-4573 > URL: https://issues.apache.org/jira/browse/HIVE-4573 > Project: Hive > Issue Type: Bug > Components: HiveServer2, JDBC > Affects Versions: 0.10.0 > Reporter: Johndee Burks > Assignee: Prasad Mujumdar > Priority: Minor > Attachments: HIVE-4573.1.patch, HIVE-4573.2.patch > > > The getTables jdbc function no longer returns information when using normal JDBC table types like TABLE or VIEW. You must now use a more specific type such as MANAGED_TABLE or VIRTUAL_VIEW. An example application that will fail to return results against 0.10 is below, works without issue in 0.9. In my 0.10 test I used HS2. > {code} > import java.sql.SQLException; > import java.sql.Connection; > import java.sql.ResultSet; > import java.sql.Statement; > import java.sql.DriverManager; > import org.apache.hive.jdbc.HiveDriver; > import java.sql.DatabaseMetaData; > public class TestGet { > private static String driverName = "org.apache.hive.jdbc.HiveDriver"; > /** > * @param args > * @throws SQLException > */ > public static void main(String[] args) throws SQLException { > try { > Class.forName(driverName); > } catch (ClassNotFoundException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > System.exit(1); > } > Connection con = DriverManager.getConnection("jdbc:hive2://hostname:10000/default"); > DatabaseMetaData dbmd = con.getMetaData(); > String[] types = {"TABLE"}; > ResultSet rs = dbmd.getTables(null, null, "%", types); > while (rs.next()) { > System.out.println(rs.getString("TABLE_NAME")); > } > } > } > } > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira