使用jenkins连接hadoop(hive)调度testng testcase

xcitsw88  于 2021-06-01  发布在  Hadoop
关注(0)|答案(0)|浏览(242)

我试图计划一个testng测试用例,使用本地jenkings建立到hive的连接。但由于某些原因,这是失败的,在输出控制台中没有错误,但我能够建立到oracle teradata和hana的连接。类似地,当我通过eclipse运行testng testcase时,它也在工作,唯一的问题是试图通过jenkins连接它。

[Output of the following code snippet][1]
[1]: https://i.stack.imgur.com/wZKvQ.jpg

public class hiveconntester {
    private static String hivedriverName = "org.apache.hive.jdbc.HiveDriver";
  @Test
  public void f() throws ClassNotFoundException, SQLException {

      ResultSet hiveres=null;

          System.out.println("Fetching Hive Data");
          Class.forName(hivedriverName);

          /***********Hive***************/

          Connection con = DriverManager.getConnection("server", "username", "password");
          System.out.println("*******Returning hive***********"); 
        Statement hivestmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

    System.out.println("*******Returning hive resultset***********"); 
  }
}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题