Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run google/fhir-data-pipes/pipelines/batch uber JAR in Google Cloud Functions locally? #254

Open
muhammad-levi opened this issue Nov 23, 2023 · 1 comment
Labels
P3 question Further information is requested

Comments

@muhammad-levi
Copy link

I tried the following command after building the uber JAR of google/fhir-data-pipes/pipelines/batch:

java -jar java-function-invoker-1.3.1.jar \
    --classpath /d/SourceCodes/google/fhir-data-pipes/pipelines/batch/target/batch-bundled.jar \
    --target com.google.fhir.analytics.FhirEtl

and here is the error logs:

2023-11-23 16:19:50.971:INFO::main: Logging initialized @96ms to org.eclipse.jetty.util.log.StdErrLog
Exception in thread "main" java.lang.RuntimeException: Could not determine function signature type from target com.google.fhir.analytics.FhirEtl. Either this should be a class implementing one of the interfaces in com.google.cloud.functions, or the environment variable FUNCTION_SIGNATURE_TYPE should be set to "http" or "event".
        at com.google.cloud.functions.invoker.runner.Invoker.servletForDeducedSignatureType(Invoker.java:393)
        at com.google.cloud.functions.invoker.runner.Invoker.startServer(Invoker.java:298)
        at com.google.cloud.functions.invoker.runner.Invoker.startServer(Invoker.java:244)
        at com.google.cloud.functions.invoker.runner.Invoker.main(Invoker.java:127)

Also, how to pass arguments to the uber JAR of the function in question? For example, if running the uber JAR directly, we can do it like this:

PATH_TO_THE_UBER_JAR=/d/SourceCodes/google/fhir-data-pipes/pipelines/batch/target/batch-bundled.jar && \
java -jar ${PATH_TO_THE_UBER_JAR} \
    --fhirServerUrl=http://fhir-server-bkkbn:8092/fhir \
    --resourceList=Patient,Practitioner \
    --fhirSinkPath=http://fhir-server-central:8098/fhir

More advanced, can we use Google Cloud Functions parallelism and supply different arguments values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants