zoukankan      html  css  js  c++  java
  • JDBC连接LDAP认证Inceptor

    import java.sql.Connection;

    import java.sql.DriverManager;

    import java.sql.SQLException;

    import java.sql.Statement;

     

    public class HiveJdbc {

    private static String driverName = "org.apache.hive.jdbc.HiveDriver";

     

    public static void main(String[] args) throws SQLException {

    try {

    Class.forName(driverName);

    } catch (ClassNotFoundException e) {

    e.printStackTrace();

    System.exit(1);

    }

     

    System.out.println("==================== Start call inceptor procedure ====================");

    // Hive2 JDBC URL with LDAP

    String jdbcURL = "jdbc:hive2://ip:10000/default";

     

    Connection conn = DriverManager.getConnection(jdbcURL,"username","password");

    Statement stmt = conn.createStatement();

    // 调用存储过程

    stmt.execute("call transdata('20160630')");

    stmt.close();

    conn.close();

    System.out.println("==================== End  call  inceptor procedure ====================");

    }

    }

  • 相关阅读:
    Final TFS 2008 Feature List
    来看看微软对测试是什么要求
    淘宝设计流程
    Disable try catch
    jQuery validate API
    iPhone手机开发平台入门介绍和教程
    VSSpeedster Speed up your VS 2010
    Where are the SDK tools? Where is ildasm?
    效率高的删除语句truncate table [tablename]
    修改Hosts去除各站广告
  • 原文地址:https://www.cnblogs.com/liusongls/p/6739301.html
Copyright © 2011-2022 走看看