전체 글(986)
-
Kafka Consumer topic을 pattern으로 정의하기
@KafkaListener(topicPattern = "TEST.*", groupId = "test")public void consume(GenericRecord record, Acknowledgment ack) { // your logic}
2025.03.27 -
Kafka Consumer @timestamp 추가하기
// Add @timestamp field Object originalTimestamp = jsonMap.remove("timestamp"); if (originalTimestamp != null) { jsonMap.put("@timestamp", originalTimestamp); }
2025.03.27 -
pid로 실행 및 종료하는 스크립트 만들기
실행#!/bin/bash# Run your application in the background and save the PIDyour_app_command &# Save the PID to a fileecho $! > app.pidecho "Application started with PID $(cat app.pid)"종료#!/bin/bash# Check if the pid file existsif [ -f app.pid ]; then PID=$(cat app.pid) # Kill the process kill $PID # Optionally remove the pid file rm app.pid echo "Application with PID $PID stopped."e..
2025.03.27 -
실행 및 종료 스크립트
# 실행java -Xms1024M -Xmx4096M -jar spigot-1.21.4.jar nogui > ./server.log 2>&1 &# 종료pid=$(ps aux | grep 'spigot-1.21.4.jar' | grep -v grep | awk '{print $2}')if [ -n "$pid" ]; then echo "Stopping Spigot server (PID $pid)..." kill "$pid"else echo "Spigot server is not running."fi
2025.03.23 -
Elasticsearch rejected: {"error":{"root_cause":[{"type":"invalid_index_name_exception","reason":"Invalid index name [HOME], must be lowercase","index_uuid":"_na_","index":"HOME"}],"type":"invalid_index_name_exception","reason":"Invalid index name [HOME],
elasticsearch의 index이름은 대문자 사용안됨
2025.03.22 -
Ubuntu dns cache 삭제
# systemed-resolved 상태 확인systemctl is-active systemd-resolved# active이면, 서비스 재기동sudo systemctl restart systemd-resolved
2025.03.21