Chen Riang's Blog

Live everyday like it's your last

Fix ZSH histroy file corruption

Today after a force reboot, I get a ZSH history file corruption error message. zsh: corrupt history file /home/chenriang/.zsh_history Solution Solution to solve this error message is relat...

Springboot autowire in non-bean object

In Spring there is a feature autowiring, that will auto resolve and inject object dependency. With the help of autowriring, we does not need to explicitly inject the dependency and reduce the amoun...

Java Concurrency - Future

When we talk about Concurrency topic in Java, for sure you will come across to this term, Future. In this article, we are going to learn about what is Future, and how can we use it. java.util.conc...

Groovy ExecutorService submit Callable

the little annoying thing

I have been using Spock instead of JUnit for a few months now. Today, I’m trying something around thread safety and I found something about Groovy that annoyed me. In my unit test, I need to submit...

Understanding Elasticsearch Read/Write Model

Yesterday, while googling about the es_rejected_execution_exception error, I learn about the how an index is being written into Elasticsearch(ES). Thus, I think is best to write an article about t...

Elasticsearch Bulk Index Request Rejection

Yesterday, I obtained the es_rejected_execution_exception error response when trying to perform bulk indexing request. 1 2 3 4 5 6 7 8 9 10 11 12 13 { "error": { "root_cause": [ ...

Elasticsearch Synonym + Ngram = Problem

I believe Synonym Token Filter and NGram Token Filter are the two frequent filters that most people normally used in Elasticsearch(ES). In this article, I’m going to talk about some of the annoying...

JMeter 101

Performance testing is a test technique that focuses on how the system behaves and performs. In real life, many software development teams tense to ignore this and only carry it out when it is requ...

Spring Data Redis

Redis is a famous in-memory data store that often used as database, cache, and message broker. Spring framework come out with Spring Data Redis that provide a very easy configuration and access to ...

Remove multi-line line end whitespace

Today, I bump into a problem when fixing some failed unit test. Long story short, I need to compare returned multiline string from class A and for some reason it randomly added a whitespace in eac...