Skip to content

Instantly share code, notes, and snippets.

View hgschmie's full-sized avatar

Henning Schmiedehausen hgschmie

View GitHub Profile
@hgschmie
hgschmie / extension_framework.md
Last active February 26, 2023 21:17
Jdbi Extension Framework Rewrite

Extension Framework rewrite

The current extension framework is relatively simple. It supports attaching an extension interface which looks up a factory that then has the responsibility of either looking up an implementation class or create a proxy to execute code for each method.

Due to that simple structure, there are a number of inconsistencies, especially around the extension context and wrapping each method from an interface.

The main reason for this is that most of the interesting functionality for the extension code is not actually in the core/extension

00:27:53.406 [SingularityStatePoller] ERROR c.h.s.SingularityLeaderController - Caught exception while saving state
java.lang.RuntimeException: java.lang.InterruptedException
at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-17.0.jar:na]
at com.hubspot.singularity.data.CuratorManager.checkExists(CuratorManager.java:53) ~[classes/:na]
at com.hubspot.singularity.data.CuratorManager.exists(CuratorManager.java:60) ~[classes/:na]
at com.hubspot.singularity.data.StateManager.save(StateManager.java:72) ~[classes/:na]
at com.hubspot.singularity.SingularityLeaderController$StatePoller.run(SingularityLeaderController.java:194) ~[classes/:na]
Caused by: java.lang.InterruptedException: null
at java.lang.Object.wait(Native Method) ~[na:1.7.0_67]
at java.lang.Object.wait(Object.java:503) ~[na:1.7.0_67]
/home/hschmiedehausen/code/mesos/Singularity/SingularityBase/src/main/java/com/hubspot/singularity/SingularityPendingTaskId.java:72: Line has trailing spaces.
/home/hschmiedehausen/code/mesos/Singularity/SingularityBase/src/main/java/com/hubspot/singularity/SingularityPendingTaskId.java:90: Line has trailing spaces.
/home/hschmiedehausen/code/mesos/Singularity/SingularityBase/src/main/java/com/hubspot/singularity/SingularityDeployMarker.java:52: 'if' construct must use '{}'s.
/home/hschmiedehausen/code/mesos/Singularity/SingularityBase/src/main/java/com/hubspot/singularity/SingularityDeployMarker.java:54: 'if' construct must use '{}'s.
/home/hschmiedehausen/code/mesos/Singularity/SingularityBase/src/main/java/com/hubspot/singularity/SingularityDeployMarker.java:56: 'if' construct must use '{}'s.
/home/hschmiedehausen/code/mesos/Singularity/SingularityBase/src/main/java/com/hubspot/singularity/SingularityDeployMarker.java:60: 'if' construct must use '{}'s.
/home/hschmiedehausen/code/mesos/Singularity/Singulari
@hgschmie
hgschmie / findbugs
Created December 28, 2013 05:09
current list of problems in vert.x
[INFO] --- findbugs-maven-plugin:2.5.3:check (default) @ vertx-core ---
[INFO] BugInstance size is 3
[INFO] Error size is 0
[INFO] Total bugs: 3
[INFO] Inconsistent synchronization of org.vertx.java.core.http.impl.PriorityHttpConnectionPool.maxPoolSize; locked 60% of time ["org.vertx.java.core.http.impl.PriorityHttpConnectionPool"] At PriorityHttpConnectionPool.java:[lines 32-176]
[INFO] Inconsistent synchronization of org.vertx.java.core.sockjs.impl.Session.dataHandler; locked 50% of time ["org.vertx.java.core.sockjs.impl.Session"] At Session.java:[lines 43-373]
[INFO] Inconsistent synchronization of org.vertx.java.core.sockjs.impl.Session.paused; locked 66% of time ["org.vertx.java.core.sockjs.impl.Session"] At Session.java:[lines 43-373]
[INFO] --- findbugs-maven-plugin:2.5.3:check (default) @ vertx-hazelcast ---
[INFO] BugInstance size is 2
public class Jacksonian
{
public static void main(String[] args) throws Exception
{
final JsonFactory jf = new JsonFactory();
final ObjectMapper mapper = new ObjectMapper();
final JsonParser jp;
if(args.length > 0) {
jp = jf.createJsonParser(new File(args[0]));
public class ActiveMQReader implements Runnable {
private Connection connection = null;
private Session session = null;
private MessageConsumer consumer = null;
private boolean running = true;
private long lastEvent = 0L;
private long lastHit = 0L;