Permalink
Browse files

refactoring - mainly removing commented code

  • Loading branch information...
1 parent 71f3a49 commit 5d3bfe5a02bb23b2d1e8c73e8b6dc790592848a4 @debasishg committed Dec 16, 2011
@@ -31,19 +31,6 @@ object FileUtils {
closeReader(_:BufferedReader),
enumReader(_:BufferedReader, i))
- /**
- def enumReader[A](r: BufferedReader, it: IterV[String, A]): IO[IterV[String, A]] = {
- def loop: IterV[String, A] => IO[IterV[String, A]] = {
- case i@Done(_, _) => io(i)
- case i@Cont(k) => for {
- s <- io { r.readLine }
- a <- if (s == null) io(i) else loop(k(El(s)))
- } yield a
- }
- loop(it)
- }
- **/
-
def enumReader[A](r: BufferedReader, it: IterV[String, A]): IO[IterV[String, A]] = {
def loop(x: IterV[String, A]): IterV[String, A] = x match {
case Done(_, _) => x
@@ -55,6 +42,5 @@ object FileUtils {
io { loop(it) }
}
-
val repeatHead = repeat[String, Option[String], List](head[String])
}
@@ -51,7 +51,6 @@ trait ReconEngine[T, V] {
def fromSource1(fs: (String, ReconSource[T])): Option[ReconDef[T]] = {
val (file, src) = fs
- val start = System.currentTimeMillis
import src._
val a = process(file) :-> (x => CollectionDef(id + runDate.toString, x.flatten.flatten))
a match {
@@ -177,14 +176,6 @@ trait ReconEngine[T, V] {
}
}
res.size
-// clients.withClient {client =>
-// res map {_ =>
-// Map[ReconRez, Option[Int]](
-// Match -> (client.hgetall[String, MatchList[V]](matchHashKey).map(_.keySet.size)),
-// Break -> (client.hgetall[String, MatchList[V]](breakHashKey).map(_.keySet.size)),
-// Unmatch -> (client.hgetall[String, MatchList[V]](unmatchHashKey).map(_.keySet.size)))
-// }
-// }
}
def consolidateWith(pastDate: LocalDate) (implicit clients: RedisClientPool, m: Monoid[V], s: Semigroup[MatchList[V]], p: Parse[MatchList[V]], f: Format) = {
@@ -24,13 +24,5 @@ object Util {
(implicit m: Format[MatchList[V]]) = tobinary(l)
def deSerializeMatchList[V](bytes: Array[Byte])
- (implicit m: Format[MatchList[V]]) = {
- try {
- frombinary[MatchList[V]](bytes)
- } catch {
- case th: Throwable =>
- println("***** from deserialize: " + new String(bytes, "UTF-8"))
- sys.error(th.getMessage)
- }
- }
+ (implicit m: Format[MatchList[V]]) = frombinary[MatchList[V]](bytes)
}

0 comments on commit 5d3bfe5

Please sign in to comment.