...
Note that the instance of the object called at deployment is not the same instance of the object called at runtime. Because the result of the deployment stage is an immutable program specification, any local member variables set during deployment will not be available during runtime. This behavior can cause unexpected null-pointer exceptions. The solution is instead to set these as properties in the specification, which is available at runtime, as in the examples on initializing instance fields. For example, in a Spark program:
Code Block |
---|
getContext().getSpecification().getProperties()
|
Transactions
The relationship between transactions and lifecycle depends on the method involved:
...
The exception to this are Workers, which have to execute their own, explicit transactions. See workers and datasets for details.
Details on transactions in these methods are covered in the section on using the transaction system in programs.
...