Sobes.tech

[Name] asked: Tell about ELK, Prometheus, and monitoring stacks — what are they, what have you used, what are you better at?

213

[имя] спросил: Как снять heap dump с Java-процесса в Kubernetes? Опиши по шагам в bash-консоли.

149

public static void a(long item) { b(item); System.out.println(item); } public static void b(long item) { c(item); } public static void c(long item) { d(item); } public static void d(long item) { System.out.println(item); item = 20L; // here }

148

class Task { private static int counter = 0; public static void main(String[] args) throws Exception { var thread1 = new Thread(() -> increase()); var thread2 = new Thread(() -> increase()); thread1.start(); thread2.start(); thread1.join(); thread2.join(); System.out.println(counter); } private static void increase() { for (int i = 0; i < 5000; i++) { counter++; } } }

147

[Name] asked: There is a large table with events/logs in production, it needs to be cleared. How exactly would you clear it?

147

class StackTask { public static void main(String[] args) { a(15); } public static void a(long item) { b(item); } public static void b(long item) { c(item); } public static void c(long item) { d(item); } public static void d(long item) { System.out.println(item); } }

145
/3