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 ====================");

    }

    }

  • 相关阅读:
    观察者模式学习--使用jdk的工具类简单实现
    观察者模式的初始学习--自己实现
    反射 reflect 初始学习
    eclipse java 空心J文件的回复
    linux 命令 more
    spring 3 的 @value的使用
    linux rm 命令
    linux log find 查询
    Resource is out of sync with the file system
    JavaScript(七)数组
  • 原文地址:https://www.cnblogs.com/liusongls/p/6739301.html
Copyright © 2011-2022 走看看