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

    }

    }

  • 相关阅读:
    RTT设备与驱动之串口
    RTT设备与驱动之PIN设备
    RTT之ENV
    MQTT学习之一
    思维导图软件
    英语单词学习方法
    RTT之POSIX
    10 个强大的JavaScript / jQuery 模板引擎推荐
    30个实用的jQuery选项卡/导航教程推荐
    jquery 自动完成 Autocomplete插件汇总
  • 原文地址:https://www.cnblogs.com/liusongls/p/6739301.html
Copyright © 2011-2022 走看看