First two examples from mahout cookbook.