• Check internet connectivity in Android

    When programming an Android App you sometimes want to check, if you are connected to the Internet. The first thing that comes to mind is using the ConenctivityManager. Yet this solution has the problem that it only tells you that you are connected to .. something. With a WiFi connection this can mean, that you…

  • Scalding hiding NPEs in “operator Each failed executing operation”

    Yesterday I was surprised by a failing Scalding task. Everything worked fine locally and all I git was like “job failed, see cluster log”. In the cluster log I saw the following: 2014-10-24 14:38:41,222 INFO org.apache.hadoop.mapred.TaskInProgress: Error from attempt_201410101555_2230_m_000005_3: cascading.pipe.OperatorException: [com.twitter.scalding.T…][com.twitter.scalding.RichPipe.each(RichPipe.scala:471)] operator Each failed executing operation at cascading.flow.stream.FunctionEachStage.receive(FunctionEachStage.java:107) at cascading.flow.stream.FunctionEachStage.receive(FunctionEachStage.java:39) at cascading.flow.stream.FunctionEachStage$1.collect(FunctionEachStage.java:80) at cascading.tuple.TupleEntryCollector.safeCollect(TupleEntryCollector.java:145) at…

  • Enable output compression in Scalding

    I just wanted to enable final output compression in one of my Scalding jobs (because I needed to reorganize a some-TB-data set). Unfortunately scalding always produced uncompressed files. After some googling, I came across a github issue that adressed exactly this problem. Via some links I got the sample code from this repo which can…

  • Scalding Exception: diverging implicit expansion for type com.twitter.algebird.Semigroup[T]

    I was just doing a again some scalding jobs and again got an .. interesting exception: In a groupBy operation, I wanted to sum something up using: And was rewarded with this one: WTF?? Solution: Spot the mistake? It’s the missing type hint at sum:

  • Enable MySQL Streaming in Cascading / Scalding

    Last week I ran into a an ugly problem of Scalding: I needed to read a really large table from MySQL to process it in a certain job. In generall this is trivial: just use a JDBC Source, select your columns and that’s it. Usually we do this by using 1-3 parallel connections to the…

  • Compiling Cascading: FAILURE: Build failed with an exception.

    Today I ran into a really stupid error message when I tried to recompile cascading-jdbc: Evaluating root project ‘cascading-jdbc’ using build file ‘/home/…/cascading-jdbc/build.gradle’. FAILURE: Build failed with an exception. * Where: Build file ‘/home/…/cascading-jdbc/build.gradle’ line: 68 * What went wrong: A problem occurred evaluating root project ‘cascading-jdbc’. > Could not find method create() for arguments…

  • RaspberryPi Desktop Sharing via VNC

    The problem: Raspberry connected to a TV / share the desktop When connecting a RapsberryPi to a screen or TV to show something you surely would like to remote control the RasPi not only via shell (SSH) but also via VNC to see exactly what is displayed on the remote screen. So what we are…

  • RaspberryPi Weatherstation – The TV Station (Part III)

    The third and last post of this series describes the RasperryPi that is connected to the TV and displays the sensor data in a visually appealing way. Part 1 – Part 2 – Part 3 In the past blog post, the first Raspberry Pi was connected to several sensors. Tiny Python scripts poll the data…

  • How to make Html Links in Android Text View work

    The task itself is easy: You have a TextView which should show a clickable link to open a WebPage. As ususal, there are several ways to achieve the goal. The nasty thing is: if you mix them, they might no longer work. And also, some sometimes work, sometimes they don’t. As it took me a…

  • IllegalStateException: Content has been consumed

    When working with Android or (to be more general) Apache HttpComponents, one should keep in mind that it depends on the HttpResponses (Api: Apache, Android) if they can be consumed multiple times or not. And if the response is not, then better triple check your code, what you’re doing. I experiences the (very ugly) issue during the…