Hadoop learning problems encountered (add kafka service)

CDH parcel of the package is not kafka, kafka is stripped out, the need to download the new parcel package installed. Or online installation, but the online installation is very slow, used here to download the offline installation package parcel.

PS: kafka there are many versions, there are many versions of CDH, then perhaps you may wonder how you know what kafka version of CDH should be installed. The official presentations, documents Address: https://www.cloudera.com/documentation/enterprise/release-notes/topics/rn_consolidated_pcm.html#pcm_kafka    , screenshots here:

Since my CDH is 5.11, so it only allows kafka2.1.x, so I installed this version is

 

One. Installation Preparation:

Required Software:

①kafka csd package, download address: http://archive.cloudera.com/csds/kafka/

 

Since my CDH is 5.11, so it only allows kafka2.1.x, so I installed this version is

 

One. Installation Preparation:

Required Software:

①kafka csd package, download address: http://archive.cloudera.com/csds/kafka/

 

②kafka parcel package:

 

Address: http://archive.cloudera.com/kafka/parcels/latest/ , depending on the operating system, download the corresponding packet

 

two. start installation

1. Upload kafka.

Note that the following operations need to be performed in all the machines you CDH, otherwise would be undetectable.

 

① Upload CSD packages KAFKA-1.2.0.jar, CDH to the directory server, path / opt / cloudera / csd

 

 ② upload parcel package that three files to the directory / opt / cloudera under / parcel-repo, note that if there is a file the same name as the manifest file, the previous rename another name

 

2. Assign to activate

CDH into the management interface, click on the host -> parcel-> Check new parcel

 如果成功,则会看到你的kafka一项,并且有分配按钮,点击分配,等待,然后分配按钮编程激活按钮,点击激活,等待,操作成功后如下

 

OK,kafka安装完成

 

三。善后工作

安装完成后,便可以在添加服务里,添加kafka服务了。这里如果遇到最后一步,启动kafka的时候,失败报错如下:

 

Fatal error during KafkaServerStartable startup. Prepare to shutdown java.lang.OutOfMemoryError: Java heap space at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57) at java.nio.ByteBuffer.allocate(ByteBuffer.java:335) at kafka.log.SkimpyOffsetMap.<init>(OffsetMap.scala:43) at kafka.log.LogCleaner$CleanerThread.<init>(LogCleaner.scala:186) at kafka.log.LogCleaner

anonfun$1.apply(LogCleaner.scala:83)atkafka.log.LogCleaneranonfun$1.apply(LogCleaner.scala:83)atkafka.log.LogCleaner

anonfun$1.apply(LogCleaner.scala:83)

 

这是因为 Java Heap Size配置小了(奇怪的是安装kafka的时候它也没提示我设置啊,简直怪了),这里如下解决:

 

回到CDH主页面,点击kafka,进入配置页面,修改 Java Heap Size of Broker为1G,如下:,然后保存,重启KAFKA,OK,这下终于好了

 

Guess you like

Origin blog.csdn.net/madongyu1259892936/article/details/89186103