当前位置:网站首页>Data warehouse 4.0 notes - business data collection
Data warehouse 4.0 notes - business data collection
2022-07-23 11:41:00 【Silky】
1 Introduction to e-commerce business
SKU = Stock Keeping Unit( The basic unit of inventory ). Now it has been extended to the abbreviation of product unified number , Each product has a unique SKU Number .
SPU(Standard Product Unit): yes The smallest unit of commodity information aggregation , It's a group. Reusable 、 Easy to retrieve A standardized set of information .
for example :iPhoneX Cell phones are SPU. A silver one 、128G In memory 、 Support for Unicom Network iPhoneX, Namely SKU.
2 Business data acquisition module
Core operations : take MySQL The business data on is synchronized to HDFS above ( Batch synchronization and real-time synchronization )

MySQL install
Install the package and JDBC The driver is uploaded to /opt/software, total 6 individual
[[email protected] ~]$ cd /opt/software/

Too many compressed packages , Sort it out :
[[email protected] software]$ mkdir flume
[[email protected] software]$ mkdir zookeeper
[[email protected] software]$ mkdir java
[[email protected] software]$ mkdir kafka
[[email protected] software]$ mkdir mysql
[[email protected] software]$ mkdir hadoop
[[email protected] software]$ ll

[[email protected] software]$ mv apache-flume-1.9.0-bin.tar.gz flume/
[[email protected] software]$ mv apache-zookeeper-3.5.7-bin.tar.gz zookeeper/
[[email protected] software]$ mv hadoop-3.1.3.tar.gz hadoop
[[email protected] software]$ mv jdk-8u212-linux-x64.tar.gz java/
[[email protected] software]$ mv kafka_2.11-2.4.1.tgz kafka
[[email protected] software]$ ll

Delete all the unwanted documents

Get into MySQL, Upload MySQL Installation package required
[[email protected] software]$ cd mysql/

Unload the Mysql-libs( If you've installed it before MySQL, I want to unload them all )
[[email protected] mysql]$ rpm -qa | grep -i -E mysql\|mariadb | xargs -n1 sudo rpm -e --nodeps
[[email protected] mysql]$ rpm -qa | grep -i -E mysql\|mariadb

If it is an alicloud server, follow the steps below
explain : Because Alibaba cloud server is installed with Linux Minimum system version , There are no following tools , So you need to install .
(1) uninstall MySQL rely on , Although the machine is not equipped with MySQL, But this step is indispensable
[[email protected] software]# sudo yum remove mysql-libs
(2) Download dependencies and install
[[email protected] software]# sudo yum install libaio
[[email protected] software]# sudo yum -y install autoconf
k Start installation :
[[email protected] mysql]$ rpm -qa | grep -i -E mysql\|mariadb | xargs -n1 sudo rpm -e --nodeps
[[email protected] mysql]$ sudo rpm -ivh 02_mysql-community-libs-5.7.16-1.el7.x86_64.rpm
[[email protected] mysql]$ sudo rpm -ivh 03_mysql-community-libs-compat-5.7.16-1.el7.x86_64.rpm
[[email protected] mysql]$ sudo rpm -ivh 04_mysql-community-client-5.7.16-1.el7.x86_64.rp
[[email protected] mysql]$ sudo rpm -ivh 05_mysql-community-server-5.7.16-1.el7.x86_64.rpm

start-up MySQL
[[email protected] software]$ sudo systemctl start mysqld
Check the status [[email protected] mysql]$ sudo systemctl status mysqld

see MySQL password
[[email protected] software]$ sudo cat /var/log/mysqld.log | grep password
Enter with the password you just found MySQL( If you make a mistake , Put single quotation marks on the password )

[[email protected] mysql]$ mysql -uroot -p'f&8U;US.yhP#'

Set complex password ( because MySQL Password policy , This password must be complex enough )
mysql> set password=password("Qs23=zs32");
change MySQL Password policy
mysql> set global validate_password_length=4;
mysql> set global validate_password_policy=0;
Set a simple and easy to remember password
mysql> set password=password("000000");
Configure remote login : Get into MySQL library
mysql> use mysql
Inquire about user surface
mysql> select user, host from user;
modify user surface , hold Host The content of the table is changed to %
mysql> update user set host="%" where user="root";
Refresh
mysql> flush privileges;
sign out
mysql> quit;

Business data generation
Connect MySQL
Use one MySQL The client generates a database (Navicat for MySQL)


Test the connection first , Successful connection , To determine the .( My host uses hadoop102, The connection fails , Switch to IP The address is successfully connected , I don't know which link went wrong , Always use IP)



Start execution


Generating business data
stay hadoop102 Of /opt/module/ Create under directory db_log Folder
[[email protected] module]$ mkdir db_log/



[[email protected] db_log]$ vim application.properties

[[email protected] db_log]$ java -jar gmall2020-mock-db-2021-01-22.jar

Write data complete .
see gmall database , To see if there is 2020-06-14 There's a lot of data coming up

Generated 2020-06-14 The content of , If you want to reproduce the data of other days , Go straight in application.properties Modification time , also 1 Set as 0.
边栏推荐
- 如何自定义Jsp标签
- Points for attention when using El table to lazy load tree tables
- 数字藏品系统开发/数字藏品方案介绍
- The object in $attrs doesn't change, but it triggers watch listening?
- flex+js实现内部盒子高度跟随其中最大的高度
- Last child does not take effect
- Customized development of ant chain NFT digital collection DAPP mall system
- phxpaxos安装编译流程
- 使用el-table懒加载树形表格时的注意点
- NFT数字藏品平台开发搭建,源码开发数字藏品
猜你喜欢

Clear the buffer with getchar (strongly recommended, C language is error prone, typical)

Compilation principle - detailed explanation of syntax analysis

NFT digital collection development /dapp development

Niuke question brushing record -- MySQL

The problem that GBK codec cannot decode may be caused by the file name

文件上传漏洞常见绕过方式

mysql免密登录设置

NFT数字藏品系统开发:徐悲鸿美术馆通过数字藏品平台亮相

NFT数字藏品系统开发:深圳晚报《美好时光遨游记》数字藏品上线秒磬

Phxpaxos installation and compilation process
随机推荐
Analysis of two-part search method or half search method of C language (classic example, classic analysis)
第一个FLINK程序之WordCount
NFT digital collection system development: Shenzhen Evening News "good times travel" digital collection online seconds chime
如何自定义Jsp标签
DC-1靶场初探
Man in the middle attacks ARP Spoofing and its linkage with beef XSS
Sqli lab 1-16 notes with customs clearance
Compilation principle - detailed explanation of syntax analysis
Two sorting and one random data fetching of stored procedures
ETH转账次数达到一个月高点
Using dynamic programming to solve the longest growing subsequence problem
Preliminary study on DC-1 shooting range
Goodbye if else
简单实现矩形面积块
Development of digital collection system / introduction of digital collection scheme
渗透测试基础
composer的一些操作
中间人攻击arp欺骗及与beef-xss联动
文件上传漏洞常见绕过方式
数仓4.0笔记——数仓建模