Several minor problems encountered during hive usage

Source: Internet
Author: User
Tags sqoop
1. Run the show tables; command in hive to report the following error: COM. MySQL. JDBC. Exceptions. jdbc4.mysqlsyntaxerrorexception: specified key was too long; max key length is 767 bytes.

Solution:Run the following command in the hive database of MySQL:alter database hive character set latin1;

Change the hive metadatabase character set to solve the problem! However, if you create a table with Chinese characters, an error will be reported.

2. sqoop cannot import data to hive. The error "Warning:/usr/lib/hbase does not exist" is returned! Hbase imports will fail. Please set $ hbase_home to the root of your hbase installation.

Solution:Remove the configurations of hbase and zookeeper in the configuration file.

InSQOOP_HOME/bin/configure-sqoopRemove hbase and zookeeper from.

3. If an error is reported during sqoop data import, the system prompts that the file already exists. You can look for it in HDFS. /user/${user_name}Directory.

If--create-hive-tableThe file and table must be cleared.

4. the data type must be specified during load. Otherwise, the default bytearray cannot be converted to string 5. the JDBC driver was copied to the lib directory 6. when show tables is run, the log reports metaexception (message: version information not found in MetaStore .)

Sethive.metastore.schema.verificationSet to false

<name>hive.metastore.schema.verification</name>  <value>false</value>

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.