{"record":{"id":"cf4847045bbd725f","repo":"apache/beam","slug":"unknown-distribution-type-s","errorCode":null,"errorMessage":"Unknown distribution type: %s","messagePattern":"Unknown distribution type: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/synthetic/src/main/java/org/apache/beam/sdk/io/synthetic/SyntheticOptions.java","lineNumber":291,"sourceCode":"        case \"zipf\":\n          {\n            double param = node.get(\"param\").asDouble();\n            final double multiplier =\n                node.has(\"multiplier\") ? node.get(\"multiplier\").asDouble() : 1.0;\n            checkArgument(\n                param > 1,\n                \"The parameter of the Zipf distribution should be > 1, but found %s.\",\n                param);\n            checkArgument(\n                multiplier >= 0,\n                \"The multiplier of the Zipf distribution should be >= 0, but found %s.\",\n                multiplier);\n            final ZipfDistribution dist = new ZipfDistribution(100, param);\n            return scaledSampler(fromIntegerDistribution(dist), multiplier);\n          }\n        default:\n          {\n            throw new IllegalArgumentException(\"Unknown distribution type: \" + type);\n          }\n      }\n    }\n  }\n\n  public void validate() {\n    checkArgument(\n        keySizeBytes > 0, \"keySizeBytes should be a positive number, but found %s\", keySizeBytes);\n    checkArgument(\n        valueSizeBytes >= 0,\n        \"valueSizeBytes should be a non-negative number, but found %s\",\n        valueSizeBytes);\n    checkArgument(\n        numHotKeys >= 0, \"numHotKeys should be a non-negative number, but found %s\", numHotKeys);\n    checkArgument(\n        hotKeyFraction >= 0,\n        \"hotKeyFraction should be a non-negative number, but found %s\",\n        hotKeyFraction);","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/synthetic/src/main/java/org/apache/beam/sdk/io/synthetic/SyntheticOptions.java#L273-L309","documentation":"SyntheticOptions' distribution deserializer builds the random data distribution from a type name (e.g., UNIFORM, ZIPF, EXP, DEV_DELAYS) used by Beam's synthetic sources. If the configured distribution type string doesn't match any known case, deserialize throws IllegalArgumentException naming the unknown type.","triggerScenarios":"Passing synthetic source options JSON (e.g., to SyntheticBoundedSource or the load-test pipeline) with a 'distributionType'/'type' field whose value doesn't match any supported enum constant.","commonSituations":"Typos in test-pipeline JSON options (e.g., 'zip' instead of 'zipf'), copying options from an older Beam version whose enum set differed, or case sensitivity issues in type names.","solutions":["Check the exact type string in your options JSON against the supported values in SyntheticOptions (case-sensitive).","Use a known type such as UNIFORM, ZIPF, or EXP as listed in the DelayType/Distribution enum in this Beam version.","Refer to the Beam version's SyntheticOptions source/docs for the current enum set, since values change between releases."],"exampleFix":"// before (options JSON)\n{\"numRecords\": 1000, \"distributionType\": \"GAUSSIAN\"}\n// after\n{\"numRecords\": 1000, \"distributionType\": \"UNIFORM\"}","handlingStrategy":"validation","validationCode":"// Java — check the distribution type string before deserializing options\nSet<String> known = Set.of(\"UNIFORM\", \"ZIPF\", \"EXP\");\nif (!known.contains(type)) {\n  throw new IllegalArgumentException(\"distributionType must be one of \" + known);\n}","typeGuard":null,"tryCatchPattern":"try {\n  SyntheticOptions options = SyntheticOptions.fromJsonString(json);\n} catch (IllegalArgumentException e) {\n  // unknown distribution type: fix the type field in the options JSON\n}","preventionTips":["Match the type string exactly to the enum constant (case-sensitive).","Keep options JSON in sync with the Beam version in use.","Validate options with SyntheticOptions.validate() before pipeline launch."],"tags":["apache-beam","java","synthetic-source","options-parsing"],"backgroundTag":"invalid-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}