In the hadoop cluster environment, use sqoop to import the data generated by hive into the mysql database. The exception Causedby: java. SQL. SQLException: null, messagefromserver: success; unblockwithmysqladmin
In the hadoop cluster environment, sqoop is used to import the
transferred from: http://blog.csdn.net/lifuxiangcaohui/article/details/40588929Hive is based on the Hadoop distributed File system, and its data is stored in a Hadoop Distributed file system. Hive itself does not have a specific data storage format and does not index the data, only the column separators and row separators in the hive data are told when the table is created, and
Training Big Data architecture development, mining and analysis!from zero-based to advanced, one-to-one technical training! Full Technical guidance! [Technical qq:2937765541] https://item.taobao.com/item.htm?id=535950178794-------------------------------------------------------------------------------------Java Internet Architect Training!https://item.taobao.com/item.htm?id=536055176638Big Data Architecture Development Mining Analytics Hadoop HBase Hive
[Author]: KwuSqoop importing the relational library to update the federated primary key, import the data from hive into the relational library, if the Relational library table has a federated primary key, and you need to update the original data with the newly imported data.1. Create a relational library tableCREATE TABLEtest123 (id INT not null,name VARCHAR (+) not null,age int,primary KEY (ID, name)) Engi
found that the sequence of my tutorials was messy. I didn't introduce the installation of Hive first. I am sorry for this. I will make it up later.Data Preparation mysql creates a table "employee" in mysql and inserts data.
CREATE TABLE `employee` ( `id` int(11) NOT NULL, `name` varchar(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into employee (id,name) values (1,'michael'); insert into employe
--connect jdbc:mysql://10.0.0.108:3306/student--username root--password root--table stu_info-- Target-dir/student--num-mappers 1--fields-terminated-by ' \ t '
Third, use Sqoop to import this table in MySQL into hive Way one, 1.
Creating databases and tables in hive CREATE database if not exists student;
CREATE tab
Live is a good database management tool. The following describes how to import mysql Data into hive. For more information, see.
The following is an instance that imports data from mysql into hive.
-Hive-import indicates importing data to
The following is an instance of importing data from MySQL into hive.
–hive-import indicates that the import to hive,–create-hive-table represents the creation of hive tables. –
Sqoop use Hsql to store job information, open Metastor service to share job information, Sqoop on all node can run the same job
One, sqoop configuration file in Sqoop.site.xml:
1, Sqoop.metastore.server.location
Local storage path, default under TMP, change to other path
2, Sqoop.metastore.server.port
Metastore Service port number
3, Sqoop.metastore.client.autoco
‘org.apache.hadoop.hive.hbase.HBaseStorageHandler‘WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val")TBLPROPERTIES ("hbase.table.name" = "hbase_hive_table_kv");Key and: key correspond to value and Val. hbase_hive_table_kv indicates hbase table name hive_hbase_table_kv indicates hive table name.
Create a hive table and import data
CREATE TABLE kv (key
The current use of Sqoop is to import data from Oracle into HBase.sqoop Import--connect jdbc:oracle:thin:@192.168.193.37:1521:hispacedb --username hwmarket --password hwmarket37--m 1--query "Select G.imei,g.id as Sign, to_char (g.logindate, ' Yyyy-mm-dd hh24:mi:ss ') as CR Tdate,g.buildnumber,g.modelnumber,g.firmwarever as Firmware,g.hispacenumber,g.cno,to_ch
Tags: des style blog http color java using OSThe following error occurred during the use of the Command Guide dataSqoop Import--hive-import--connect jdbc:oracle:thin:@192.168.29.16:1521/testdb--username NAME-- Passord PASS--verbose-m 1--table t_userinfo Error 1: File does not Exist:hdfs://opt/sqoop-1.4.4/lib/commons-
Label:# #以上完成后在h3机器上配置sqoop -1.4.4.bin__hadoop-2.0.4-alpha.tar.gzImporting the data from the users table in the MySQL test library on the host computer into HDFs, the default Sqoop 4 map runs mapreduce for import into HDFs, stored in the HDFs path to/user/root/users (User: Default Users, Root:mysql database user, test: Table name) directory with four output files
Simply write the steps to sqoop the order table into the HBase table.The following table:1. Open HBase through the hbase shell.2. Create an HBase tableCreate ' So ','o'3. Import the data of so table into HBase.Opt file:--connect: Database--username: Database user name--password: Database Password--table: Tables that need to be sqoop--columns: Columns in a tableT
Tags: export exp single quote BSP import local condition target connectorData Sheet First class: Data in the database is imported into HDFs #数据库驱动jar包用mysql-connector-java-5.1. to-bin, otherwise there may be an error!./sqoop Import--connect Jdbc:mysql://localhost:3306/erpdb--username root--password 123456--table tbl_dep--columns ' uuid, name, Tele ': Output: par
Org.apache.hadoop.mapred.maptask$newtrackingrecordreader.nextkeyvalue (Maptask.java:556) at Org.apache.hadoop.mapreduce.task.MapContextImpl.nextKeyValue (Mapcontextimpl.java: the) at Org.apache.hadoop.mapreduce.lib.map.wrappedmapper$context.nextkeyvalue (Wrappedmapper.java: the) at Org.apache.hadoop.mapreduce.Mapper.run (Mapper.java:145) at Org.apache.sqoop.mapreduce.AutoProgressMapper.run (Autoprogressmapper.java: -) at Org.apache.hadoop.mapred.MapTask.runNewMapper (Maptask.java:787) at Org.ap
Tags: blog using os file data io ar line1. mysql--Create a databaseCreate database logs;--UsingUse logs;--Create a tableCREATE TABLE Weblogs (MD5 varchar (32),URL varchar (64),Request_date date,Request_time time,IP varchar (15));--loading data from an external text fileLoad data infile '/path/weblogs_entries.txt ' into table weblogs fields terminated by ' \ t ' lines terminated by ' \ r \ n ';--QuerySELECT * from Weblogs;--Export MySQL data to HDFs Sqoop
Tags: style http io os ar for Data SP codeRecently in doing Binlog log capture synchronization to the data platform. The initial need for Sqoop to initialize data from the Library data table into HBase, the entire process needs to be automated to minimize human intervention. However, for historical reasons, there are two types of database (tables) in the character set format on the line, and the data imported into hbase needs to be stored uniformly in
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.