]]>http://ole-martin.net/min-shopping-av-musikk/feed/2It’s pi-day pipshttp://ole-martin.net/its-pi-day-pips/
http://ole-martin.net/its-pi-day-pips/#commentsSat, 14 Mar 2009 09:41:39 +0000ole-martinhttp://ole-martin.net/?p=73For all you circle lovers out there, today is the day to celebrate! Pi-day is coming to town!

The first reference to pi came in 2000 b.f.c. from the Babylons, their value was 3.125. The value of pi has become more and more accurate over the years, and many major cultures have been involved. The latest big breakthrough came from the distributed computing project PiHex who computed the 1,000,000,000,000,000:th bit of pi, which turned out to be 0.

http://ole-martin.net/its-pi-day-pips/feed/0The power of remixhttp://ole-martin.net/the-power-of-remix/
http://ole-martin.net/the-power-of-remix/#commentsWed, 11 Mar 2009 14:14:12 +0000ole-martinhttp://ole-martin.net/?p=69ThruYou is a great new project from Kutimann. What he has done is take small parts of existing YouTube videos and created new songs and videos. The end result is freakin great:

This is a picture I shot in Tallinn a couple of weeks ago. I love the color and shape of it

]]>http://ole-martin.net/tallinn-architecture/feed/0Do you want a Spotify invite?http://ole-martin.net/do-you-want-a-spotify-invite/
http://ole-martin.net/do-you-want-a-spotify-invite/#commentsWed, 14 Jan 2009 21:39:00 +0000ole-martinhttp://ole-martin.net/?p=58I have five Spotify invites laying around. If you want one, leave a comment under this post and I’ll mail you one.

Remember to leave a correct email address.

You have to use the invite within a couple of hours, or it will be revoked.

]]>http://ole-martin.net/do-you-want-a-spotify-invite/feed/61HBase tutorial for beginnershttp://ole-martin.net/hbase-tutorial-for-beginners/
http://ole-martin.net/hbase-tutorial-for-beginners/#commentsMon, 22 Dec 2008 14:42:12 +0000adminhttp://ole-martin.net/?p=49This post is old. Most of the code does not compile at the moment!

First of all, HBase is a column oriented database. However, you have to forget everything you have learned about tables, columns and rows in the RDBMS world. The data in an HBase instance is layed out more like a hashtable, and the data is immutable. Whenever you update the data, you are actually just creating a new version of it.

I used Apple OSX 10.5.6 in this tutorial, I am not sure if this will work on windows and linux.

The goal for this tutorial is to create a model for a blog with integration from a java program.

Get started

Download from the latest stable release from apache. I went with the hbase-0.18.1 release.

Unpack it, for instance to ~/hbase

Edit ~/hbase/conf/hbase-env.sh and set the correct JAVA_HOME variable.

Start hbase by running ~/hbase/bin/start-hbase.sh

Create a table

Start the hbase shell by running ~/hbase/bin/hbase shell

Run create ‘blogposts’, ‘post’, ‘image’ in the shell

Now you have a table called blogposts, with a post, and a image family. These families are “static” like the columns in the RDBMS world.

Add some data to the table

Run the following commands in the shell:

put ‘blogposts’, ‘post1′, ‘post:title’, ‘Hello World’

put ‘blogposts’, ‘post1′, ‘post:author’, ‘The Author’

put ‘blogposts’, ‘post1′, ‘post:body’, ‘This is a blog post’

put ‘blogposts’, ‘post1′, ‘image:header’, ‘image1.jpg’

put ‘blogposts’, ‘post1′, ‘image:bodyimage’, ‘image2.jpg’

Look at the data

Run get ‘blogposts’, ‘post1′ in the shell. This should output something like this.

COLUMN

CELL

image:bodyimage

timestamp=1229953133260, value=image2.jpg

image:header

timestamp=1229953110419, value=image1.jpg

post:author

timestamp=1229953071910, value=The Author

post:body

timestamp=1229953072029, value=This is a blog post

post:title

timestamp=1229953071791, value=Hello World

Summary part1

So, what have we accomplished so far? We have created a table and added one ‘record’ to it. This record consists of the blogpost itself, and the images attached to it. So, how do we retrieve those data from a java application?

Integrate with HBase from Java

In order to integrate with HBase you will need the following jar files in your classpath: