大資料執行環境的執行

2022-06-26 15:39:08 字數 2356 閱讀 1883

1.azkaban

啟動:bin/azkaban-solo-start.sh或絕對路徑方式執行azkaban-solo-start.sh指令碼

關閉:bin/azkaban-solo-shutdown.sh

2.kafka

注意配置server.properties,此配置檔案用來配置kafka伺服器,介紹幾個最基礎的配置

broker.id 申明當前kafka伺服器在集群中的唯一id,需配置為integer,並且集群中的每乙個kafka伺服器的id都應是唯一的,我們這裡採用預設配置即可

listeners 申明此kafka伺服器需要監聽的埠號,如果是在本機上跑虛擬機器執行可以不用配置本項,缺省會使用localhost的位址,如果是在遠端伺服器上執行則必須配置,例如:listeners=plaintext:// 192.168.180.128:9092。並確保伺服器的9092埠能夠訪問

zookeeper.connect 申明kafka所連線的zookeeper的位址 ,需配置為zookeeper的位址,由於本次使用的是kafka高版本中自帶zookeeper,使用預設配置即可zookeeper.connect=localhost:2181

2.1 啟動zookeeper:bin/zookeeper-server-start.sh config/zookeeper.properties 也可以自己建立乙個啟動指令碼zookeeper-start.sh,內容如下:

exec /home/hadoop/runtime/kafka_2.11-1.1.0/bin/zookeeper-server-start.sh /home/hadoop/runtime/kafka_2.11-1.1.0/config/zookeeper.properties
2.2 關閉zookeeper:沒有提供指令碼,只能先jps找出quorumpeermain所在的程序id,然後使用命令 kill -9 pid殺掉程序2.3 啟動kafka: bin/kafka-server-start.sh config/server.properties2.4 建立topic:

bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topictest

2.5 檢視topic列表:

bin/kafka-topics.sh --list --zookeeper localhost:2181

2.6 建立消費者

bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topictest--from-beginning

2.7 建立生產者

bin/kafka-console-producer.sh --broker-list localhost:9092 --topictest

注意以上的localhost是在server.properties檔案沒有修改的情況下。如果server.properties修改成如下配置:

則在建立消費者和生產者的命令時需要如下:

--建立消費者

bin/kafka-console-consumer.sh --bootstrap-server plaintext: --topictest--from-beginning

--建立生產者

bin/kafka-console-producer.sh --broker-listplaintext::9092 --topictest

實踐證明,建立生產者可以不用加plaintext://也是可行的。

搭建大資料執行環境之一

一鍵搭建 zookeeper hadoop hive hbase sqoop kafka spark kylin 本地mac有3個虛擬機器 server1 192.168.84.128 server2 192.168.84.131 server3 192.168.84.132 yum install...

node的執行環境

commonjs 是node.js的規範,每個檔案是乙個模組,有自己的作用域,乙個檔案乙個模組,在模組內部 modulebiankling module.exports 則用來匯出 require代表引入這個檔案 const mod require 02 cusmod 如果引入乙個檔案,這個檔案裡有...

ASP執行環境

一 建立 asp 執行環境 首先建立乙個空的目錄,在你喜歡的位置,假設是 d websvr。將 netbox.exe 複製到這個目錄,然後在目錄中創 上面的 摘自 建立乙個 web 伺服器 其中加粗的部分是預設檔名,如果你的應用不同,可以自行新增修 改。二 複製 asp 應用 在目錄中再建立乙個子目...