Questions Guide:
1. What three types of user access does hive provide?
2, when using Hiveserver, you need to start which service first.
3, Hiveserver's Start command is.
4. Hiveserver is the service through which to provide remote JDBC access.
5, how to modify the default boot port of Hiveserver.
6. Which packages are required for the Hive
kylin2.3 version enables JDBC data sources (you can generate hive tables directly from SQL, eliminating the hassle of manually conducting data to hive and building hive tables)DescriptionThe JDBC data source, which is essentially a hive
"
+ res.getString(2));
}
sql = "select count(1) from " + tableName;
System.out.println("Running: " + sql);
res = stmt.executeQuery(sql);
while (res.next()) {
System.out.println(res.getString(1));
}
}
}
As you can see from the code above, the work that needs to be done before querying is:
Through Class.forName ("Org.apache.hive.jdbc.HiveDriver"); To register the
Part I: Building a hive JDBC development environmentBuild:Steps ? New project Hivetest? Import hive-dependent packages? Hive Command line start thrift service? Hive--service Hiveserver Part Two: Introduction of basic Operation ObjectsConnectionDescription: The connection obj
Hive is the base component for data warehousing applications in big Data technology clusters, and is a benchmark for other similar data warehouse applications. The underlying data manipulation can be handled in a scripted manner with hive-client. If you need to develop an application, you need to connect using the JDBC driver
. XML key configuration Can be overridden by setting $HIVE _server2_thrift_port 2), start meta-database Start the metabase first, and at the command line type: Hive--service metastore 3), start the service #hive--service hiveserver2 >/dev/null The above command starts the Hiveserver2 service.
The differences between com. mysql. jdbc. Driver and com. mysql. cj. jdbc. Driver,
Overview: com. mysql. jdbc. Driver is in mysql-connector-java 5, while com. mysql. cj. jdbc.
All the configurations have been completed, and the server under eclipse can run. When the *. War package is output, it cannot run.
Jdbcexceptionreporter cannot load JDBC Driver Class ...... Error
After checking online, we can see that a similar error is successfully solved. The content is as follows:
Standardwrapper. throwableOrg. springframework. JDBC. canno
MySQL loads the JDBC driver and mysql loads the jdbc driver.
First, install the MySQL database. MySQL5.5 is installed. The installation steps are not described here. Please note that if the installation process stops at the start service and cannot continue, please refer to my blog post "when installing MySQL5.5,
During the summer vacation, I made a project using SSH + mysql5.0 + atat5.5.After deployment to the server (Tomcat is 6.0.32), the test runs normally. The next day, I found that I could not log on. I checked the system and found no problems. I restarted Tomcat and recovered to normal again.Very strange, so I checked Tomcat logs and found the following problems:
2011-9-1 0:15:11 org. Apache. Catalina. startup. Catalina startInformation: server startup in 35866 MS2011-9-1 2:05:43 org. Apache. Coyo
Hive with the JDBC ExampleWhen developing a hive program using JDBC, you must first turn on the remote service interface for hive. Under the Hive installation directory, use the following command to open the bin:Hive-service Hives
MySQL loads the JDBC driver and mysql loads the jdbc driver.
First, install the MySQL database. MySQL5.5 is installed. The installation steps are not described here. Please note that if the installation process stops at the start service and cannot continue, please refer to my blog post "when installing MySQL5.5, the
Use of Hiveserver2beeline
Overview
Url:Https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients
Hive is just a client, and in production it is not necessary to deploy the cluster
There are several major classes of hive clients:-Hive-WebUI: Operation of hive tab
[Database Study Notes] (1) JDBC driver category and Study Notes jdbc
There are several methods for jdbc to load database drivers:
Type 4: Local protocol driver Type 1: jdbc-odbc bridge
'/home/centos/customers.txt ' into table t2;//upload to hive table from local file, local is uploading file,Copying tables$mysql >create Table TT as SELECT * from users; Copy tables, carry data and table structure$mysql >create table TT like users; Copy table, carry only table structure, without datahive>create table tt as select * from users;hive>create table tt like users ;
First we need to open the Hiveserver service: Hive--service HiveserverWe then load the driver and then make the connection, then create a statement, then execute the query, and then the result set, as we do with the normal database. The code is as follows (be sure to write to the SQL statement, be careful, the following need to be noted where I have marked out:)Package Playhive;import Java.sql.connection;im
suggest to do some testing more appropriate, Not suitable for product development and application.
2, therefore, the way the JDBC connection is generated, of course, there are other ways of connecting, such as ODBC.
Third, the connection configuration
1. Modify Hive-site.xml
The
2, for the embedded derby requirements in the Hive Lib directory has f
Exception thrown when hive JDBC joins:Exception in thread ' main ' java.sql.SQLException:Could not open client transport with JDBC uri:jdbc:hive2://192.168. 206.128:10000/default:java.net.connectexception:connection Refused:connectAt Org.apache.hive.jdbc.HiveConnection.openTransport (hiveconnection.java:215)At org.apache.hive.jdbc.hiveconnection.At Org.apache.hiv
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.