From 4d097e9dbaa224967dcdbd38b0eae0f2b1d9c0ff Mon Sep 17 00:00:00 2001 From: Zack Dever Date: Fri, 10 Apr 2015 13:08:53 -0400 Subject: [PATCH] fix bug in casting stat to Long --- src/main/java/com/pinterest/secor/common/FileRegistry.java | 2 +- src/main/java/com/pinterest/secor/tools/ProgressMonitor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/pinterest/secor/common/FileRegistry.java b/src/main/java/com/pinterest/secor/common/FileRegistry.java index 360b6bfa2..ac0c05476 100644 --- a/src/main/java/com/pinterest/secor/common/FileRegistry.java +++ b/src/main/java/com/pinterest/secor/common/FileRegistry.java @@ -43,7 +43,7 @@ public class FileRegistry { private HashMap mCreationTimes; public FileRegistry(SecorConfig mConfig) { - this.mConfig = mConfig; + this.mConfig = mConfig; mFiles = new HashMap>(); mWriters = new HashMap(); mCreationTimes = new HashMap(); diff --git a/src/main/java/com/pinterest/secor/tools/ProgressMonitor.java b/src/main/java/com/pinterest/secor/tools/ProgressMonitor.java index 693433f7d..1e7c7850a 100644 --- a/src/main/java/com/pinterest/secor/tools/ProgressMonitor.java +++ b/src/main/java/com/pinterest/secor/tools/ProgressMonitor.java @@ -155,7 +155,7 @@ private void exportToStatsD(List stats) { .append(PERIOD) .append(tags.get(Stat.STAT_KEYS.PARTITION.getName())) .toString(); - client.recordGaugeValue(aspect, (Long)stat.get(Stat.STAT_KEYS.VALUE.getName())); + client.recordGaugeValue(aspect, Long.parseLong((String)stat.get(Stat.STAT_KEYS.VALUE.getName()))); } }