com.opendatagroup.hadrian.jvmcompiler
Check the clock and raise a PFATimeoutException if a method has taken too long.
Check the clock and raise a PFATimeoutException if a method has taken too long.
Called in loops and user-defined functions.
ClassLoader in which this scoring engine and its compiled types are compiled.
Access to the scoring engine's global lock.
Access to the scoring engine's global lock.
Used by snapshot
and other methods that need to block changes in the scoring engine.
The "actionsFinished" symbol, counting the number of times the "action" method has finished without exceptions, which can be accessed within PFA.
The "actionsStarted" symbol, counting the number of times the "action" method has started, which can be accessed within PFA.
Perform an analysis of a cell using a user-defined function.
Perform an analysis of a cell using a user-defined function.
the name of the cell
a function to perform some analysis of the cell to which it is applied; note that this function must not change the cell's state
whatever analysis
returns
Note that the analysis
function is called exactly once.
Perform an analysis of a pool using a user-defined functions.
Perform an analysis of a pool using a user-defined functions.
the name of the pool
a function to perform some analysis of each item in the pool; note that this function must not change the pool's state
a map from pool item name to whatever analysis
returns for that pool item
Note that the analysis
function is called as many times as there are items in the pool.
Create an Avro iterator (subclass of java.util.Iterator
) over Avro-serialized input data.
Create an Avro iterator (subclass of java.util.Iterator
) over Avro-serialized input data.
The objects produced by this iterator are suitable inputs to the action
method.
serialized data
unserialized data
Create an output stream for Avro-serializing scoring engine output.
Create an output stream for Avro-serializing scoring engine output.
Return values from the action
method (or outputs captured by an emit
callback) are suitable for writing to this stream.
the name of a file that will be overwritten by output.
an output stream with an append
method for appending output data objects and a close
method for flushing the buffer and closing the stream.
Create an output stream for Avro-serializing scoring engine output.
Create an output stream for Avro-serializing scoring engine output.
Return values from the action
method (or outputs captured by an emit
callback) are suitable for writing to this stream.
a file that will be overwritten by output.
an output stream with an append
method for appending output data objects and a close
method for flushing the buffer and closing the stream.
Create an output stream for Avro-serializing scoring engine output.
Create an output stream for Avro-serializing scoring engine output.
Return values from the action
method (or outputs captured by an emit
callback) are suitable for writing to this stream.
the raw output stream onto which Avro bytes will be written.
an output stream with an append
method for appending output data objects and a close
method for flushing the buffer and closing the stream.
Determine call depth of a function by traversing the callGraph
.
Determine call depth of a function by traversing the callGraph
.
name of function to look up
set of functions to exclude
used by recursion to count
integral number representing call depth as a Double
, with positive infinity as a possible result
Graph of which functions can call which other functions in the engine.
Graph of which functions can call which other functions in the engine.
Map from function name (special forms in parentheses) to the set of all functions it calls. This map can be traversed as a graph by repeated application.
Determine which functions are called by fcnName
by traversing the callGraph
backward.
Determine which functions are called by fcnName
by traversing the callGraph
backward.
name of function to look up
set of functions to exclude
set of functions that can call fcnName
Map from cell name to reflected Java field for the cells that should be rolled back in case of an exception.
Abstract syntax tree that was used to create this engine.
Create an iterator over CSV-serialized input data.
Create an iterator over CSV-serialized input data.
The objects produced by this iterator are suitable inputs to the action
method.
Note that only records of primitives can be read from CSV because of the nature of the CSV format.
serialized data
format description for Apache commons-csv
unserialized data
Create an output stream for CSV-serializing scoring engine output.
Create an output stream for CSV-serializing scoring engine output.
Return values from the action
method (or outputs captured by an emit
callback) are suitable for writing to this stream.
Note that only records of primitives can be written to CSV because of the nature of the CSV format.
the raw output stream onto which CSV bytes will be written.
format description for Apache commons-csv
if true
, write field names as the first line of the file.
an output stream with an append
method for appending output data objects and a close
method for flushing the buffer and closing the stream.
A org.apache.avro.specific.SpecificDatumReader
object specialized for this PFAEngine in its personal java.lang.ClassLoader
.
Convert data from Avro to a live object using this engine's custom classes.
Convert data from Avro to a live object using this engine's custom classes.
Avro data
data type
object that can be used in this engine
Convert data from Avro to a live object using this engine's custom classes.
Convert data from Avro to a live object using this engine's custom classes.
Avro data
Avro schema
object that can be used in this engine
Translate data that might have been deserialized by Avro into objects suitable for this PFAEngine's action
.
Translate data that might have been deserialized by Avro into objects suitable for this PFAEngine's action
.
objects that may be Avro generic or Avro specific objects (note that Avro specific objects are subclasses of Avro generic objects)
objects that can be input for this PFAEngine's action
.
Convert data from JSON to a live object using this engine's custom classes.
Convert data from JSON to a live object using this engine's custom classes.
JSON data
data type
object that can be used in this engine
Convert data from JSON to a live object using this engine's custom classes.
Convert data from JSON to a live object using this engine's custom classes.
JSON data
Avro schema
object that can be used in this engine
Translate data that might have come from any PFAEngine class (not necessarily this one) into objects suitable for this PFAEngine's action
.
Translate data that might have come from any PFAEngine class (not necessarily this one) into objects suitable for this PFAEngine's action
.
objects that may have been output from another type of PFAEngine's action
, snapshotCell
, or snapshotPool
.
objects that can be input for this PFAEngine's action
.
Determine if the call depth of a function is infinite.
Determine if the call depth of a function is infinite.
name of function to check
true
if the function can eventually call itself through a function that it calls, false
otherwise
Determine if a function modifies the scoring engine's persistent state.
Determine if a function modifies the scoring engine's persistent state.
name of function to check
true
if the function can eventually call (cell-to)
or (pool-to)
on any cell or pool.
Internally called by a new PFAEngine when it is first created.
Internally called by a new PFAEngine when it is first created.
abstract syntax tree representing the contents of the PFA file
initialization options that will be used to override any found in the PFA file
optional shared state object used to link scoring engines (can include objects that maintain state through external databases)
reference to this instance's class, via Java reflection
context object from the type-checked abstract syntax tree
instance number to assign
Class object for the input type.
Get the AvroType of the input.
Instance number, non-zero if this engine is part of a collection of scoring engines make from the same PFA file.
Determine if a function is directly recursive.
Determine if a function is directly recursive.
name of function to check
true
if the function directly calls itself, false
otherwise
Deserialize one JSON datum as suitable input to the action
method.
Deserialize one JSON datum as suitable input to the action
method.
Create an iterator over JSON-serialized input data.
Create an iterator over JSON-serialized input data.
The objects produced by this iterator are suitable inputs to the action
method.
unserialized data
Create an iterator over JSON-serialized input data.
Create an iterator over JSON-serialized input data.
The objects produced by this iterator are suitable inputs to the action
method.
unserialized data
Create an iterator over JSON-serialized input data.
Create an iterator over JSON-serialized input data.
The objects produced by this iterator are suitable inputs to the action
method.
serialized data
unserialized data
Serialize one datum from the action
method as JSON.
Create an output stream for JSON-serializing scoring engine output.
Create an output stream for JSON-serializing scoring engine output.
Writes one JSON object per line.
Return values from the action
method (or outputs captured by an emit
callback) are suitable for writing to this stream.
the name of a file that will be overwritten by output.
an output stream with an append
method for appending output data objects and a close
method for flushing the buffer and closing the stream.
Create an output stream for JSON-serializing scoring engine output.
Create an output stream for JSON-serializing scoring engine output.
Writes one JSON object per line.
Return values from the action
method (or outputs captured by an emit
callback) are suitable for writing to this stream.
a file that will be overwritten by output.
an output stream with an append
method for appending output data objects and a close
method for flushing the buffer and closing the stream.
Create an output stream for JSON-serializing scoring engine output.
Create an output stream for JSON-serializing scoring engine output.
Writes one JSON object per line.
Return values from the action
method (or outputs captured by an emit
callback) are suitable for writing to this stream.
the raw output stream onto which Avro bytes will be written.
an output stream with an append
method for appending output data objects and a close
method for flushing the buffer and closing the stream.
Externally supplied function for handling log output from PFA.
Externally supplied function for handling log output from PFA.
By default, prints to standard out.
Arguments:
Some(namespace)
for filtering log messages or None
The "metadata" field of the original PFA file as a PFAMap that can be accessed within PFA.
Report whether this is a PFAMapEngine, PFAEmitEngine, or a PFAFoldEngine
Get the AvroType of each compiled type.
Implementation-specific configuration options.
Class object for the output type.
Get the AvroType of the output.
Map from pool name to reflected Java field for the pools that should be rolled back in case of an exception.
The random number generator used by this particular scoring engine instance.
The random number generator used by this particular scoring engine instance.
Note that if a randseed
is given in the PFA file but a collection of scoring engines are generated from it, each scoring engine instance will have a different random generator seeded by a different seed.
Revert a scoring engine to the state it had when it was first initialized.
Revert a scoring engine to the state it had when it was first initialized.
shared state object to use in re-initialization
Revert a scoring engine to the state it had when it was first initialized.
Internally called to actually roll back the state of the scoring engine.
Internally called to save the state of some cells and pools so that they can be rolled back in case of an exception.
Temporary copies of initial cell state for cells to be rolled back.
Temporary copies of initial pool state for cells to be rolled back.
Take a snapshot of the entire scoring engine (all cells and pools) and represent it as an abstract syntax tree that can be used to make new scoring engines.
Take a snapshot of the entire scoring engine (all cells and pools) and represent it as an abstract syntax tree that can be used to make new scoring engines.
Note that you can call toJson
on the EngineConfig
to get a string that can be written to a PFA file.
Take a snapshot of one cell and represent it using objects specialized to this class (see above).
Take a snapshot of one cell and represent it using objects specialized to this class (see above).
the name of the cell
an object that may contain internal PFA data, such as instances of classes that are only found in this engine's custom classLoader
.
Take a snapshot of one pool and represent it using objects specialized to this class (see above).
Take a snapshot of one pool and represent it using objects specialized to this class (see above).
the name of the pool
a Map from pool item name to objects that may contain internal PFA data, such as instances of classes that are only found in this engine's custom classLoader
.
An org.apache.avro.specific.SpecificData
object specialized for this PFAEngine in its personal java.lang.ClassLoader
.
Convert data to Avro.
Convert data to Avro.
object reference
data type
Avro bytes
Convert data to Avro.
Convert data to Avro.
object reference
Avro schema
Avro bytes
Convert data to JSON.
Convert data to JSON.
object reference
data type
JSON string
Convert data to JSON.
Convert data to JSON.
object reference
Avro schema
JSON string
The parser used to interpret Avro types in the PFA document, which may be used to find compiled types used by this engine.
Abstract class for interface PFAEngine; defines some functions in the Hadrian JAR so they don't have to be defined in auto-generated Java.