Advertisement
Guest User

Hanging on a JSON Parse

a guest
Oct 24th, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 2.34 KB | None | 0 0
  1. Logger.debug("Getting Child Data")
  2.       var parsedChildren = Map.empty[String, Seq[Long]]
  3.       getStormChildren(zkClient).map[Unit]({ childDatas =>
  4.         Logger.debug("Child Data Got")
  5.         childDatas map { childData: ZNode.Data =>
  6.           val data = new String(childData.bytes)
  7.           Logger.debug("Parsing")
  8.           JSON.parseFull(data) match {
  9.             case Some(map: Map[String, Any]) =>
  10.               Logger.debug("Parsed")
  11.               // Grab all the values we need to identify the nodes
  12.               val name = childData.path.split("/")(1)
  13.               Logger.debug(s"Name: $name")
  14.               val topic = map("topic").toString
  15.               Logger.debug(s"Topic: $topic")
  16.               val partition = map("partition").toString.toInt
  17.               Logger.debug(s"Partition: $partition")
  18.               val offset = map("offset").toString.toLong
  19.               Logger.debug(s"Offset: $offset")
  20.               Logger.debug("Values properly pulled")
  21.               val baseSeq: Seq[Long] = Seq.fill(numPartitions)(0)
  22.  
  23.  
  24.  
  25.  
  26.  
  27. [info] Set current project to kafka-web-console (in build file:/home/ubuntu/app/kafka-web-console/)
  28.  
  29. (Starting server. Type Ctrl+D to exit logs, the server will remain in background)
  30.  
  31. Play server process ID is 28417
  32. [info] play - database [default] connected at jdbc:h2:file:play
  33. [info] play - Starting application default Akka system.
  34. [info] play - Application started (Prod)
  35. [info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
  36. log4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper).
  37. log4j:WARN Please initialize the log4j system properly.
  38. [debug] application - Getting partition leaders for topic meter_data_production
  39. [debug] application - Getting partition log sizes for topic meter_data_production from partition leaders 10.160.9.103:9092, 10.160.9.23:9092
  40. [debug] application - Getting partition owners for topic meter_data_production
  41. [debug] application - Getting partition offsets for topic meter_data_production
  42. [debug] application - Getting Kafka partition offsets
  43. [debug] application - Getting Child Data
  44. [debug] application - Child Data Got
  45. [debug] application - Parsing
  46. [debug] application - Parsed
  47. [debug] application - Name: ratt-usage-topology-qa
  48. [debug] application - Topic: alerting_cleangrain_qa
  49. [info] play - Shutdown application default Akka system.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement