Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
qishipengqsp committed Aug 22, 2024
1 parent b17eaf3 commit ad62be7
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,21 @@ class ActivityGenerator()(implicit spark: SparkSession)
DatagenParams.companyInvestedFraction,
sampleRandom.nextLong()
)
.mapPartitionsWithIndex((index, targets) => {
.mapPartitionsWithIndex { (index, targets) =>
personInvestEvent.resetState(index)
companyInvestEvent.resetState(index)
personInvestEvent
.personInvestPartition(persons.value.asJava, targets.toList.asJava)
companyInvestEvent
.companyInvestPartition(companies.value.asJava, targets.toList.asJava)
targets.map(target => target.scaleInvestmentRatios())
})

companyRDD
.companyInvestPartition(
companies.value.asJava,
targets.toList.asJava
)
targets.map { target =>
target.scaleInvestmentRatios()
target
}
}
}

def signInEvent(
Expand Down

0 comments on commit ad62be7

Please sign in to comment.