Sessionize is a SQL-MapReduce function. Sample code is included with the Aster SQLMapReduce Java API.