Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Looking driver and URL connection configuration support for hive cloudera hadoop with eclipse

Highlighted

Looking driver and URL connection configuration support for hive cloudera hadoop with eclipse

New Contributor

Looking driver and URL connection configure support for #hive #cloudera hadoop with eclipse Luna &jdk 1.7 using #cloudera VM CDH 5.4.2.0 if anyone is working or have knowledge about cloudera hadoop please leave Ur number in comment box. I have applied many driver and URL connection to connect cloudera hadoop with eclipse but it's unable to retrieve from hive cloudera hadoop. It will be great help for me.see this code.

import java.sql.*;
import java.sql.Driver.*;
import java.sql.DriverManager.*;
import java.sql.DriverPropertyInfo;
import javax.swing.GroupLayout.Alignment;
import javax.sql.DataSource;
import javax.sql.ConnectionPoolDataSource;
import java.awt.Font;
public class frame1 extends javax.swing.JFrame {

    /**
     * Creates new form frame1
     */
    public frame1() {        initComponents();
        Statement stmt;
        try
        {
            Class.forName("org.apache.hadoop.hive.jdbc.HiveDriver");
            Connection con=DriverManager.getConnection("jdbc:hive2://localhost:10000/sclabale", "cloudera", "cloudera");                   stmt = con.createStatement();                   stmt.executeUpdate("truncate table data");                   stmt.executeUpdate("truncate table nadataz3");                   stmt.executeUpdate("truncate table ndata");                   stmt.executeUpdate("truncate table ndata1");                   stmt.executeUpdate("truncate table ndata2");                   stmt.executeUpdate("truncate table ndata3");                   stmt.executeUpdate("truncate table ndata11");                   stmt.executeUpdate("truncate table ndata12");;                   stmt.executeUpdate("truncate table ndata13");                   stmt.executeUpdate("truncate table ndata21");                   stmt.executeUpdate("truncate table ndata22");                   stmt.executeUpdate("truncate table ndata23");                   stmt.executeUpdate("truncate table ndata31");                   stmt.executeUpdate("truncate table ndata32");                   stmt.executeUpdate("truncate table ndata33");                   stmt.executeUpdate("truncate table ndataz1");                   stmt.executeUpdate("truncate table ndataz2");                   stmt.executeUpdate("truncate table sdetails");                   stmt.executeUpdate("truncate table sdetailsr1");
        }catch(Exception ee)
        {
            System.out.println(ee.getMessage());
        }
    }
}