專案三 大資料離線分析平台

2021-08-20 06:55:47 字數 1917 閱讀 4195

具體匯入方法使用下面的連線

注意修改後需要重新部署到tomcat中

隨意點點

用來寫後台的兩種資料埋點

然後測試**hbase-test

上述做完就是:資料通過編寫資料埋點 -》nginx伺服器上面了 

現在我們要做的就是通過flume讀取nginx上面的資料存到hdfs

source:exec

channel:memory

sink:hdfssink

# name the components on this agent

a1.sources = r1

a1.sinks = k1

a1.channels = c1

# describe/configure the source

a1.sources.r1.type = exec

a1.sources.r1.command = tail -f /var/log/nginx/access.log

# use a channel which buffers events in memory

a1.channels.c1.type = memory

# describe the sink

a1.sinks.k1.type = hdfs

a1.sinks.k1.hdfs.path = hdfs://hadoop1:9000/flume/%y%m%d

a1.sinks.k1.hdfs.uselocaltimestamp = true    #設定上面的年月日,一定要設定這個引數

a1.sinks.k1.hdfs.filetype = datastream

a1.sinks.k1.hdfs.rollinterval = 0

a1.sinks.k1.hdfs.rollsize = 10240

a1.sinks.k1.hdfs.rollcount = 0

# bind the source and sink to the channel

a1.sources.r1.channels = c1

a1.sinks.k1.channel = c1

[hadoop@hadoop04 ~]$ flume-ng agent --conf conf --conf-file file2hdfs.properties --name a1 -dflume.hadoop.logger=info,console    

注意許可權需要在root使用者下才能訪問nginx的目錄

隨意點幾下這樣在hdfs中就有資料了

解析瀏覽器資訊就用別人寫好的**直接解析就行了。

大資料分析平台 專案2

注意的點 為什麼這麼寫?能不能加些其它的列操作?資料!什麼樣的資料!object模組下建立object main模組 建立usersession object類 思路 session的步長和時間 我從首頁進入到商品詳情到購物車 使用者到底跳轉了多少頁面就是步長 當這個資料統計之後 這個使用者在網頁中...

離線大資料專案流程

mapreduce 資料清洗 hive textfile格式 create table 表名 a string b string row format delimited fields terminated by 指定分隔符 stored as textfile load data local in...

Hadoop(三) 大資料離線計算與實時計算

分享一下我老師大神的人工智慧教程吧。零基礎,通俗易懂!風趣幽默!1 mapreduce是處理hdfs上的資料 2 mapreduce的思想 是pagerank 搜尋排名 原理是進行分布式計算。如上圖,網頁跳轉中,訪問網頁3的次數最多,也就是權重最大的為網頁3。比如京東 中給推薦的商品,就是近期訪問的...