Skip to content

Commit

Permalink
fixbug not loaded RealtimeCounters for Time #2
Browse files Browse the repository at this point in the history
  • Loading branch information
scouter-project committed Jun 13, 2015
1 parent 7a22dbe commit c39bcf5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
9 changes: 4 additions & 5 deletions scouter.server/src/scouter/server/db/ObjectRD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,12 @@ object ObjectRD {
val pack = new DataInputX(data).readPack().asInstanceOf[ObjectPack];
list.add(pack)
} catch {
case e: Exception => {
case e: Exception =>
e.printStackTrace();
false
}
case _:Throwable=> false
return list
case _: Throwable =>
return list
}
true
})
return list
}
Expand Down
4 changes: 2 additions & 2 deletions scouter.server/src/scouter/server/db/RealtimeCounterRD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import scouter.util.HashUtil
import scouter.util.StringEnumer

object RealtimeCounterRD {
def read(objName: String, date: String, handler: (Long, MapValue) => Boolean) {
def read(objName: String, date: String, handler: (Long, MapValue) => Any) {
val stime = DateUtil.yyyymmdd(date);
val etime = stime + DateUtil.MILLIS_PER_DAY;
read(objName, date, stime, etime, handler);
Expand Down Expand Up @@ -53,7 +53,7 @@ object RealtimeCounterRD {
readFromEnd(objName, date, stime, etime, handler);
}

def readFromEnd(objName: String, date: String, stime: Long, etime: Long, handler: (Long, MapValue) => Boolean) {
def readFromEnd(objName: String, date: String, stime: Long, etime: Long, handler: (Long, MapValue) => Any) {
var logdb: RealtimeCounterDBHelper = null;
try {
logdb = new RealtimeCounterDBHelper().open(objName, date, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class RealtimeCounterIndex(_file: String) extends IClose {
this.index.read(objHash, stime, etime, handler, dataMap, reader);
}

def readFromEnd(objHash: Int, stime: Long, etime: Long, handler: (Long, MapValue) => Boolean, dataMap: IntKeyMap[String],
def readFromEnd(objHash: Int, stime: Long, etime: Long, handler: (Long, MapValue) => Any, dataMap: IntKeyMap[String],
reader: (Long)=>Array[Byte]) {
if (this.index == null) {
this.index = new RealtimeCounterKeyFile(file);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class RealtimeCounterKeyFile(path: String) extends IndexTimeFile(path) {
}
}

def readFromEnd(objHash: Int, stime: Long, etime: Long, handler: (Long, MapValue) => Boolean,
def readFromEnd(objHash: Int, stime: Long, etime: Long, handler: (Long, MapValue) => Any,
dataMap: IntKeyMap[String], reader: (Long) => Array[Byte]): Unit = {
try {

Expand Down

0 comments on commit c39bcf5

Please sign in to comment.