GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-java
How to run `google/fhir-data-pipes/pipelines/batch` uber JAR in Google Cloud Functions locally?
- 主要語言
- Java
- 星號
- 154
- 分支
- 63
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I tried the following command after building the uber JAR of [`google/fhir-data-pipes/pipelines/batch`](https://github.com/google/fhir-data-pipes/tree/master/pipelines/batch):
```bash
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:
```bash
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?
貢獻指南
研究方向
從 pipelines/batch 入口點 com.google.fhir.analytics.FhirEtl 以及 issue 中所示的 java-function-invoker 命令開始。檢查此目標如何公開給 Google Cloud Functions、如何設定引數,以及平行呼叫是否支援不同的值;記錄受支援的本機呼叫與設定步驟。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- google-cloud, java
- 領域
- backend, cloud
- Issue 類型
- 文件
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100