@Override
    @SuppressWarnings("deprecation")
    public List<AgentEventBo> mapRow(Result result, int rowNum) throws Exception {
        if (result.isEmpty()) {
            return Collections.emptyList();
        }

        List<AgentEventBo> agentEvents = new ArrayList<>();
        for (Cell cell : result.rawCells()) {
            final int code = CellUtils.qualifierToInt(cell);
            final AgentEventType eventType = AgentEventType.getTypeByCode(code);
            if (eventType == null) {
                continue;
            }

            byte[] value = CellUtil.cloneValue(cell);
            final Buffer buffer = new FixedBuffer(value);

            final int version = buffer.readInt();
            switch (version) {
                case AgentEventBo.LEGACY_VERSION, AgentEventBo.CURRENT_VERSION -> {
                    final String agentId = buffer.readPrefixedString();
                    final long startTimestamp = buffer.readLong();
                    final long eventTimestamp = buffer.readLong();
                    final byte[] eventMessage = buffer.readPrefixedBytes();
                    final AgentEventBo agentEvent = new AgentEventBo(version, agentId, startTimestamp, eventTimestamp, eventType);
                    agentEvent.setEventBody(eventMessage);
                    agentEvents.add(agentEvent);
                }
            }
        }

        return agentEvents;
    }
@author HyunGil Jeong
@author jaehong.kim - Add case for version 1
web/src/main/java/com/navercorp/pinpoint/web/mapper/AgentEventMapper.java