[강운덕] [LUCYSUS-1744] agendid의 limit 넘을 경우 메시지를 찍도록 변경. 넘을 경우의 후처리가 부족함.

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-server/trunk@833 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Woonduk Kang
2012-10-30 07:17:22 +00:00
parent 5f46e0cd0b
commit a4084f28c9
@@ -3,6 +3,8 @@ package com.profiler.server.dao;
import com.profiler.common.dto.thrift.JVMInfoThriftDTO;
import com.profiler.common.hbase.HbaseOperations2;
import com.profiler.common.util.RowKeyUtils;
import com.profiler.common.util.SpanUtils;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.util.Bytes;
import org.springframework.beans.factory.annotation.Autowired;
@@ -30,13 +32,9 @@ public class HbaseJvmInfoDao implements JvmInfoDao {
byte[] getRowKey(JVMInfoThriftDTO jvmInfoThriftDTO) {
String agentId = jvmInfoThriftDTO.getAgentId();
// agentId의 제한 필요?
// 24byte
byte[] agnetIdBytes = Bytes.toBytes(agentId);
long currentTime = jvmInfoThriftDTO.getDataTime();
byte[] buffer = new byte[agnetIdBytes.length + 8];
Bytes.putBytes(buffer, 0, agnetIdBytes, 0, agnetIdBytes.length);
Bytes.putLong(buffer, agnetIdBytes.length, currentTime);
return buffer;
return RowKeyUtils.concatFixedByteAndLong(agnetIdBytes, SpanUtils.AGENT_NAME_LIMIT, currentTime);
}
}