I have a flink application. I use an object inside the map function. Like this:
.map(value => {
import spray.json._
import com.webtrekk.sObjects._
import com.webtrekk.jsonProtocol._
import com.webtrekk.salesforce._
implicit val effortProcessing = streamProcessor.Effort
implicit val effortConsulting = effortConsultingFormat
var effort = value.toString.parseJson.convertTo[effortConsulting]
streamProcessor.Effort.mapping(
value.toString.parseJson.convertTo[effortConsulting]
)
effort
})
The streamProcessor is a object. Inside this object is another service object for the database. Flink executes this map function every time when an event comes to the application. What i want to know: Is the object every time the identical singleton object?
An example:
-> event comes to the application -> map function will execute and a singleton object will created
-> next event comes to the application -> map function will execute again -> object will called again
Is the second object the identical instance?