java - jdbc to hive connection refused -
i trying connect hive via jdbc. below code using: import java.sql.drivermanager; import java.sql.resultset; import java.sql.sqlexception; import java.sql.statement; import java.sql.connection; public class hivetojava { private static string drivername = "org.apache.hadoop.hive.jdbc.hivedriver"; /** * @param args * @throws sqlexception */ public static void main(string[] args) throws sqlexception { try { class.forname(drivername); } catch (classnotfoundexception e) { e.printstacktrace(); system.exit(1); } connection con = drivermanager.getconnection( "jdbc:hive://localhost:10000/default", "", ""); statement stmt = con.createstatement(); string tablename = "processed"; resultset res = stmt.executequery("describe " + tablename); while (res.next()) { system.out.println(...