From a4084f28c984e286b5ccd9f2c18530b5e1f2f2bc Mon Sep 17 00:00:00 2001 From: Woonduk Kang Date: Tue, 30 Oct 2012 07:17:22 +0000 Subject: [PATCH] =?UTF-8?q?[=EA=B0=95=EC=9A=B4=EB=8D=95]=20[LUCYSUS-1744]?= =?UTF-8?q?=20agendid=EC=9D=98=20limit=20=EB=84=98=EC=9D=84=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=EB=A9=94=EC=8B=9C=EC=A7=80=EB=A5=BC=20=EC=B0=8D?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD.=20=EB=84=98=EC=9D=84?= =?UTF-8?q?=20=EA=B2=BD=EC=9A=B0=EC=9D=98=20=ED=9B=84=EC=B2=98=EB=A6=AC?= =?UTF-8?q?=EA=B0=80=20=EB=B6=80=EC=A1=B1=ED=95=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-server/trunk@833 84d0f5b1-2673-498c-a247-62c4ff18d310 --- .../java/com/profiler/server/dao/HbaseJvmInfoDao.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/profiler/server/dao/HbaseJvmInfoDao.java b/src/main/java/com/profiler/server/dao/HbaseJvmInfoDao.java index 24085b41b..807fc8527 100644 --- a/src/main/java/com/profiler/server/dao/HbaseJvmInfoDao.java +++ b/src/main/java/com/profiler/server/dao/HbaseJvmInfoDao.java @@ -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); } }