From ec469a10abd0a24eb098839036ada75a2fa39fc0 Mon Sep 17 00:00:00 2001 From: Rucchao Date: Thu, 18 Feb 2021 09:41:24 +0200 Subject: [PATCH] Add Q Update the scale factor configuration --- .idea/workspace.xml | 227 +++++++++++++++++------- scale_factors.xml | 16 ++ src/main/scala-2.11/SocialNetwork.scala | 1 + src/main/scala-2.11/Unibench2_0.scala | 2 +- unibench_params.ini | 5 +- 5 files changed, 182 insertions(+), 69 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7ec0551..b7258d8 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -9,57 +9,141 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + @@ -96,6 +180,7 @@ + - + @@ -379,7 +471,8 @@ - @@ -405,13 +498,13 @@ - + - + @@ -428,8 +521,8 @@ - - + + @@ -437,8 +530,9 @@ - - + + + @@ -446,8 +540,9 @@ - - + + + @@ -455,8 +550,9 @@ - - + + + @@ -464,18 +560,19 @@ + - + - + diff --git a/scale_factors.xml b/scale_factors.xml index 07ed4dd..b9137f7 100644 --- a/scale_factors.xml +++ b/scale_factors.xml @@ -8,4 +8,20 @@ 1970 2010 + + 27000 + 2018 + 563433 + 2081754 + 1970 + 2010 + + + 73000 + 2018 + 1878110 + 6939180 + 1970 + 2010 + diff --git a/src/main/scala-2.11/SocialNetwork.scala b/src/main/scala-2.11/SocialNetwork.scala index e4f6c39..ad49231 100644 --- a/src/main/scala-2.11/SocialNetwork.scala +++ b/src/main/scala-2.11/SocialNetwork.scala @@ -15,6 +15,7 @@ object SocialNetwork { def graphGen(spark: SparkSession): Unit = { val scale_factor = spark.conf.get("scale_factor").toString + println("The scale factor is " +scale_factor) val xml = XML.loadFile("scale_factors.xml") val params = xml \\ "_" filter attributeValueEquals(scale_factor) val person_size=(params \ "numPersons" text).toInt diff --git a/src/main/scala-2.11/Unibench2_0.scala b/src/main/scala-2.11/Unibench2_0.scala index f02f350..063edb7 100644 --- a/src/main/scala-2.11/Unibench2_0.scala +++ b/src/main/scala-2.11/Unibench2_0.scala @@ -245,7 +245,7 @@ object Unibench2_0 { rootLogger.setLevel(Level.INFO) } spark.conf.set("scale_factor", params.getProperty("scale_factor", "1")) - spark.conf.set("feedback_factor", params.getProperty("feedback_factor", "1")) + //spark.conf.set("feedback_factor", params.getProperty("feedback_factor", "1")) spark.conf.set("rdf_factor", params.getProperty("rdf_factor", "0")) spark.conf.set("interest_table", "Unibench/Graph_SocialNetwork/PersonHasInterest/part-*.csv") spark.conf.set("Person_knows_Person", "Unibench/Graph_SocialNetwork/part-*.csv") diff --git a/unibench_params.ini b/unibench_params.ini index 77259e8..8ea0531 100644 --- a/unibench_params.ini +++ b/unibench_params.ini @@ -1,3 +1,2 @@ -scale_factor=1 -feedback_factor = 1 -rdf_factor=0.01 +scale_factor=10 +rdf_factor=0.03