Various Java utilities
Add pepper as dependency to your project through:
<dependency>
<groupId>io.github.solven-eu.pepper</groupId>
<artifactId>pepper</artifactId>
<version>${pepper.version}</version>
</dependency>
Various utilities helping operating in Java on a daily basis.
GCInspector is drop-in class providing standard logs related to GC activity
@Bean
public IPepperThreadDumper pepperThreadDumper() {
return new PepperThreadDump(ManagementFactory.getThreadMXBean());
}
@Bean
public GCInspector gcInspector(IpepperThreadDumper pepperThreadDumper) {
return new GCInspector(pepperThreadDumper);
}
PepperLogHelper helps publishing relevant logs regarding memory and timings
Assert.assertEquals("0.09%", pepperLogHelper.getNicePercentage(123, 123456).toString());
Assert.assertEquals("9sec 600ms", pepperLogHelper.getNiceTime(9600).toString());
Assert.assertEquals("2min 11sec", pepperLogHelper.getNiceTime(131, TimeUnit.SECONDS).toString());
Assert.assertEquals("789B", pepperLogHelper.getNiceMemory(789L).toString());
Assert.assertEquals("607KB", pepperLogHelper.getNiceMemory(789L * 789).toString());
Assert.assertEquals("468MB", pepperLogHelper.getNiceMemory(789L * 789 * 789).toString());
Assert.assertEquals("360GB", pepperLogHelper.getNiceMemory(789L * 789 * 789 * 789).toString());
Assert.assertEquals("278TB", pepperLogHelper.getNiceMemory(789L * 789 * 789 * 789 * 789).toString());
Assert.assertEquals("214PB", pepperLogHelper.getNiceMemory(789L * 789 * 789 * 789 * 789 * 789).toString());
ObjectInputHandlingInputStream enables transmitting a raw InputStream through an ObjectInput
CartesianProductHelper helps computing covering cartesian products over sets defined by Collections and Maps.
PepperProcessHelper enables tracking the memory consumption of a process (would it be current JVM, a forked Process or any other process).
PepperProcessHelper.getProcessResidentMemory(processPID)
It were useful to investigate memory issues in Heroku.
This module inspires itself from xpath and jsonPath to manipulate standard java.util.Map
.
See map-path
<dependency>
<groupId>io.github.solven-eu.pepper</groupId>
<artifactId>map-path</artifactId>
<version>4.4</version>
</dependency>
Change groupId from <groupId>com.github.cormoran-io.pepper</groupId>
to <groupId>io.github.solven-eu.pepper</groupId>
Change imported package from import cormoran.pepper.X
to import eu.solven.pepper.X
Pepper requires a JDK17 from 5.0
We use to maintain a fork of MAT, dedicated to huge Heap-Analysis. This is still available in 4.x MAT
We use to maintain a set of projects demonstrating how to prepare a Spark-based job, as a SpringBoot application, workarounding various issues like excluding some libraries already provided by the Hadoop ecosystem. This is still available in 4.x Spark