Tag Archives

Archive of posts published in the tag: Java

Random notes from crashing and hanging EMR Spark job

It sometimes happens that your EMR job crashes or hangs indefinitely with no meaningful log. You can try to capture memory dump but it is not very useful when your cluster machines have hundreds gigabytes of memory each. Below are “fixes” which worked…

Investigating AWS SDK conflicts in EMR

When you deploy your package to Amazon Elastic Map Reduce (EMR), you can access the AWS SDK provided by the platform. This gets tricky if you compile your code against different version of SDK because then you may get very cryptic bugs in…

Trivial ScheduledThreadPoolExecutor in C#

Today we are going to implement trivial ScheduledExecutorService in C#. Introduction We want to have a thread pool of fixed size which we can use to execute three types of tasks: One time tasks Tasks with fixed delay between executions Tasks with fixed…

Dynamically loading JAR file in Zeppelin

Imagine that you need to load JAR file dynamically in Zeppelin working on your EMR cluster. One easy way is to deploy the file to the instance and load it from there, however, what can you do if you have almost no access…

Generating class in Zeppelin

If you want to declare a class in Zeppelin and create instance of it, you might be surprised: class K defined class K classOf[K].newInstance() java.lang.InstantiationException: K at java.lang.Class.newInstance(Class.java:427) … 52 elided Caused by: java.lang.NoSuchMethodException: K.() at java.lang.Class.getConstructor0(Class.java:3082) at java.lang.Class.newInstance(Class.java:412) … 52 more What…

Concurrency Part 3 – Java mutex via JNI

This is the third part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET Last time we saw file lock in Java which we can use on…

Concurrency Part 2 – Java file lock

This is the second part of the Concurrency series. For your convenience you can find other parts in the table of contents in Part 1 – Mutex performance in .NET Today we explore system-wide lock in Java 1.8.0_161 on Windows 10 x64. There…

DLL Injection Part 7 — Injecting Java code

This is the seventh part of the DLL Injection series. For your convenience you can find other parts in the table of contents in Part 1 – Registry We already injected native code into target, managed code into default application domain, and managed…

STM32 Key Part 2 — Chat application

This is the second part of the STM32 series. For your convenience you can find other parts in the table of contents in Part 1 – DES implementation Today we are going to write very simple Java application to be able to see…