use of com.navercorp.pinpoint.common.server.bo.SqlMetaDataBo in project pinpoint by naver.
the class SpanServiceImpl method collisionSqlIdCodeMessage.
private String collisionSqlIdCodeMessage(int sqlId, List<SqlMetaDataBo> sqlMetaDataList) {
// TODO need a separate test case to test for hashCode collision (probability way too low for easy replication)
StringBuilder sb = new StringBuilder(64);
sb.append("Collision Sql sqlId:");
sb.append(sqlId);
sb.append('\n');
for (int i = 0; i < sqlMetaDataList.size(); i++) {
if (i != 0) {
sb.append("or\n");
}
SqlMetaDataBo sqlMetaDataBo = sqlMetaDataList.get(i);
sb.append(sqlMetaDataBo.getSql());
}
return sb.toString();
}
use of com.navercorp.pinpoint.common.server.bo.SqlMetaDataBo in project pinpoint by naver.
the class SqlMetaDataMapper method mapRow.
@Override
public List<SqlMetaDataBo> mapRow(Result result, int rowNum) throws Exception {
if (result.isEmpty()) {
return Collections.emptyList();
}
final byte[] rowKey = getOriginalKey(result.getRow());
final MetaDataRowKey key = decoder.decodeRowKey(rowKey);
List<SqlMetaDataBo> sqlMetaDataList = new ArrayList<>();
for (Cell cell : result.rawCells()) {
String sql = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength());
if (SQL_METADATA_CF_SQL_QUALI_SQLSTATEMENT.equals(sql)) {
sql = Bytes.toString(cell.getValueArray(), cell.getValueOffset(), cell.getValueLength());
}
SqlMetaDataBo sqlMetaDataBo = new SqlMetaDataBo(key.getAgentId(), key.getAgentStartTime(), key.getId(), sql);
sqlMetaDataList.add(sqlMetaDataBo);
}
return sqlMetaDataList;
}
Aggregations