Save spark SQL metadata to MySQL

Source: Internet
Author: User

1: Install configuration MySQL yum install MySQL mysql-server Service mysqld Startmysqladmin-u root password newpassword mysql-u root-plog in to MySQLmysql>grant All privileges on * * to ' root ' @ '% ' with GRANT OPTIONMyslq>flush Privileges2: Configure Hive-site.xmlDownload a hive installation package, compress and copy the Conf directory under Hive-default.xml.template to spark_home/conf, and rename it to Hive-site.xmlModify 4 Important attributes:1:javax.jdo.option.connectionurljdbc:mysql://192.168.1.93:3306/sparkmetadata? createdatabaseifnotexist=true&characterencoding= UTF-82:javax.jdo.option.connectiondrivernameCom.mysql.jdbc.Driver3:javax.jdo.option.connectionusernameRoot4:javax.jdo.option.connectionpasswordXXXthen modify all the time attributes in the Hive-site.xml, the units of all the attributes are S (s), delete s and then add 3 0, all the properties of the unit for MS Delete Ms,spark cannot recognize these units, but instead they are all treated as numbers. 3: Start Spark-sqlCreate a table under Spark-sql's shell to see the table inMySQL database:sparkmetadata : TBLs contains the record, if any, OK.



From for notes (Wiz)



Save spark SQL metadata to MySQL

Related Article

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.