package cn.wise.sc.energy.power.plant.business.dataware;

import com.spring4all.spring.boot.starter.hbase.api.RowMapper;
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.client.Result;

/**
 * @author: neo.shu
 * @create: 2020-09-29 22:38
 **/
public class PointRowKeyMapper implements RowMapper<PointDataFromHbase> {

    @Override
    public PointDataFromHbase mapRow(Result result, int rowNum) {

        Cell cell = (result.rawCells())[0];
        //System.out.println("查询到hbase时间戳==============="+cell.getTimestamp());
        return PointDataFromHbase.builder().timeStamp(cell.getTimestamp())
                .build();
    }
}
