Category Archives: Uncategorized

Useful docker commands

Download Docker image docker pull python Start up Docker image with just a bash shell as entrypoint docker run -it –rm –name python python /bin/bash now you should see something like this : Attach to a running docker container docker … Continue reading

Posted in Uncategorized | Leave a comment

Java & JSON : How to serialize NULL

So how do you serialize NULL ? NULL would typically mean that the attribute is omitted from the json, but what if you WANT the NULL to be there, to symbolize an attribute that should be REMOVED.

Posted in Uncategorized | Leave a comment

Mockito and JUnit 5

The purpose of this post is simply to give a hint on how to use Mockito, Spy, and JUnit 5.

Posted in Uncategorized | Leave a comment

SQL Scratch

These are just scratches/notes for my work with Prestashop Create copy of table / duplicate table (select into kind of)

Posted in Uncategorized | Tagged , | Leave a comment

Functions as Arguments Java vs Scala, Game Set Match Scala Wins!

This is how you would create a function that takes a function as argument in Java The Function<A,B> myFunc = num -> “Value = ” + num;Here :A = the type of the first argument, in this example an intergerB … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Apache Zeppelin, with Spark and Cassandra, the perfect tool

Zeppelin has become one of my favourite tools in my toolbox. I am heavily designing stuff for Cassandra and in Scala, and even though I love Cassandra there are times when things just gets so complicated with the CQL command … Continue reading

Posted in Uncategorized | 11 Comments

SQL LIKE operation in Cassandra, is possible in v3.4+

For a long time it has not been possible to do a SELECT * FROM table WHERE firstname like ‘t%’; in Cassandra like you could in eg.. MySQL or any other Relation Database for that matter. In Cassandra v3.4 this … Continue reading

Posted in Uncategorized | 3 Comments

Apache SPARK and Cassandra and SQL

This is a short intro to start using Apache SPARK with Cassandra, running SQL on the Cassandra tables. Note that I am not running a SPARK cluster, I am running “local”, to me this is really convenient, not having to … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , | 2 Comments

Create an MBean (JMX) in Scala

Create the MBean like this

NOTE, that the interface/trait must end with MBean in the name And this is how you register your MBean

And the simply launch Java Mission Control (imc), attach to the JVM, and modify … Continue reading

Posted in Uncategorized | 2 Comments

SBT module not found, why ?

I have an build.sbt file that looks like this

But for some reason I can’t get slf4j downloaded from the Maven repository (http://mvnrepository.com) If I search the Maven Repository, I can clearly see that the version I intend to … Continue reading

Posted in Uncategorized | Leave a comment