Archive for September, 2011
RHEL6 has a nice new feature: LVM snapshot merging. This basically means that you can merge a snapshot back into it’s origin LV. RHEL installations normally have their OS installed on LVM (If you don’t, please reconsider. You don’t know what your missing).
inject() method is since Groovy 1.8.1 also available for Map objects. The closure arguments accepts two or three arguments. With the three-argument variant we get the key and value separately as arguments. Otherwise we get a map entry as closure argument.
Groovy’s SQL support allows us to access
ResultSetMetaData with a closure when we use the query methods
eachRow(). We can pass a closure as the last argument of these methods. The closure parameter is the
ResultSetMetaData object. The closure is only invoked once after the query is executed.
Groovy has great SQL support built-in. With just a few lines of code we can access a database and write SQL statements and execute them. To query data we can for example use the
rows() method. We pass a SQL query and we get a List of
GroovyResultSet objects back. But we can also use other methods like
For a long time we can simply get the text from an URL in Groovy. Since Groovy 1.8.1 we can set parameters to the underlying
URLConnection that is used to get the content. The parameters are passed as a Map to the
getText() method or to the
newInputStream() methods for an URL.
Today I had a problem starting the Windows Azure Compute Emulator. I got this error.
Since Groovy 1.8 we can use JSONBuilder to create JSON data structures. With Groovy 1.8.1 we have a variant of
JsonBuilder that will not create a data structure in memory, but will stream directly to a writer the JSON structure:
StreamingJsonBuilder. This is useful in situations where we don’t have to change the structure and need a memory efficient way to write JSON.
In Groovy we can use the
collectMany() method to transform items from a collection into a collection. The resulting collection is then flattened into a single collection. This means we can use the closure to return a collection with values and at the end all these collections are flattened into a single collection.
Once again, I wasn’t able to check on the site on the change of the month, and other (more, and less important) jobs interfered. But yesterday I blew the wiki – more on that later – so I had to get into the system anyway….
As to be expected, there were no surprises on the monthy cleanup. Mail statistics are in the logfile:
In my work I often deal with availability of infrastructure, especially when storage is involved. I am surprised by the enormous amount of completely different ways people think about availability and try to put it in workable specifications. From those variations and from various books that cover (parts) of this subject I have developed my own working model and apply it whenever possible.