In the Kafka core principle of information, there are many online, but if you do not study its source code, always know it but do not know why. Here's how to compile the Kafka source code in the Windows environment, and build the Kafka source environment through the IntelliJ Idea development tool to facilitate local debug debugging to study Kafka's internal imple
Now let's dive into the details of this solution and I'll show you how you can import data into Hadoop in just a few steps.
1. Extract data from RDBMS
All relational databases have a log file to record the latest transaction information. The first step in our flow solution is to get these transaction data and enable Hadoop to parse these transaction formats. (about how to parse these transaction logs, the original author did not introduce, may involve business information.) )
2, start
First, install JDK and zooeleeper here omitted
Second, installation and Operation Kafka
Download
Http://kafka.apache.org/downloads.html
After the download to any directory, the author is D:\Java\Tool\kafka_2.11-0.10.0.1
1. Enter the Kafka configuration directory, D:\Java\Tool\kafka_2.11-0.10.0.12. Edit the file "Server.properties"3. Find and edit Log.dirs=d:\java\tool\kafka_2.11-0.10.0.1\
There are 3 servers, the IP is 192.168.174.10,192.168.174.11,192.168.174.12, respectively.
Download the website and unzip the installation on each machine separately.# 创建kafka的安装目录mkdir -p /usr/local/software/kafka# 解压tar -xvf kafka_2.12-1.1.0.tgz -C /usr/local/software/kafka/
Modify each server's/etc/profile file, set the
1. File System Description
File systems are generally divided into two types: system and user. System-level file systems: ext3, ext4, DFS, NTFS, etc ,, I will not introduce the complicated distributed or system-level file system,
The architecture design of the Kafka file system is deeply analyzed from the perspective of the high performance of the Kafka architecture.
2.
Kafka Distributed construction(192.168.230.129)master(192.168.230.130)slave1(192.168.230.131)salve2在master、slave1、slave2三台主机上配置kafaka分布式集群Preparation: Configure the Zookeeper1 on three machines, unzip the Kafka compressed file to the specified directory.[[emailprotected] software]# tar -zxf kafka_2.10-0.8.1.1.tgz -C /opt/modules2. Modify the Server.properties file in the/opt/modules/kafka_2.10-0.8.1.1/confi
1. Start the Zookeeper server./zookeeper-server-start.sh/opt/cx/kafka_2.11-0.9.0.1/config/zookeeper.properties2. Modify the Broker-1,broker-2 configurationbroker.id=1listeners=plaintext://:9093 # The port the socket server listens onport=9093log.dirs=/opt/cx/kafka/ Kafka-logs-1broker.id=2listeners=plaintext://:9094# the port the socket server listens onport=9094log.dirs=/opt/cx/
ObjectiveThe latest project to use the message queue to do the message transmission, the reason why choose Kafka is because to cooperate with other Java projects, so the Kafka know a bit, is also a note it.This article does not talk about the differences between Kafka and other message queues, including performance and how it is used.Brief introductionKafka is a
Tags: host. com firewall keep class library star fail has an addressTechnology Exchange Group: 233513714These days to study the installation and use of Kafka, on the internet to find a lot of tutorials but failed, until the end of the network to think of problems finally installed deployment success, the following describes the installation of Kafka and code implementationFirst, close the firewallImportant
Kafka is developed in the Scala language and runs on the JVM, so you'll need to install the JDK before installing Kafka.
1. JDK installation configuration 1) do not have spaces in the Windows installation JDK directory name. Set Java_home and CLASSPATH example: Java_home c:\Java\jkd1.8 CLASSPATH.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar Verification: java-version 2) Linux installatio
1.JDK 1.82.zookeeper 3.4.8 Decompression3.kafka ConfigurationIn the Kafka decompression directory under a config folder, which is placed in our configuration fileConsumer.properites consumer configuration, this profile is used to configure the consumers opened in section 2.5, where we use the defaultProducer.properties producer configuration, this configuration file is used to configure the producers opened
First, installationKafka relies on zookeeper, so make sure the Zookeeper cluster is installed correctly and functioning properly before installing Kafka. Although the Kafka itself has built-in zookeeper, it is recommended that you deploy zookeeper clusters separately because other frameworks may also need to use zookeeper.(a), kafka:http://mirrors.hust.edu.cn/apache/kaf
Reference:Kafka cluster--3 broker 3 Zookeeper Create a real combat kafka_kafka introduction and installation _v1.3 http://www.docin.com/p-1291437890.htmlI. Preparatory work:1. Prepare 3 machines with IP addresses of: 192.168.3.230 (233,234) 2 respectively. Download Kafka stable version, my version is: Scala 2.11-kafka_2.11-0.9.0.0.tgz http://kafka.apache.org/downloads.html 3. respectively extracted into the directory you want to install, my directory
kafka--Distributed Messaging SystemArchitectureApache Kafka is a December 2010 Open source project, written in the Scala language, using a variety of efficiency optimization mechanisms, the overall architecture is relatively new (push/pull), more suitable for heterogeneous clusters.Design goal:(1) The cost of data access on disk is O (1)(2) High throughput rate, hundreds of thousands of messages per second
Generally in the Kafka consumer can set up a number of themes, that in the same program needs to send Kafka different topics of the message, such as exceptions need to send to the exception topic, normal to send to the normal topic, this time you need to instantiate a number of topics, and then send each.Use the Rdkafka component in net to do message processing, which is referenced in NuGet.Initialize the p
Https://www.ibm.com/developerworks/cn/opensource/os-cn-kafka/index.htmlKafka and Flume Many of the functions are really repetitive. Here are some suggestions for evaluating the two systems:
Kafka is a general-purpose system. You can have many producers and consumers to share multiple themes. Conversely, Flume is designed to work for a specific purpose and is sent specifically to HDFS and HBase. Flu
Kafka is a distributed publish-subscribe message system, simply a message queue, the advantage is that the data is persisted to disk (the focus of this article is not to introduce Kafka, do not say more). Kafka's use of the scene is still quite a lot, for example, as a buffer queue between asynchronous systems, in addition, in many scenarios we would design the following: write some data (such as logs) to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.