主頁 > 資料庫 > 用戶畫像大資料環境搭建——從零開始搭建實時用戶畫像(四)

用戶畫像大資料環境搭建——從零開始搭建實時用戶畫像(四)

2020-09-11 06:04:51 資料庫

?

本章我們開始正式搭建大資料環境,目標是構建一個穩定的可以運維監控的大資料環境,我們將采用Ambari搭建底層的Hadoop環境,使用原生的方式搭建Flink,Druid,Superset等實時計算環境,使用大資料構建工具與原生安裝相結合的方式,共同完成大資料環境的安裝,

Ambari搭建底層大資料環境

Apache Ambari是一種基于Web的工具,支持Apache Hadoop集群的供應、管理和監控,Ambari已支持大多數Hadoop組件,包括HDFS、MapReduce、Hive、Pig、 Hbase、Zookeeper、Sqoop和Hcatalog等,

Apache Ambari 支持HDFS、MapReduce、Hive、Pig、Hbase、Zookeepr、Sqoop和Hcatalog等的集中管理,也是頂級的hadoop管理工具之一,

目前Ambari的版本已經更新到2.7,支持的組件也越來越豐富,

Hadoop的發行版本有很多,有華為發行版,Intel發行版,Cloudera發行版(CDH),MapR版本,以及HortonWorks版本等,所有發行版都是基于Apache Hadoop衍生出來的,產生這些版本的原因,是由于Apache Hadoop的開源協議決定的:任何人可以對其進行修改,并作為開源或商業產品發布和銷售,

收費版本:
收費版本一般都會由新的特性,國內絕大多數公司發行的版本都是收費的,例如Intel發行版本,華為發行版本等,

免費版本:
不收費的版本主要有三個(都是國外廠商),
Cloudera版本(Cloudera’s Distribution Including Apache Hadoop)簡稱”CDH“,
Apache基金會hadoop
Hontonworks版本(Hortonworks Data Platform)簡稱“HDP”,
按照順序代表了國內的使用率,CDH和HDP雖然是收費版本,但是他們是開源的,只是收取服務費用,嚴格上講不屬于收費版本,

Ambari基于HDP安裝,但是他們不同版本之間有不同的對應關系,

Ambari2.7與HDP HDF的對應關系:

也就是支持最新的版本為HDP 3.1.5 而HDP包含了大資料的基本組件如下:

已經非常的豐富了,下面我們開始Ambari的安裝,

前期準備

前期準備分為四部分

主機,資料庫,瀏覽器,JDK

主機

請先準備好安裝Ambari的主機,開發環境可以三臺就ok,其他環境依據公司機器規模而確定,

假設開發環境的三臺機器為:

192.168.12.101 master
192.168.12.102 slave1
192.168.12.103 slave2

主機的最低要求如下:

軟體要求

在每個主機上:

  • yumrpm(RHEL / CentOS / Oracle / Amazon Linux)
  • zypperphp_curl(SLES)
  • apt (Debian / Ubuntu)
  • scp, curl, unzip, tarwgetgcc*
  • OpenSSL(v1.01,內部版本16或更高版本)
  • Python(帶python-devel *)

Ambari主機應至少具有1 GB RAM,并具有500 MB可用空間,

要檢查任何主機上的可用記憶體,請運行:

free -m

本地倉庫

如果網速不夠快,我們可以將包下載下來,建立本地倉庫,網速夠快可以忽略這步,

先下載安裝包

安裝httpd服務

yum install yum-utils createrepo
[root@master ~]# yum -y install httpd
[root@master ~]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
[root@master ~]# chkconfig httpd on

隨后建立一個本地yum源

mkdir -p /var/www/html/

將剛剛下載的包解壓到這個目錄下,

隨后通過瀏覽器 訪問 成功

createrepo  ./
制作本地源  修改檔案里邊的源地址
vi  ambari.repo
vi hdp.repo


#VERSION_NUMBER=2.7.5.0-72
[ambari-2.7.5.0]
#json.url = http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json
name=ambari Version - ambari-2.7.5.0
baseurl=https://username:[email protected]/p/ambari/centos7/2.x/updates/2.7.5.0
gpgcheck=1
gpgkey=https://username:[email protected]/p/ambari/centos7/2.x/updates/2.7.5.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1

[root@master ambari]# yum clean all
[root@master ambari]# yum makecache
[root@master ambari]# yum repolist

軟體準備

為了方便以后的管理,我們要對機器做一些配置

安裝JDK
下載地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

rpm -ivh jdk-8u161-linux-x64.rpm
java -version
通過vi /etc/hostname 進行修改機器名  這里主要是為了可以實作通過名稱來查找相應的服務器

  各個節點修改成相應的名稱,分別為master,slave1.slave2
  vi /etc/hosts
192.168.12.101 master
192.168.12.102 slave1
192.168.12.103 slave2

 vi /etc/sysconfig/network
 NETWORKING=yes
HOSTNAME=master(其他的節點也對應修改)
關閉防火墻
[root@master~]#systemctl disable firewalld
[root@master~]#systemctl stop firewalld
ssh免密
ssh-keygen

ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host

不同的環境會有不同的問題存在,大家可以參考官網手冊進行相應的安裝,

安裝ambari-server

ambariserver將最終帶我們完成大資料集群的安裝

yum install ambari-server

Installing : postgresql-libs-9.2.18-1.el7.x86_64         1/4
Installing : postgresql-9.2.18-1.el7.x86_64              2/4
Installing : postgresql-server-9.2.18-1.el7.x86_64       3/4
Installing : ambari-server-2.7.5.0-124.x86_64           4/4
Verifying  : ambari-server-2.7.5.0-124.x86_64           1/4
Verifying  : postgresql-9.2.18-1.el7.x86_64              2/4
Verifying  : postgresql-server-9.2.18-1.el7.x86_64       3/4
Verifying  : postgresql-libs-9.2.18-1.el7.x86_64         4/4

Installed:
  ambari-server.x86_64 0:2.7.5.0-72
Dependency Installed:
 postgresql.x86_64 0:9.2.18-1.el7
 postgresql-libs.x86_64 0:9.2.18-1.el7
 postgresql-server.x86_64 0:9.2.18-1.el7
Complete!

啟動與設定

設定

ambari-server setup

不推薦直接用內嵌的postgresql,因為其他服務還要用mysql

安裝配置 MySql

yum install -y wget

wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm

rpm -ivh mysql57-community-release-el7-10.noarch.rpm

yum -y install mysql-community-server

systemctl enable mysqld

systemctl start mysqld.service

systemctl status mysqld.service

grep "password" /var/log/mysqld.log

mysql -uroot -p

set global validate_password_policy=0;

set global validate_password_length=1;

set global validate_password_special_char_count=0;

set global validate_password_mixed_case_count=0;

set global validate_password_number_count=0;

select @@validate_password_number_count,@@validate_password_mixed_case_count,@@validate_password_number_count,@@validate_password_length;

 

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';

grant all privileges on . to 'root'@'%' identified by 'password' with grant option;

flush privileges;

exit
yum -y remove mysql57-community-release-el7-10.noarch

下載mysql驅動,放到三臺的

/opt/ambari/mysql-connector-java-5.1.48.jar


初始化資料庫

mysql -uroot -p
create database ambari;
 
use ambari
 
source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
 
 
 
CREATE USER 'ambari'@'localhost' IDENTIFIED BY 'bigdata';
 
CREATE USER 'ambari'@'%' IDENTIFIED BY 'bigdata';
 
GRANT ALL PRIVILEGES ON ambari.* TO 'ambari'@'localhost';
 
GRANT ALL PRIVILEGES ON ambari.* TO 'ambari'@'%';
 
FLUSH PRIVILEGES;

完成ambari的配置

[root@localhost download]# ambari-server setup
Using python  /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'enabled'
SELinux mode is 'permissive'
WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
OK to continue [y/n] (y)? y
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Custom JDK
==============================================================================
Enter choice (1): 2
WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.
WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.
Path to JAVA_HOME: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64/jre
Validating JDK on Ambari Server...done.
Check JDK version for Ambari Server...
JDK version found: 8
Minimum JDK version is 8 for Ambari. Skipping to setup different JDK for Ambari Server.
Checking GPL software agreement...
GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
Enable Ambari Server to download and install GPL Licensed LZO packages [y/n] (n)? y
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? y
Configuring database...
==============================================================================
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL / MariaDB
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
[7] - BDB
==============================================================================
Enter choice (1): 3
Hostname (localhost): 
Port (3306): 
Database name (ambari): 
Username (ambari): 
Enter Database Password (bigdata): 
Configuring ambari database...
Enter full path to custom jdbc driver: /opt/ambari/mysql-connector-java-5.1.48.jar
Copying /opt/ambari/mysql-connector-java-5.1.48.jar to /usr/share/java
Configuring remote database connection properties...
WARNING: Before starting Ambari Server, you must run the following DDL directly from the database shell to create the schema: /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
Proceed with configuring remote database connection properties [y/n] (y)? y
Extracting system views...
.....
Ambari repo file contains latest json url http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json, updating stacks repoinfos with it...
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.

隨后就可以啟動了

ambari-server start

ambari-server status

ambari-server stop

訪問如下地址

http://<your.ambari.server>:8080

集群安裝

接下來進行集群的安裝,包括命名,ssh免密,選擇版本,規劃集群

最終完成集群安裝,我們就可以在頁面管理我們的集群了,

詳細官網安裝檔案pdf請在關注“實時流式計算” 后臺回復ambari

實時計算環境搭建

由于ambari支持的druid版本較低,目前暫不支持flink,所以除kafka外的實時計算組件,需要手動安裝,也方便以后的升級,

集群安裝

集群安裝分為以下幾步:

1、在每臺機器上復制解壓出來的flink目錄,

2、選擇一個作為master節點,然后修改所有機器conf/flink-conf.yaml

jobmanager.rpc.address = master主機名

3、修改conf/slaves,將所有work節點寫入

work01
work02

4、在master上啟動集群

bin/start-cluster.sh

安裝在Hadoop

我們可以選擇讓Flink運行在Yarn集群上,

下載Flink for Hadoop的包

保證 HADOOP_HOME已經正確設定即可

啟動 bin/yarn-session.sh

運行flink示例程式

批處理示例:

提交flink的批處理examples程式:

bin/flink run examples/batch/WordCount.jar

這是flink提供的examples下的批處理例子程式,統計單詞個數,

$ bin/flink run examples/batch/WordCount.jar
Starting execution of program
Executing WordCount example with default input data set.
Use --input to specify file input.
Printing result to stdout. Use --output to specify output path.
(a,5)
(action,1)
(after,1)
(against,1)
(all,2)
(and,12)
(arms,1)
(arrows,1)
(awry,1)
(ay,1)

Druid集群部署

部署建議

集群部署采用的分配如下:

  • 主節點部署 Coordinator 和 Overlord行程
  • 兩個資料節點運行 Historical 和 MiddleManager行程
  • 一個查詢節點 部署Broker 和 Router行程

未來我們可以添加更多的主節點和查詢節點

主節點建議 8vCPU 32GB記憶體

組態檔位于

conf/druid/cluster/master

資料節點建議

16 vCPU 122GB記憶體 2 * 1.9TB SSD

組態檔位于

conf/druid/cluster/data

查詢服務器 建議 8vCPU 32GB記憶體

組態檔位于

conf/druid/cluster/query

開始部署

下載最新0.17.0發行版

解壓

tar -xzf apache-druid-0.17.0-bin.tar.gz
cd apache-druid-0.17.0

集群模式的主要組態檔都位于:

conf/druid/cluster

配置元資料存盤

conf/druid/cluster/_common/common.runtime.properties

替換

druid.metadata.storage.connector.connectURI
druid.metadata.storage.connector.host

例如配置mysql為元資料存盤

在mysql中配置好訪問權限:

-- create a druid database, make sure to use utf8mb4 as encoding
CREATE DATABASE druid DEFAULT CHARACTER SET utf8mb4;

-- create a druid user
CREATE USER 'druid'@'localhost' IDENTIFIED BY 'druid';

-- grant the user all the permissions on the database we just created
GRANT ALL PRIVILEGES ON druid.* TO 'druid'@'localhost';

在druid中配置

druid.extensions.loadList=["mysql-metadata-storage"]
druid.metadata.storage.type=mysql
druid.metadata.storage.connector.connectURI=jdbc:mysql://<host>/druid
druid.metadata.storage.connector.user=druid
druid.metadata.storage.connector.password=diurd

配置深度存盤

將資料存盤配置為S3或者HDFS

比如配置HDFS,修改

conf/druid/cluster/_common/common.runtime.properties
druid.extensions.loadList=["druid-hdfs-storage"]

#druid.storage.type=local
#druid.storage.storageDirectory=var/druid/segments

druid.storage.type=hdfs
druid.storage.storageDirectory=/druid/segments

#druid.indexer.logs.type=file
#druid.indexer.logs.directory=var/druid/indexing-logs

druid.indexer.logs.type=hdfs
druid.indexer.logs.directory=/druid/indexing-logs

將Hadoop配置XML(core-site.xml,hdfs-site.xml,yarn-site.xml,mapred-site.xml)放在Druid中

conf/druid/cluster/_common/

配置zookeeper連接

還是修改

conf/druid/cluster/_common/

下的

druid.zk.service.host

為zk服務器地址就可以了

啟動集群

啟動前注意打開埠限制

主節點:

derby 1527

zk 2181

Coordinator 8081

Overlord 8090

資料節點:

Historical 8083

Middle Manager 8091, 8100–8199

查詢節點:

Broker 8082

Router 8088

記得將剛才配好的druid復制到各個節點

啟動主節點

由于我們使用外部zk 所以使用no-zk啟動

bin/start-cluster-master-no-zk-server

啟動資料服務器

bin/start-cluster-data-server

啟動查詢服務器

bin/start-cluster-query-server

這樣的話 集群就啟動成功了!

至此,我們的大資料環境基本搭建完畢,下一章我們將接入資料,開始進行標簽的開發,未完待續~

參考文獻

《用戶畫像:方法論與工程化解決方案》

更多實時資料分析相關博文與科技資訊,歡迎關注 “實時流式計算” 詳細ambari官網安裝檔案pdf請在關注“實時流式計算” 后臺回復ambari 獲取用戶畫像相關資料 請關注 “實時流式計算” 回復 “用戶畫像”

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/4564.html

標籤:大數據

上一篇:七個生產案例告訴你BATJ為何選擇ElasticSearch!應用場景和優勢!

下一篇:ClickHouse原始碼筆記1:聚合函式的實作

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • GPU虛擬機創建時間深度優化

    **?桔妹導讀:**GPU虛擬機實體創建速度慢是公有云面臨的普遍問題,由于通常情況下創建虛擬機屬于低頻操作而未引起業界的重視,實際生產中還是存在對GPU實體創建時間有苛刻要求的業務場景。本文將介紹滴滴云在解決該問題時的思路、方法、并展示最終的優化成果。 從公有云服務商那里購買過虛擬主機的資深用戶,一 ......

    uj5u.com 2020-09-10 06:09:13 more
  • 可編程網卡芯片在滴滴云網路的應用實踐

    **?桔妹導讀:**隨著云規模不斷擴大以及業務層面對延遲、帶寬的要求越來越高,采用DPDK 加速網路報文處理的方式在橫向縱向擴展都出現了局限性。可編程芯片成為業界熱點。本文主要講述了可編程網卡芯片在滴滴云網路中的應用實踐,遇到的問題、帶來的收益以及開源社區貢獻。 #1. 資料中心面臨的問題 隨著滴滴 ......

    uj5u.com 2020-09-10 06:10:21 more
  • 滴滴資料通道服務演進之路

    **?桔妹導讀:**滴滴資料通道引擎承載著全公司的資料同步,為下游實時和離線場景提供了必不可少的源資料。隨著任務量的不斷增加,資料通道的整體架構也隨之發生改變。本文介紹了滴滴資料通道的發展歷程,遇到的問題以及今后的規劃。 #1. 背景 資料,對于任何一家互聯網公司來說都是非常重要的資產,公司的大資料 ......

    uj5u.com 2020-09-10 06:11:05 more
  • 滴滴AI Labs斬獲國際機器翻譯大賽中譯英方向世界第三

    **桔妹導讀:**深耕人工智能領域,致力于探索AI讓出行更美好的滴滴AI Labs再次斬獲國際大獎,這次獲獎的專案是什么呢?一起來看看詳細報道吧! 近日,由國際計算語言學協會ACL(The Association for Computational Linguistics)舉辦的世界最具影響力的機器 ......

    uj5u.com 2020-09-10 06:11:29 more
  • MPP (Massively Parallel Processing)大規模并行處理

    1、什么是mpp? MPP (Massively Parallel Processing),即大規模并行處理,在資料庫非共享集群中,每個節點都有獨立的磁盤存盤系統和記憶體系統,業務資料根據資料庫模型和應用特點劃分到各個節點上,每臺資料節點通過專用網路或者商業通用網路互相連接,彼此協同計算,作為整體提供 ......

    uj5u.com 2020-09-10 06:11:41 more
  • 滴滴資料倉庫指標體系建設實踐

    **桔妹導讀:**指標體系是什么?如何使用OSM模型和AARRR模型搭建指標體系?如何統一流程、規范化、工具化管理指標體系?本文會對建設的方法論結合滴滴資料指標體系建設實踐進行解答分析。 #1. 什么是指標體系 ##1.1 指標體系定義 指標體系是將零散單點的具有相互聯系的指標,系統化的組織起來,通 ......

    uj5u.com 2020-09-10 06:12:52 more
  • 單表千萬行資料庫 LIKE 搜索優化手記

    我們經常在資料庫中使用 LIKE 運算子來完成對資料的模糊搜索,LIKE 運算子用于在 WHERE 子句中搜索列中的指定模式。 如果需要查找客戶表中所有姓氏是“張”的資料,可以使用下面的 SQL 陳述句: SELECT * FROM Customer WHERE Name LIKE '張%' 如果需要 ......

    uj5u.com 2020-09-10 06:13:25 more
  • 滴滴Ceph分布式存盤系統優化之鎖優化

    **桔妹導讀:**Ceph是國際知名的開源分布式存盤系統,在工業界和學術界都有著重要的影響。Ceph的架構和演算法設計發表在國際系統領域頂級會議OSDI、SOSP、SC等上。Ceph社區得到Red Hat、SUSE、Intel等大公司的大力支持。Ceph是國際云計算領域應用最廣泛的開源分布式存盤系統, ......

    uj5u.com 2020-09-10 06:14:51 more
  • es~通過ElasticsearchTemplate進行聚合~嵌套聚合

    之前寫過《es~通過ElasticsearchTemplate進行聚合操作》的文章,這一次主要寫一個嵌套的聚合,例如先對sex集合,再對desc聚合,最后再對age求和,共三層嵌套。 Aggregations的部分特性類似于SQL語言中的group by,avg,sum等函式,Aggregation ......

    uj5u.com 2020-09-10 06:14:59 more
  • 爬蟲日志監控 -- Elastc Stack(ELK)部署

    傻瓜式部署,只需替換IP與用戶 導讀: 現ELK四大組件分別為:Elasticsearch(核心)、logstash(處理)、filebeat(采集)、kibana(可視化) 下載均在https://www.elastic.co/cn/downloads/下tar包,各組件版本最好一致,配合fdm會 ......

    uj5u.com 2020-09-10 06:15:05 more
最新发布
  • day02-2-商鋪查詢快取

    功能02-商鋪查詢快取 3.商鋪詳情快取查詢 3.1什么是快取? 快取就是資料交換的緩沖區(稱作Cache),是存盤資料的臨時地方,一般讀寫性能較高。 快取的作用: 降低后端負載 提高讀寫效率,降低回應時間 快取的成本: 資料一致性成本 代碼維護成本 運維成本 3.2需求說明 如下,當我們點擊商店詳 ......

    uj5u.com 2023-04-20 08:33:24 more
  • MySQL中binlog備份腳本分享

    關于MySQL的二進制日志(binlog),我們都知道二進制日志(binlog)非常重要,尤其當你需要point to point災難恢復的時侯,所以我們要對其進行備份。關于二進制日志(binlog)的備份,可以基于flush logs方式先切換binlog,然后拷貝&壓縮到到遠程服務器或本地服務器 ......

    uj5u.com 2023-04-20 08:28:06 more
  • day02-短信登錄

    功能實作02 2.功能01-短信登錄 2.1基于Session實作登錄 2.1.1思路分析 2.1.2代碼實作 2.1.2.1發送短信驗證碼 發送短信驗證碼: 發送驗證碼的介面為:http://127.0.0.1:8080/api/user/code?phone=xxxxx<手機號> 請求方式:PO ......

    uj5u.com 2023-04-20 08:27:27 more
  • 快取與資料庫雙寫一致性幾種策略分析

    本文將對幾種快取與資料庫保證資料一致性的使用方式進行分析。為保證高并發性能,以下分析場景不考慮執行的原子性及加鎖等強一致性要求的場景,僅追求最終一致性。 ......

    uj5u.com 2023-04-20 08:26:48 more
  • sql陳述句優化

    問題查找及措施 問題查找 需要找到具體的代碼,對其進行一對一優化,而非一直把關注點放在服務器和sql平臺 降低簡化每個事務中處理的問題,盡量不要讓一個事務拖太長的時間 例如檔案上傳時,應將檔案上傳這一步放在事務外面 微軟建議 4.啟動sql定時執行計劃 怎么啟動sqlserver代理服務-百度經驗 ......

    uj5u.com 2023-04-20 08:26:35 more
  • 云時代,MySQL到ClickHouse資料同步產品對比推薦

    ClickHouse 在執行分析查詢時的速度優勢很好的彌補了MySQL的不足,但是對于很多開發者和DBA來說,如何將MySQL穩定、高效、簡單的同步到 ClickHouse 卻很困難。本文對比了 NineData、MaterializeMySQL(ClickHouse自帶)、Bifrost 三款產品... ......

    uj5u.com 2023-04-20 08:26:29 more
  • sql陳述句優化

    問題查找及措施 問題查找 需要找到具體的代碼,對其進行一對一優化,而非一直把關注點放在服務器和sql平臺 降低簡化每個事務中處理的問題,盡量不要讓一個事務拖太長的時間 例如檔案上傳時,應將檔案上傳這一步放在事務外面 微軟建議 4.啟動sql定時執行計劃 怎么啟動sqlserver代理服務-百度經驗 ......

    uj5u.com 2023-04-20 08:25:13 more
  • Redis 報”OutOfDirectMemoryError“(堆外記憶體溢位)

    Redis 報錯“OutOfDirectMemoryError(堆外記憶體溢位) ”問題如下: 一、報錯資訊: 使用 Redis 的業務介面 ,產生 OutOfDirectMemoryError(堆外記憶體溢位),如圖: 格式化后的報錯資訊: { "timestamp": "2023-04-17 22: ......

    uj5u.com 2023-04-20 08:24:54 more
  • day02-2-商鋪查詢快取

    功能02-商鋪查詢快取 3.商鋪詳情快取查詢 3.1什么是快取? 快取就是資料交換的緩沖區(稱作Cache),是存盤資料的臨時地方,一般讀寫性能較高。 快取的作用: 降低后端負載 提高讀寫效率,降低回應時間 快取的成本: 資料一致性成本 代碼維護成本 運維成本 3.2需求說明 如下,當我們點擊商店詳 ......

    uj5u.com 2023-04-20 08:24:03 more
  • day02-短信登錄

    功能實作02 2.功能01-短信登錄 2.1基于Session實作登錄 2.1.1思路分析 2.1.2代碼實作 2.1.2.1發送短信驗證碼 發送短信驗證碼: 發送驗證碼的介面為:http://127.0.0.1:8080/api/user/code?phone=xxxxx<手機號> 請求方式:PO ......

    uj5u.com 2023-04-20 08:23:11 more