Spring boot project to track log links

1. Background Depending on the original log4j2 configuration, it is difficult to find all logs of an API call from the miscellaneous logs of a service. In this paper, we print a unique traceId in the log to track every call. 2. Key ideas 2.1.MDC The log tracking target is at each request level, that is, each request of the same interface ...

Posted on Thu, 12 Dec 2019 07:56:41 -0500 by daok

In order to better meet the needs of historical data storage and retrieval, programmers often choose this kind of God operation!

The original is published in the WeChat public address: Tencent cloud storage (attention has surprises) Usage scenarios ElasticSearch is a very popular open-source document index engine, which is favored by large and small companies for log retrieval, analysis and query. However, the data of ElasticSearch relies on the local disk for storage ...

Posted on Thu, 12 Dec 2019 02:36:33 -0500 by frANZi

SpringCloud Distributed Micro Services Cloud Architecture Part 1: Registration and Discovery of Services Eureka(Finchley Edition)

1. Introduction to spring cloudGiven the popularity of the simplest Spring Cloud Tutorial in history, I intentionally upgraded the next version to support version 2.0.3.RELEASE for Spring Boot and Finchley.RELEASE for Spring Cloud. The official documentation for the Finchley version is as followshttp://cloud.spring.io/spring-cloud-static/Finch ...

Posted on Wed, 11 Dec 2019 16:00:22 -0500 by ts2000abc

XIV. Data format conversion of spark log file summarized by Spark SQL

Step 1. Data source Find the log data source of spark. In the directory / root / spark / spark-2.0.2-bin-hadoop 2.7/logs: By reading the file, count the number of data: val masterLog = sc.textFile("file:///root/spark/spark-2.0.2-bin-hadoop2.7/logs/spark-root-org.apache.spark.deploy.master.Master-1-hadoop000.out") val workLog = ...

Posted on Wed, 11 Dec 2019 14:33:55 -0500 by latvaustin

Talk about rocketmq's sendOrderly

order This paper mainly studies the sendOrderly of rocketmq sendOrderly rocketmq-spring-boot/2.0.4/rocketmq-spring-boot-2.0.4-sources.jar!/org/apache/rocketmq/spring/core/RocketMQTemplate.java public class RocketMQTemplate extends AbstractMessageSendingTemplate<String> implements InitializingBean, DisposableBean { //...... public S ...

Posted on Wed, 11 Dec 2019 11:48:30 -0500 by timbuckthree

Export data to Excel using POI

Export data to Excel using POI I. overview Apache POI - Java API for Microsoft documentation Download: http://poi.apache.org/index.html Guide: https://poi.apache.org/spreadsheet/quick-guide.html maven Download: <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId&gt ...

Posted on Tue, 10 Dec 2019 21:02:34 -0500 by freakus_maximus

Appending files to zip package in Java

There is a requirement to add a description file to a zip package downloaded from an interface. After searching, I didn't find a way to add files directly to zip. The final solution is to decompress and then compress. The specific process is as follows: 1. A zip file compression and decompression tool class The compression and decompression ...

Posted on Tue, 10 Dec 2019 17:34:23 -0500 by hame22

Control log4j at different log levels in multiple environments in Spring Boot

I. question raising Only through log4j.properties to control the log level, it is not very convenient for the environment requiring multi environment deployment. Maybe we need to use the DEBUG level for most modules in the development environment, the DEBUG level for a small part in the test environment, and the INFO level for ...

Posted on Tue, 10 Dec 2019 15:51:31 -0500 by 0riole

API usage of zookeeper

POM Configuration Import zookeeper and junit <dependencies> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>3.5.6</version> </dependency> <dependency> <groupId>junit</groupId> ...

Posted on Tue, 10 Dec 2019 15:40:37 -0500 by theredking

Programming implementation of sequence file and MapFile defined by Hadoop

Hadoop defines two types of data structures, sequence file and MapFile, to meet the needs of Mapreduce programming framework. The intermediate results of Map output are represented by them. Where MapFile is a SequenceFile sorted and indexed The SequenceFile records the list of key/value pairs and is a serialized binary file. T ...

Posted on Tue, 10 Dec 2019 13:47:55 -0500 by adrian28uk