use of com.navercorp.pinpoint.common.server.bo.StringMetaDataBo in project pinpoint by naver.
the class HbaseStringMetaDataDao method insert.
@Override
public void insert(TStringMetaData stringMetaData) {
if (stringMetaData == null) {
throw new NullPointerException("stringMetaData must not be null");
}
if (logger.isDebugEnabled()) {
logger.debug("insert:{}", stringMetaData);
}
final StringMetaDataBo stringMetaDataBo = new StringMetaDataBo(stringMetaData.getAgentId(), stringMetaData.getAgentStartTime(), stringMetaData.getStringId());
final byte[] rowKey = getDistributedKey(stringMetaDataBo.toRowKey());
Put put = new Put(rowKey);
String stringValue = stringMetaData.getStringValue();
byte[] sqlBytes = Bytes.toBytes(stringValue);
put.addColumn(HBaseTables.STRING_METADATA_CF_STR, HBaseTables.STRING_METADATA_CF_STR_QUALI_STRING, sqlBytes);
hbaseTemplate.put(HBaseTables.STRING_METADATA, put);
}
Aggregations