ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject ignite git commit: IGNITE-6723: Fix to ScalarCreditRiskExample: changed type from scala sequence to scala Array for member of serialized closure. This closes #2919.
Date Tue, 24 Oct 2017 14:43:34 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-2.3 10afc0394 -> 89fdca84e


IGNITE-6723: Fix to ScalarCreditRiskExample: changed type from scala sequence to scala Array
for member of serialized closure. This closes #2919.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/89fdca84
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/89fdca84
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/89fdca84

Branch: refs/heads/ignite-2.3
Commit: 89fdca84e82e112cc90c20b8d88cfc0f663977a1
Parents: 10afc03
Author: tledkov-gridgain <tledkov@gridgain.com>
Authored: Tue Oct 24 17:42:00 2017 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Tue Oct 24 17:43:24 2017 +0300

----------------------------------------------------------------------
 .../apache/ignite/scalar/examples/ScalarCreditRiskExample.scala  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/89fdca84/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCreditRiskExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCreditRiskExample.scala
b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCreditRiskExample.scala
index 1b0d767..e3ba001 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCreditRiskExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCreditRiskExample.scala
@@ -68,7 +68,7 @@ object ScalarCreditRiskExample {
             // aware if method was executed just locally or on the 100s of cluster nodes.
             // Credit risk crdRisk is the minimal amount that creditor has to have
             // available to cover possible defaults.
-            val crdRisk = ignite$ @< (closures(ignite$.cluster().nodes().size(), portfolio,
horizon, iter, percentile),
+            val crdRisk = ignite$ @< (closures(ignite$.cluster().nodes().size(), portfolio.toArray,
horizon, iter, percentile),
                 (s: Seq[Double]) => s.sum / s.size, null)
 
             println("Credit risk [crdRisk=" + crdRisk + ", duration=" +
@@ -86,7 +86,7 @@ object ScalarCreditRiskExample {
      * @param percentile Percentile.
      * @return Collection of closures.
      */
-    private def closures(clusterSize: Int, portfolio: Seq[Credit], horizon: Int, iter: Int,
+    private def closures(clusterSize: Int, portfolio: Array[Credit], horizon: Int, iter:
Int,
         percentile: Double): Seq[() => Double] = {
         val iterPerNode: Int = math.round(iter / clusterSize.asInstanceOf[Float])
         val lastNodeIter: Int = iter - (clusterSize - 1) * iterPerNode


Mime
View raw message