[유치수] [NOBTS] prevent NPE.

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@888 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Chisu Yu
2012-11-21 10:25:33 +00:00
parent 4f340ed20c
commit 77c48d0bb4
@@ -13,6 +13,7 @@ import org.springframework.data.hadoop.hbase.RowMapper;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -38,6 +39,11 @@ public class SpanMapper implements RowMapper<List<SpanBo>> {
@Override
public List<SpanBo> mapRow(Result result, int rowNum) throws Exception {
byte[] rowKey = result.getRow();
if(rowKey == null) {
return Collections.emptyList();
}
long most = BytesUtils.bytesToFirstLong(rowKey);
long least = BytesUtils.bytesToSecondLong(rowKey);