The Sqoop version for the 1.4.4,hadoop version for the 2.2.0,hive version for the 0.11.0,hive metadata is stored in MySQL, and when you use Sqoop to import data from MySQL to hive, you are always prompted not to find the hive database that you specified. In fact, the database already exists in hive, the hive path is also set in the Sqoop, and the hive path is already set in the/etc/profile file.
MySQL leads the data command to hive:
1 ${sqoop_home}/bin/sqoop Import--connect Jdbc:mysql://${hostname}/${database}--username ${user}-- Password ${password} --table ${table} --split-by docid--hive-import--hive-table lan.ding2 '\ t' --incremental append --check-column docid--last -value ${curr_max}
Workaround: Copy the Hive-site.xml file in the hive into the Sqoop conf directory. When Hive-site.xml is not found in the Conf directory of Sqoop, the Sqoop default is to read the Deby built-in database.
PS: In fact, has been specified in the Sqoop hive conf directory, but it is necessary to copy files come over, there is a clear exchange, the exception, but also pay attention to the file permissions issues.