• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TouK / nussknacker / 8552895512

04 Apr 2024 10:08AM UTC coverage: 82.692% (-0.02%) from 82.714%
8552895512

push

github

web-flow
Fix Scala case class with fields in body serialization

11 of 11 new or added lines in 1 file covered. (100.0%)

36 existing lines in 32 files now uncovered.

18017 of 21788 relevant lines covered (82.69%)

3.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
/engine/flink/executor/src/main/scala/pl/touk/nussknacker/engine/process/ProcessPartFunction.scala
1
package pl.touk.nussknacker.engine.process
2

3
import org.apache.flink.api.common.functions.RichFunction
4
import org.apache.flink.configuration.Configuration
5
import pl.touk.nussknacker.engine.graph.node.NodeData
6
import pl.touk.nussknacker.engine.process.compiler.FlinkProcessCompilerData
7
import pl.touk.nussknacker.engine.process.exception.FlinkExceptionHandler
8
import pl.touk.nussknacker.engine.splittedgraph.SplittedNodesCollector
9
import pl.touk.nussknacker.engine.splittedgraph.splittednode.SplittedNode
10

11
//Helper trait to deal with lifecycle of single process part (e.g. handling open/close)
12
trait ProcessPartFunction extends ExceptionHandlerFunction {
13

14
  protected def node: SplittedNode[_ <: NodeData]
15

16
  private val nodesUsed = SplittedNodesCollector.collectNodes(node).map(_.data)
9✔
17

18
  override def close(): Unit = {
19
    super.close()
1✔
UNCOV
20
    if (compilerData != null) {
×
21
      compilerData.close(nodesUsed)
1✔
22
    }
23
  }
24

25
  override def open(parameters: Configuration): Unit = {
26
    super.open(parameters)
1✔
27
    compilerData.open(getRuntimeContext, nodesUsed)
1✔
28
  }
29

30
}
31

32
//Helper trait dealing with ExceptionHandler lifecycle
33
trait ExceptionHandlerFunction extends RichFunction {
34

35
  def compilerDataForClassloader: ClassLoader => FlinkProcessCompilerData
36

37
  protected var exceptionHandler: FlinkExceptionHandler = _
38

39
  protected lazy val compilerData: FlinkProcessCompilerData = compilerDataForClassloader(
40
    getRuntimeContext.getUserCodeClassLoader
41
  )
42

43
  override def close(): Unit = {
44
    if (exceptionHandler != null) {
×
45
      exceptionHandler.close()
1✔
46
    }
47
  }
48

49
  override def open(parameters: Configuration): Unit = {
50
    exceptionHandler = compilerData.prepareExceptionHandler(getRuntimeContext)
1✔
51
  }
52

53
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc