You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spot.apache.org by ra...@apache.org on 2017/06/20 20:08:01 UTC

[2/2] incubator-spot git commit: Updated InputOutputDataHandler.scala and SuspiciousConnects.scala with changes based on code review.

Updated InputOutputDataHandler.scala and SuspiciousConnects.scala with
changes based on code review.


Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/541a681a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/541a681a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/541a681a

Branch: refs/heads/master
Commit: 541a681a3b59a8d2484fd9d551165464c753b66e
Parents: ef50560
Author: Ricardo Barona <ri...@intel.com>
Authored: Tue Jun 20 12:09:46 2017 -0500
Committer: Ricardo Barona <ri...@intel.com>
Committed: Tue Jun 20 12:09:46 2017 -0500

----------------------------------------------------------------------
 .../src/main/scala/org/apache/spot/SuspiciousConnects.scala   | 3 ++-
 .../apache/spot/utilities/data/InputOutputDataHandler.scala   | 7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/541a681a/spot-ml/src/main/scala/org/apache/spot/SuspiciousConnects.scala
----------------------------------------------------------------------
diff --git a/spot-ml/src/main/scala/org/apache/spot/SuspiciousConnects.scala b/spot-ml/src/main/scala/org/apache/spot/SuspiciousConnects.scala
index 909ef74..f3f122e 100644
--- a/spot-ml/src/main/scala/org/apache/spot/SuspiciousConnects.scala
+++ b/spot-ml/src/main/scala/org/apache/spot/SuspiciousConnects.scala
@@ -89,7 +89,8 @@ object SuspiciousConnects {
             import sparkSession.implicits._
             resultRecords.map(_.mkString(config.outputDelimiter)).rdd.saveAsTextFile(config.hdfsScoredConnect)
 
-            // SPOT-172: need to use FileSystem for proxy.
+            // SPOT-172 (https://issues.apache.org/jira/browse/SPOT-172)
+            // We need to use FileSystem for proxy.
             analysis match {
               case "flow" => InputOutputDataHandler
                 .mergeResultsFileUtil(sparkSession, config.hdfsScoredConnect, analysis, logger)

http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/541a681a/spot-ml/src/main/scala/org/apache/spot/utilities/data/InputOutputDataHandler.scala
----------------------------------------------------------------------
diff --git a/spot-ml/src/main/scala/org/apache/spot/utilities/data/InputOutputDataHandler.scala b/spot-ml/src/main/scala/org/apache/spot/utilities/data/InputOutputDataHandler.scala
index e47fba6..ede46c2 100644
--- a/spot-ml/src/main/scala/org/apache/spot/utilities/data/InputOutputDataHandler.scala
+++ b/spot-ml/src/main/scala/org/apache/spot/utilities/data/InputOutputDataHandler.scala
@@ -74,7 +74,7 @@ object InputOutputDataHandler {
       }
     }
     else logger.info(s"Couldn't find results in $hdfsScoredConnect." +
-      s"Please check previous logs to see if there were errors.")
+      s"Please check for SuspiciousConnects or Spark logs to see if there were errors.")
   }
 
   def mergeResultsFileSystem(sparkSession: SparkSession,
@@ -88,7 +88,8 @@ object InputOutputDataHandler {
     val exists = fileSystem.exists(new org.apache.hadoop.fs.Path(hdfsScoredConnect))
 
     if (exists) {
-      // SPOT-172. Seems like FilUtil.copyMerge is not behaving well with Proxy data. Besides, it's deprecated after
+      // SPOT-172 (https://issues.apache.org/jira/browse/SPOT-172)
+      // Seems like FilUtil.copyMerge is not behaving well with Proxy data. Besides, it's deprecated after
       // Hadoop 2.7.x
       // Using spark to merge result files
       val tmpFileStr = s"${hdfsScoredConnect}/tmp"
@@ -122,7 +123,7 @@ object InputOutputDataHandler {
       }
     }
     else logger.info(s"Couldn't find results in $hdfsScoredConnect." +
-      s"Please check previous logs to see if there were errors.")
+      s"Please check for SuspiciousConnects or Spark logs to see if there were errors.")
   }
 
 }