Hkube enable debugging algorithm on your local IDE as part of a pipeline executed on the cluster
After executing the following job you suspect that the "yellow" node does not calculate its output properly and you wish to debug it in your local IDE
HKUBE has four options for debug algorithm:
Obtaining the debugging URL
TBD
In order to debug your algorithm locally, install the "HKUBE wrapper" package
After installing the "HKUBE wrapper" package add the following code to your project and start debugging :
from hkube_python_wrapper import Algorunner import algorithm.main as algorithm #the path of you "start" function def main(): print("starting algorithm runner") Algorunner.Debug("<the debugging URL>",algorithm.start) if __name__ == "__main__": main()
const NodejsWrapper = require('@hkube/nodejs-wrapper'); const alg = require("./hkubeApiImage") //the path of you "start" function const main = async () => { NodejsWrapper.debug("<the debugging URL>",alg) } main()
Setup a run debug java configuration
io.hkube:wrapper:2.0-SNAPSHOT
(also found in https://oss.sonatype.org/content/repositories/snapshots)io.hkube:wrapper:2.0-SNAPSHOT
and its dependencies.Name | Description |
---|---|
ALGORITHM_ENTRY_POINT | The name of the class you wrote implementing IAlgorithm. |
WORKER_SOCKET_URL | path obtained from a the debug algorithm defined on hkube deployment. e.g. ws://playground.hkube.org/hkube/debug/something |
Instead of setting these environment variables, you can also add a config.properties file to the running classpath root directory and set these environment variable names as keys.
WORKER_SOCKET_URL=ws://playground.hkube.org/hkube/debug/something ALGORITHM_ENTRY_POINT=Algorithm
To avoid the program attempting to load the algorithm from a jar, 'debug' should be given as a program argument.