javasplitter.blogspot.com
Januar 2013 | Java Code Splitter
http://javasplitter.blogspot.com/2013_01_01_archive.html
Embedded Cassandra with Python and Java. Testing is important. When developing applications based on Cassandra. First of all I took the existing cassandra-unit. Code from git and create a jar artifact by running (yes you need to use Maven). The outcome of this will be a jar file that you can put into your Python project, i.e. under resources/cassandra. The next thing you need is a vanilla Cassandra configuration file ( cassandra.yaml. And { CASSANDRA PORT}. Library. Here is a simple example. WARN [Schedu...
javasplitter.blogspot.com
Embedded Cassandra with Python and Java | Java Code Splitter
http://javasplitter.blogspot.com/2013/01/embedded-cassandra-with-python-and-java.html
Embedded Cassandra with Python and Java. Testing is important. When developing applications based on Cassandra. First of all I took the existing cassandra-unit. Code from git and create a jar artifact by running (yes you need to use Maven). The outcome of this will be a jar file that you can put into your Python project, i.e. under resources/cassandra. The next thing you need is a vanilla Cassandra configuration file ( cassandra.yaml. And { CASSANDRA PORT}. Library. Here is a simple example.
javasplitter.blogspot.com
Investigating Cassandra Heap | Java Code Splitter
http://javasplitter.blogspot.com/2013/01/investigating-cassandra-heap.html
We are working on a new application which will use Apache Cassandra. Yesterday a co-worker sent me the following warning, which we kept seeing in the logs every now and then on several nodes. I was asked if this was something to worry about. Instead of commandline-jmxclient. So to get some numbers for Cassandras key and row cache via JMX you can do this:. Obviously we were running defaults for the 2 caches. The key cache. Make sure you have only 1 java process running otherwise feed in the pid manually t...
javasplitter.blogspot.com
SBT and faster RPM packaging | Java Code Splitter
http://javasplitter.blogspot.com/2014/04/sbt-and-faster-rpm-packaging.html
SBT and faster RPM packaging. We do a lot of Scala coding nowadays and I am trying to introduce SBT as build tool to all our new Scala projects. When we deploy these applications to Amazon EC2 nodes, we use Chef Solo. And the Instance User Data. Feature to install an RPM file. We don’t use custom AMI’s. The RPM file is hosted in S3 and made available as package via this yum plugin. First of all I have to say it is pretty lame that the SBT plugin is broken. When I looked at our build there were basically ...
javasplitter.blogspot.com
Februar 2014 | Java Code Splitter
http://javasplitter.blogspot.com/2014_02_01_archive.html
Publishing from SBT to Nexus. I am pretty new to SBT. Yesterday, for the first time, we wanted to publish the jar artifact of an in-house utility library into our private Nexus repository. To prepare your build in SBT basically do these things. Add values for the publishTo. Setting and the credentials. Class Use curl to figure out the correct value as explained here. Send a POST to the Nexus repository which you want to publish to without any authentication arguments. For us this was the call. Not super ...
javasplitter.blogspot.com
Mimicking a circular buffer | Java Code Splitter
http://javasplitter.blogspot.com/2012/04/mimicking-circular-buffer.html
Mimicking a circular buffer. Google Guava to the rescue. They have this nice utility class Iterators. The cycle method in Iterators returns a indefinitely looping Iterator for any Iterable that is given as argument. This would give me the behavior of the ring buffer and, because it was an Iterator, I was able to remove elements from the underlying collection. The loop would stop if the Collection was exhausted. Pretty neat. Abonnieren Kommentare zum Post (Atom). Mein Profil vollständig anzeigen.
javasplitter.blogspot.com
Generating REST docs with Scala and Finatra | Java Code Splitter
http://javasplitter.blogspot.com/2013/07/generating-rest-docs-with-scala-and.html
Generating REST docs with Scala and Finatra. More than 2 years ago I wrote a Blog post about Enunciate - a tool which helps you to generate a nice documentation for your REST API if you use Java and JAX-RS. I like documentation that exists very close to the code and is created and updated while you implement the main functionality. This kind of documentation has also been recommended in the Pragmatic Programmer. A RPC System created in the Twitter software forge that runs on Netty. Which puts a Sinatra.
javasplitter.blogspot.com
The Beauties and Pitfalls of ThreadLocals | Java Code Splitter
http://javasplitter.blogspot.com/2011/07/beauties-and-pitfalls-of-threadlocals.html
The Beauties and Pitfalls of ThreadLocals. Other applications for ThreadLocal include storing or accumulating per-thread context information for later retrieval. Public void readRequest(final DatatypeInput in) {. Public void performOperation() {. Public void writeResponse(final DatatypeOutput out) {. And I'am assuming Threads are given back to the pool? ThreadLocal is also useful in servlet-based applications or any multithreaded server application in which the unit of work is an entire request, bec...
javasplitter.blogspot.com
April 2014 | Java Code Splitter
http://javasplitter.blogspot.com/2014_04_01_archive.html
Two Scala Serialization Examples. In the last two days I’ve been looking into ways to serialize and deserialize some Scala objects. I tested a few suggestions that were mentioned on this post on Stackoverflow. As a reference for myself (and because sometimes it is hard to find good examples) I am adding two examples for Scala Pickling. Let’s have a basic SBT project first. Since I work with the Battlefield franchise let’s create some domain classes that we are going to serialize and deserialize. Which is...
javasplitter.blogspot.com
Februar 2012 | Java Code Splitter
http://javasplitter.blogspot.com/2012_02_01_archive.html
Testing just got better. Last year I read an article in the German Java Magazin. About a library called org.patterntesting. The library comes with TestRunner. That can be used to run all test methods within a test class in parallel. Just change your test to look like this:. Though as a user of the patterntesting library you will never be affected by this - the ParallelProxyRunner will hide this problem for you. It's bad practice. Yes, you are all right. But often reality is different. Game pr...The test ...