Slow startup of hive CLI

Source: Internet
Author: User

Why hive-0.13.1 is slow to start

The discovery time is mainly consumed in the following three places:

1. When hadoopjar is used, upload the relevant jar package to HDFS (which consumes about 5 s and is similar to hive0.11, which is not well optimized)

2. When hive CLI is started and hivemetastore is initialized, the following three methods are called during init to create default dB, role, and Admin.

Code:

Synchronized (hmshandler. Class ){

Createdefaultdb ();

Createdefaultroles ();

Addadminusers ();

} Synchronized (hmshandler. Class ){

Createdefaultdb ();

Createdefaultroles ();

Addadminusers ();

}

The generate environment is available and does not need to be created every time. You can comment it out directly here.

3. Another 5 S is caused by loading the. hiverc file.

When performing analyze of the create function, metadata is operated through the addentities method of the functionsemanticanalyzer class. This method is not available in hive0.11.

 

This method is related to the function permission, which is not required currently.

Add writeentities to the semantic analyzer to restrict function creation to priviligedusers.

 

In the test environment, no impact is found after you directly comment out.

The specific implementation is analyzed later.

 

Solution:

14/09/0116:06:12 info configuration. deprecation: mapred. Reduce. tasks is deprecated. Instead, use mapreduce. Job. CES

14/09/0116:06:12 info configuration. deprecation: mapred. Min. Split. size is deprecated. Instead, use mapreduce. Input. fileinputformat. Split. minsize

14/09/0116:06:12 info configuration. deprecation: mapred.performance.tasks.speculative.exe cution is deprecated. Instead, usemapreduce. Reduce. Speculative

14/09/0116:06:12 info configuration. deprecation: mapred. Min. Split. Size. Per. node isdeprecated. Instead, use mapreduce. Input. fileinputformat. Split. minsize. Per. Node

14/09/0116:06:12 info configuration. deprecation: mapred. Input. dir. Recursive isdeprecated. Instead, use mapreduce. Input. fileinputformat. Input. dir. Recursive

14/09/0116:06:12 info configuration. deprecation: mapred. Min. Split. Size. Per. Rack isdeprecated. Instead, use mapreduce. Input. fileinputformat. Split. minsize. Per. Rack

14/09/0116:06:12 info configuration. deprecation: mapred. Max. Split. size is deprecated. Instead, use mapreduce. Input. fileinputformat. Split. maxsize

14/09/0116:06:12 info configuration. deprecation: mapred. Committer. Job. setup. Cleanup. needed is deprecated. Instead, usemapreduce. Job. Committer. setup. Cleanup. Needed

 

Logginginitialized using configuration infile:/usr/local/hive-0.13.0/CONF/hive-log4j.properties

Hive>

The preceding startup information is:

MySQL initialization information,

You need to set MySQL service to start automatically

Slow startup of hive CLI

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.