{"record":{"id":"d12f8ca10acb188d","repo":"apache/iceberg","slug":"input-malformed-or-exceeded-maximum-multipart-uplo","errorCode":null,"errorMessage":"Input malformed or exceeded maximum multipart upload size 5GB: %s","messagePattern":"Input malformed or exceeded maximum multipart upload size 5GB: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java","lineNumber":635,"sourceCode":"            properties, MULTIPART_UPLOAD_THREADS, Runtime.getRuntime().availableProcessors());\n    this.isPathStyleAccess =\n        PropertyUtil.propertyAsBoolean(properties, PATH_STYLE_ACCESS, PATH_STYLE_ACCESS_DEFAULT);\n    this.isUseArnRegionEnabled =\n        PropertyUtil.propertyAsBoolean(\n            properties, USE_ARN_REGION_ENABLED, USE_ARN_REGION_ENABLED_DEFAULT);\n    this.isAccelerationEnabled =\n        PropertyUtil.propertyAsBoolean(\n            properties, ACCELERATION_ENABLED, ACCELERATION_ENABLED_DEFAULT);\n    this.isDualStackEnabled =\n        PropertyUtil.propertyAsBoolean(properties, DUALSTACK_ENABLED, DUALSTACK_ENABLED_DEFAULT);\n    this.isCrossRegionAccessEnabled =\n        PropertyUtil.propertyAsBoolean(\n            properties, CROSS_REGION_ACCESS_ENABLED, CROSS_REGION_ACCESS_ENABLED_DEFAULT);\n    try {\n      this.multiPartSize =\n          PropertyUtil.propertyAsInt(properties, MULTIPART_SIZE, MULTIPART_SIZE_DEFAULT);\n    } catch (NumberFormatException e) {\n      throw new IllegalArgumentException(\n          String.format(\n              \"Input malformed or exceeded maximum multipart upload size 5GB: %s\",\n              properties.get(MULTIPART_SIZE)));\n    }\n    this.multipartThresholdFactor =\n        PropertyUtil.propertyAsDouble(\n            properties, MULTIPART_THRESHOLD_FACTOR, MULTIPART_THRESHOLD_FACTOR_DEFAULT);\n    Preconditions.checkArgument(\n        multipartThresholdFactor >= 1.0, \"Multipart threshold factor must be >= to 1.0\");\n    Preconditions.checkArgument(\n        multiPartSize >= MULTIPART_SIZE_MIN,\n        \"Minimum multipart upload object size must be larger than 5 MB.\");\n    this.stagingDirectory =\n        PropertyUtil.propertyAsString(\n            properties, STAGING_DIRECTORY, System.getProperty(\"java.io.tmpdir\"));\n    String aclType = properties.get(ACL);\n    this.acl = ObjectCannedACL.fromValue(aclType);\n    Preconditions.checkArgument(","sourceCodeStart":617,"sourceCodeEnd":653,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java#L617-L653","documentation":"IllegalArgumentException thrown from the S3FileIOProperties constructor when the s3.multipart-size property cannot be parsed as an int (NumberFormatException from PropertyUtil.propertyAsInt). The multipart size must be a valid integer within the S3 multipart upload limits (up to 5GB per part); malformed or out-of-range values are rejected at S3FileIO construction time with this message.","triggerScenarios":"Constructing S3FileIO/S3FileIOProperties with properties containing s3.multipart-size set to a non-numeric string or a value exceeding Integer.MAX_VALUE (e.g. '6GB' as a plain string, or 6000000000).","commonSituations":"Setting s3.multipart-size=10GB and expecting byte-string parsing (only plain integers are supported); typos like '512 MB'; copying a Hadoop fs.s3a multipart setting name/value; value exceeding the 5GB S3 per-part limit expressed as an int-unparseable number.","solutions":["Set s3.multipart-size to a plain integer number of bytes within int range and >= 5MB (e.g. 104857600 for 100MB).","Remove any unit suffixes or formatting — the property does not accept '5GB' or '512MB' strings.","Verify the property key is s3.multipart-size and it isn't inheriting a bad value from an outer configuration (Spark conf, catalog properties).","If you need larger parts, note the S3 limit is 5GB per part — values above that are invalid regardless."],"exampleFix":"// before\nMap<String, String> props = Map.of(\"s3.multipart-size\", \"10GB\"); // NumberFormatException -> IllegalArgumentException\n// after\nMap<String, String> props = Map.of(\"s3.multipart-size\", String.valueOf(512 * 1024 * 1024)); // \"536870912\"","handlingStrategy":"validation","validationCode":"String multipartSize = properties.get(\"s3.multipart-size\");\nif (multipartSize != null) {\n  long v = Long.parseLong(multipartSize.trim()); // validate plain integer\n  if (v < 5 * 1024 * 1024 || v > Integer.MAX_VALUE) {\n    throw new IllegalArgumentException(\"s3.multipart-size must be 5MB..2GB integer bytes\");\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always specify s3.multipart-size as a plain integer byte count, no unit suffixes","Keep values >= 5MB (S3 minimum part size) and within int range","Check catalog/Spark conf layers for inherited bad values","Add a config sanity check at job startup before creating S3FileIO"],"tags":["aws","s3","configuration","multipart-upload"],"backgroundTag":"invalid-config-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}