Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Feature/flink jena #14

Merged
merged 28 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
44067c4
Flink reasoning with Jena datastructures.
LorenzBuehmann Jun 26, 2018
24d641b
Merge branch 'develop' into feature/flink-jena
LorenzBuehmann Jun 27, 2018
2df2c0c
Cont. Flink RDF
LorenzBuehmann Jun 27, 2018
7d231ec
Minor Pom changes
LorenzBuehmann Dec 9, 2016
272f0e7
Flink reasoning with Jena datastructures.
LorenzBuehmann Jun 26, 2018
69624cf
Cont. Flink RDF
LorenzBuehmann Jun 27, 2018
8719a31
Use RDF layer for loading/writing
LorenzBuehmann Jun 16, 2019
ec65954
Merge branch 'feature/flink-jena' of github.com:SANSA-Stack/SANSA-Inf…
LorenzBuehmann Jun 16, 2019
4d99e4f
Key type wrapper.
LorenzBuehmann Jun 17, 2019
fc07298
Flink needs either key type or key selector function for join()
LorenzBuehmann Jun 17, 2019
be1bf6f
Minor changes in main entry class, e.g. always write to disk and bump…
LorenzBuehmann Jun 17, 2019
3a34c4a
Merge branch 'develop' into feature/flink-jena
LorenzBuehmann Jun 18, 2019
095b5a0
boolean function utils.
LorenzBuehmann Jun 27, 2019
04effc9
POM cleanup
LorenzBuehmann Jun 27, 2019
3dd33b9
Merge remote-tracking branch 'origin/feature/0.6.0-SNAPSHOT' into fea…
LorenzBuehmann Jun 27, 2019
d5e6b6c
Utils simplified
LorenzBuehmann Jun 27, 2019
7cf311c
Extended test output if test fails.
LorenzBuehmann Jun 27, 2019
f66a9e0
Simplified conversion from RDD[Triple] to Jena Model
LorenzBuehmann Jun 27, 2019
79e2e3a
minor changes in I/O
LorenzBuehmann Jun 27, 2019
9da7479
subtraction operation for Flink DataSet with Jena Triple
LorenzBuehmann Jun 27, 2019
2e84e5b
Improved Flink conformance test setup
LorenzBuehmann Jun 27, 2019
89394b0
log output of test base class
LorenzBuehmann Jun 27, 2019
af1ff94
Flink conformance test clean up
LorenzBuehmann Jun 28, 2019
8a4d6d3
Flink reasoning on Triple DataSet
LorenzBuehmann Jun 28, 2019
634099a
Added missing deps for dist package
LorenzBuehmann Jun 28, 2019
2ddb2f9
Minor
LorenzBuehmann Jun 28, 2019
b5e03b2
Scalastyle cleanup
LorenzBuehmann Jun 28, 2019
50260fe
Merge branch 'develop' into feature/flink-jena
GezimSejdiu Jun 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improved Flink conformance test setup
  • Loading branch information
LorenzBuehmann committed Jun 27, 2019
commit 2e84e5b2068bd9026d2f9f39e642f78e3c43976a
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,13 @@ import org.scalatest.{BeforeAndAfterAll, Suite}
* @author Lorenz Buehmann
*/
@RunWith(classOf[Parameterized])
trait SharedOWLHorstReasonerContext extends BeforeAndAfterAll with ReasonerContextProvider{
trait SharedOWLHorstReasonerContext
extends SharedReasonerContext[ForwardRuleReasonerOWLHorst] {
self: Suite =>

@transient private var _reasoner: ForwardRuleReasonerOWLHorst = _

val reasoner: ForwardRuleReasoner = _reasoner

@transient private var _env: ExecutionEnvironment = _
def env: ExecutionEnvironment = _env


override def beforeAll(): Unit = {
super.beforeAll()
_env = ExecutionEnvironment.getExecutionEnvironment
_reasoner = new ForwardRuleReasonerOWLHorst(env)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package net.sansa_stack.inference.flink.conformance
import net.sansa_stack.inference.flink.forwardchaining.{ForwardRuleReasoner, ForwardRuleReasonerRDFS}
import net.sansa_stack.inference.rules.RDFSLevel
import org.apache.flink.api.scala.ExecutionEnvironment
import org.apache.flink.test.util.AbstractTestBase
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
import org.scalatest.{BeforeAndAfterAll, Suite}
Expand All @@ -13,20 +14,12 @@ import org.scalatest.{BeforeAndAfterAll, Suite}
* @author Lorenz Buehmann
*/
@RunWith(classOf[Parameterized])
trait SharedRDFSReasonerContext extends BeforeAndAfterAll with ReasonerContextProvider{
trait SharedRDFSReasonerContext
extends SharedReasonerContext[ForwardRuleReasonerRDFS] {
self: Suite =>

@transient private var _reasoner: ForwardRuleReasonerRDFS = _
def reasoner: ForwardRuleReasoner = _reasoner

@transient private var _env: ExecutionEnvironment = _
def env: ExecutionEnvironment = _env


override def beforeAll(): Unit = {
super.beforeAll()
_env = ExecutionEnvironment.getExecutionEnvironment
_env.getConfig.disableSysoutLogging()
_reasoner = new ForwardRuleReasonerRDFS(env)
_reasoner.level = RDFSLevel.SIMPLE
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package net.sansa_stack.inference.flink.conformance

import net.sansa_stack.rdf.common.kryo.jena.JenaKryoSerializers.{NodeSerializer, TripleSerializer}
import org.apache.flink.api.scala.ExecutionEnvironment
import org.apache.flink.runtime.testutils.MiniClusterResourceConfiguration
import org.apache.jena.graph.{Node, Triple}
import org.scalatest.{BeforeAndAfterAll, Suite}

import net.sansa_stack.inference.flink.forwardchaining.ForwardRuleReasoner

/**
* A shared reasoner and Flink environment used for multiple test cases using the same resources.
*
* @author Lorenz Buehmann
*/
trait SharedReasonerContext[R <: ForwardRuleReasoner]
extends BeforeAndAfterAll
with ReasonerContextProvider {
self: Suite =>

@transient protected var _reasoner: R = _
def reasoner: R = _reasoner

@transient private var _env: ExecutionEnvironment = _
def env: ExecutionEnvironment = _env

override def beforeAll(): Unit = {
super.beforeAll()
_env = ExecutionEnvironment.getExecutionEnvironment
_env.setParallelism(4)
_env.getConfig.disableSysoutLogging()
_env.getConfig.addDefaultKryoSerializer(classOf[Triple], classOf[TripleSerializer])
_env.getConfig.addDefaultKryoSerializer(classOf[Node], classOf[NodeSerializer])
}

import org.apache.flink.test.util.MiniClusterWithClientResource
import org.junit.ClassRule

private val DEFAULT_PARALLELISM = 4

@ClassRule val miniClusterResource = new MiniClusterWithClientResource(
new MiniClusterResourceConfiguration.Builder()
.setNumberTaskManagers(1)
.setNumberSlotsPerTaskManager(DEFAULT_PARALLELISM)
.build
)

}