New Version with Map Reduce Framework sam query