iota-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tonyfaust...@apache.org
Subject [19/31] incubator-iota git commit: Removed scalastyle in feycore
Date Tue, 29 Nov 2016 23:29:18 GMT
Removed scalastyle in feycore


Project: http://git-wip-us.apache.org/repos/asf/incubator-iota/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-iota/commit/57916d76
Tree: http://git-wip-us.apache.org/repos/asf/incubator-iota/tree/57916d76
Diff: http://git-wip-us.apache.org/repos/asf/incubator-iota/diff/57916d76

Branch: refs/heads/master
Commit: 57916d76be9382f7c63f969edd2906c1c0af3cb3
Parents: bf4a280
Author: Shivansh <shiv4nsh@gmail.com>
Authored: Fri Nov 4 00:43:25 2016 +0530
Committer: Shivansh <shiv4nsh@gmail.com>
Committed: Fri Nov 4 00:43:25 2016 +0530

----------------------------------------------------------------------
 fey-core/src/main/scala/org/apache/iota/fey/FeyCore.scala | 3 +--
 fey-core/src/main/scala/org/apache/iota/fey/Monitor.scala | 8 ++++----
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/57916d76/fey-core/src/main/scala/org/apache/iota/fey/FeyCore.scala
----------------------------------------------------------------------
diff --git a/fey-core/src/main/scala/org/apache/iota/fey/FeyCore.scala b/fey-core/src/main/scala/org/apache/iota/fey/FeyCore.scala
index 3018d03..5e5522b 100644
--- a/fey-core/src/main/scala/org/apache/iota/fey/FeyCore.scala
+++ b/fey-core/src/main/scala/org/apache/iota/fey/FeyCore.scala
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -371,4 +370,4 @@ private object FEY_CACHE{
 }
 
 sealed case class OrchestrationInformation(ensembleSpecJson: List[JsObject], orchestrationID:
String,
-                                     orchestrationName: String, orchestrationTimestamp: String)
\ No newline at end of file
+                                     orchestrationName: String, orchestrationTimestamp: String)

http://git-wip-us.apache.org/repos/asf/incubator-iota/blob/57916d76/fey-core/src/main/scala/org/apache/iota/fey/Monitor.scala
----------------------------------------------------------------------
diff --git a/fey-core/src/main/scala/org/apache/iota/fey/Monitor.scala b/fey-core/src/main/scala/org/apache/iota/fey/Monitor.scala
index 2100cbd..4e0c3a4 100644
--- a/fey-core/src/main/scala/org/apache/iota/fey/Monitor.scala
+++ b/fey-core/src/main/scala/org/apache/iota/fey/Monitor.scala
@@ -87,8 +87,8 @@ protected class Monitor(eventsStore: Trie) extends Actor with ActorLogging
{
     case _ =>
   }
 
-  def logInfo(path:String, event:String, timestamp: Long, info:String, reason:Throwable =
null) = {
-    if(reason != null){
+  def logInfo(path:String, event:String, timestamp: Long, info:String, reason:Throwable =
null): Unit = {
+    if(Option(reason).isDefined){
       log.error(reason, s"$event | $timestamp | $path | $info")
     }else{
       log.info(s"$event | $timestamp | $path | $info")
@@ -123,13 +123,13 @@ protected object Monitor{
   }
 
   def mapEventsToRows(actors: ArrayBuffer[TrieNode], prefix:String): ArrayBuffer[String]
= {
-    actors.map(actor => {
+    actors.flatMap(actor => {
       val currentPath = if (prefix == "/user/FEY-CORE") actor.path else s"$prefix/${actor.path}"
       val events = actor.events.map(event => {
         getTableLine(currentPath, event.timestamp, event.event, event.info)
       })
       mapEventsToRows(actor.children, currentPath) ++ events
-    }).flatten
+    })
   }
 
   def getSimpleHTMLEvents: String = {


Mime
View raw message