Search in sources :

Example 1 with DefaultMetaDataRowKey

use of com.navercorp.pinpoint.common.server.bo.serializer.metadata.DefaultMetaDataRowKey in project pinpoint by naver.

the class HbaseSqlMetaDataDao method getSqlMetaData.

@Override
public List<SqlMetaDataBo> getSqlMetaData(String agentId, long time, int sqlId) {
    Objects.requireNonNull(agentId, "agentId");
    MetaDataRowKey metaDataRowKey = new DefaultMetaDataRowKey(agentId, time, sqlId);
    byte[] rowKey = getDistributedKey(rowKeyEncoder.encodeRowKey(metaDataRowKey));
    Get get = new Get(rowKey);
    get.addFamily(DESCRIPTOR.getName());
    TableName sqlMetaDataTableName = tableNameProvider.getTableName(DESCRIPTOR.getTable());
    return hbaseOperations2.get(sqlMetaDataTableName, get, sqlMetaDataMapper);
}
Also used : TableName(org.apache.hadoop.hbase.TableName) DefaultMetaDataRowKey(com.navercorp.pinpoint.common.server.bo.serializer.metadata.DefaultMetaDataRowKey) DefaultMetaDataRowKey(com.navercorp.pinpoint.common.server.bo.serializer.metadata.DefaultMetaDataRowKey) MetaDataRowKey(com.navercorp.pinpoint.common.server.bo.serializer.metadata.MetaDataRowKey) Get(org.apache.hadoop.hbase.client.Get)

Example 2 with DefaultMetaDataRowKey

use of com.navercorp.pinpoint.common.server.bo.serializer.metadata.DefaultMetaDataRowKey in project pinpoint by naver.

the class HbaseApiMetaDataDao method getApiMetaData.

@Override
@Cacheable(cacheNames = "apiMetaData", key = SPEL_KEY, cacheManager = CacheConfiguration.API_METADATA_CACHE_NAME)
public List<ApiMetaDataBo> getApiMetaData(String agentId, long time, int apiId) {
    Objects.requireNonNull(agentId, "agentId");
    MetaDataRowKey metaDataRowKey = new DefaultMetaDataRowKey(agentId, time, apiId);
    byte[] sqlId = getDistributedKey(rowKeyEncoder.encodeRowKey(metaDataRowKey));
    Get get = new Get(sqlId);
    get.addFamily(DESCRIPTOR.getName());
    TableName apiMetaDataTableName = tableNameProvider.getTableName(DESCRIPTOR.getTable());
    return hbaseOperations2.get(apiMetaDataTableName, get, apiMetaDataMapper);
}
Also used : TableName(org.apache.hadoop.hbase.TableName) DefaultMetaDataRowKey(com.navercorp.pinpoint.common.server.bo.serializer.metadata.DefaultMetaDataRowKey) DefaultMetaDataRowKey(com.navercorp.pinpoint.common.server.bo.serializer.metadata.DefaultMetaDataRowKey) MetaDataRowKey(com.navercorp.pinpoint.common.server.bo.serializer.metadata.MetaDataRowKey) Get(org.apache.hadoop.hbase.client.Get) Cacheable(org.springframework.cache.annotation.Cacheable)

Example 3 with DefaultMetaDataRowKey

use of com.navercorp.pinpoint.common.server.bo.serializer.metadata.DefaultMetaDataRowKey in project pinpoint by naver.

the class HbaseStringMetaDataDao method getStringMetaData.

@Override
public List<StringMetaDataBo> getStringMetaData(String agentId, long time, int stringId) {
    Objects.requireNonNull(agentId, "agentId");
    MetaDataRowKey metaDataRowKey = new DefaultMetaDataRowKey(agentId, time, stringId);
    byte[] rowKey = getDistributedKey(rowKeyEncoder.encodeRowKey(metaDataRowKey));
    Get get = new Get(rowKey);
    get.addFamily(DESCRIPTOR.getName());
    TableName stringMetaDataTableName = tableNameProvider.getTableName(DESCRIPTOR.getTable());
    return hbaseOperations2.get(stringMetaDataTableName, get, stringMetaDataMapper);
}
Also used : TableName(org.apache.hadoop.hbase.TableName) DefaultMetaDataRowKey(com.navercorp.pinpoint.common.server.bo.serializer.metadata.DefaultMetaDataRowKey) DefaultMetaDataRowKey(com.navercorp.pinpoint.common.server.bo.serializer.metadata.DefaultMetaDataRowKey) MetaDataRowKey(com.navercorp.pinpoint.common.server.bo.serializer.metadata.MetaDataRowKey) Get(org.apache.hadoop.hbase.client.Get)

Aggregations

DefaultMetaDataRowKey (com.navercorp.pinpoint.common.server.bo.serializer.metadata.DefaultMetaDataRowKey)3 MetaDataRowKey (com.navercorp.pinpoint.common.server.bo.serializer.metadata.MetaDataRowKey)3 TableName (org.apache.hadoop.hbase.TableName)3 Get (org.apache.hadoop.hbase.client.Get)3 Cacheable (org.springframework.cache.annotation.Cacheable)1