Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Maxwell compilation

Shulou Source: shulou.com Published: 2022-06-03 05:03:44 10月03日 Update

Maxwell's Profile

Maxwell is an application that reads MySQL binary logs in real-time and generates messages in JSON format that are sent as producers to Kafka, Kinesis, RabbitMQ, Redis, Google Cloud Pub/Sub, files, or other platforms. Its common application scenarios include ETL, maintaining cache, collecting table-level dml metrics, incremental to search engine, data partition migration, binlog rollback scheme, etc. Official website (maxwells-daemon.io)

Compiling Maxwell

Import Maxwell source code to IDEA

After compilation, generate target folder. Note: clean before typing package.

Upload the newly compiled maxwell-1.22.1.tar.gz to the server

[hadoop@hadoop004 maxwell-1.22.1]$ vim config.properties# mysql optionsuser = maxwellpassword = Aaron123456#host= hadoop004jdbc_options = useSSL=false&serverTimezone=Asia/Shanghaischema_database = maxwellignore_producer_error = true# sync tablesinclude_dbs=helloinclude_tables=peopleproducer = kafkakafka_topic = DSHS# kafka produce optionskafka.batch.size = 10000kafka.max.request.size = 2097152kafka.request.timeout.ms = 360000kafka.acks = allkafka.compression.type = snappykafka.metadata.fetch.timeout.ms= 360000kafka.retries= 100# kafka.linger.ms = 500kafka.max.in.flight.requests.per.connection = 1kafka.timeout.ms = 360000kafka.buffer.memory = 536870912kafka.max.block.ms = 1800000kafka.bootstrap.servers=hadoop004:9092# kafka producer partitionproducer_partition_by=primary_key# kafka monitormetrics_type=httpmetrics_http_port=8083

Or start directly at IDEA.

Start Kafka

bin/kafka-topics.sh --create --zookeeper hadoop004:2181 --replication-factor 1 --partitions 1 --topic DSHSbin/zookeeper-server-start.sh -daemon config/zookeeper.propertiesbin/kafka-server-start.sh -daemon config/server.propertiesbin/kafka-console-consumer.sh --zookeeper localhost:2181/kafka --topic DSHS --from-beginning[hadoop@hadoop004 maxwell-1.22.1]$ bin/maxwell --kafka_version 0.10.0.1 --config config.properties

➜ bin pwd/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin➜ bin sh mvn install:install-file -Dfile=/Users/Aaron/Downloads/fuxing/phoenix-4.10.0-cdh6.12.0/phoenix-4.10.0-cdh6.12.0-client.jar -DgroupId=org.apache.phoenix -DartifactId=phoenix-client -Dversion=4.10.0-cdh6.12.0 -Dpackaging=Jar

Tags: Compile file application binary epigenetic scenario incremental real-time common platform application engine metric search engine data folder scheme log server format Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Redmi Linux Microsoft Huawei