Chen Riang's Blog

Live everyday like it's your last

Optimize SQL Queires with Not-Equal Operator

When working with a large volume of data in a database, it is important to optimize queries for performance. Recently, I faced a challenge in optimizing a “not equal” (<> or !=) search, which...

Merge ZSH History files

Zsh is a powerful shell that offers extensive customization options. One of its useful features is the ability to maintain a history of executed commands. However, if you use multiple terminals, yo...

Delete keys matching a specific pattern in Redis

Deleting key(s) in Redis is pretty straightforward, you only need to issue a DEL command. However, DEL command can only remove the key(s) that exact match stated in the command, it does not support...

Kubernetes Lens show blank screen

Lens show blank screen when it connected (green dot) to an active Kubernetes cluster. Solution Remove lens-local-storage folder solve my issue. 1 rm -r /home/chenriang/.config/Lens/lens...

Exclude Lombok method from test coverage

Lombok is a nice Java library that reduces the boilerplate in our code. We can simply add in some annotations and Lombok will generate the code during compile-time. It was used heavily in my projec...

Redis - ERR EXEC without MULTI exception

Today, I hit an exception when I tried to code my Redis logic to be transactional. io.lettuce.core.RedisCommandExecutionException: ERR EXEC without MULTI Below is my code implementation. 1 2...

Redis Server Side Scripting with Lua

Performance and light weight are always reasons why people want to use Redis. If the ordinary use of Redis does not fulfil your requirement, server side scripting with Lua might come into rescue. R...

Generating Load with Locust

Locust is a performance testing tools just like JMeter that generate load but written in Python. The main feature of Locust is the expandability, you can write the behavior of whole perform...

Profile Java(WSL) using Yourkit(Window)

I have been using WSL(Window Subsystem Linux) for development for nearly a year now, if you ask me how’s the experience using it? I love it, it makes my life as a developer so much easier e.g. soft...

Druid Not Enough Capacity for Primary Segment

The error below being thrown by Historical node when the Druid cluster loading the data segment. 2021-10-01T01:51:13,538 WARN [Coordinator-Exec–0] org.apache.druid.server.coordinator.rules.Load...