{"record":{"id":"ac8dddc450bd789b","repo":"apache/beam","slug":"failed-to-translate-bigtableoptions-to-bigtableconfig","errorCode":null,"errorMessage":"Failed to translate BigtableOptions to BigtableConfig","messagePattern":"Failed to translate BigtableOptions to BigtableConfig","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableConfigTranslator.java","lineNumber":454,"sourceCode":"            Credentials credentials =\n                ((CredentialOptions.UserSuppliedCredentialOptions) credOptions).getCredential();\n            builder.setCredentialFactory(FixedCredentialFactory.create(credentials));\n            break;\n          case SuppliedJson:\n            CredentialOptions.JsonCredentialsOptions jsonCredentialsOptions =\n                (CredentialOptions.JsonCredentialsOptions) credOptions;\n            builder.setCredentialFactory(\n                FixedCredentialFactory.create(\n                    GoogleCredentials.fromStream(jsonCredentialsOptions.getInputStream())));\n            break;\n          case None:\n            // pipelineOptions is ignored\n            PipelineOptions pipelineOptions = PipelineOptionsFactory.create();\n            builder.setCredentialFactory(NoopCredentialFactory.fromOptions(pipelineOptions));\n            break;\n        }\n      } catch (IOException e) {\n        throw new RuntimeException(\"Failed to translate BigtableOptions to BigtableConfig\", e);\n      }\n    }\n\n    return builder.build();\n  }\n\n  /** Translate BigtableOptions to BigtableReadOptions. */\n  static BigtableReadOptions translateToBigtableReadOptions(\n      BigtableReadOptions readOptions, BigtableOptions options) {\n    BigtableReadOptions.Builder builder = readOptions.toBuilder();\n    builder.setWaitTimeout(\n        org.joda.time.Duration.millis(options.getRetryOptions().getReadPartialRowTimeoutMillis()));\n    if (options.getCallOptionsConfig().getReadStreamRpcAttemptTimeoutMs().isPresent()) {\n      builder.setAttemptTimeout(\n          org.joda.time.Duration.millis(\n              options.getCallOptionsConfig().getReadStreamRpcAttemptTimeoutMs().get()));\n    }\n    builder.setOperationTimeout(","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableConfigTranslator.java#L436-L472","documentation":"translateToBigtableConfig reads BigtableOptions (instance id, project id, table id, and key/config files) via filesystem ValueProviders. If any IOException occurs while reading those files, the method throws RuntimeException('Failed to translate BigtableOptions to BigtableConfig') wrapping it. This means pipeline construction failed because BigtableOptions could not be converted into a BigtableConfig.","triggerScenarios":"BigtableOptions or BigtableReadOptions holds file-backed ValueProviders (e.g. key file, temp pipeline file, change stream names file) whose paths cannot be opened/read at translation time.","commonSituations":"Missing key file path in a distributed/runtime environment, wrong path or filename typo, file unreadable due to permissions, running on a worker where the file was not staged.","solutions":["Inspect the wrapped IOException cause to see which file path failed","Verify all file paths passed to BigtableOptions/BigtableReadOptions exist and are readable at translation time","Stage key/config files with --files or use GCS locations accessible to the pipeline","Pass credentials via Application Default Credentials instead of file paths to avoid file reads entirely"],"exampleFix":"// before\nBigtableOptions options = new BigtableOptions().withKeyFile(\"/local/missing.p12\");\n// after\nBigtableOptions options = new BigtableOptions(); // rely on ADC, or stage the file and use a correct, existing path","handlingStrategy":"validation","validationCode":"for (String path : ImmutableList.of(keyFile, tempFile, changeStreamNamesFile)) {\n  if (path != null && !new File(path).canRead()) {\n    throw new IllegalStateException(\"Bigtable options file not readable: \" + path);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  BigtableIO.write().withConfig(bigtableOptions).expand(rows);\n} catch (RuntimeException e) {\n  if (e.getCause() instanceof IOException) {\n    // inspect e.getCause() for the failing file path and fix staging/permissions\n  }\n  throw e;\n}","preventionTips":["Stage key/config files with the job (--files) or use GCS URIs accessible from workers","Prefer runtime-provided credentials (ADC) to eliminate file reads","Check file existence at pipeline-argument parsing time, before expansion"],"tags":["java","bigtable","io","configuration"],"backgroundTag":"file-read-failed","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}