{"record":{"id":"db8c7cce092d3bf7","repo":"apache/flink","slug":"entropy-length-must-be-0-when-entropy-injection","errorCode":null,"errorMessage":"Entropy length must be >= 0 when entropy injection key is set","messagePattern":"Entropy length must be >= 0 when entropy injection key is set","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/FlinkS3FileSystem.java","lineNumber":254,"sourceCode":"     * @param entropyInjectionKey The substring that will be replaced by entropy or removed.\n     * @param entropyLength The number of random alphanumeric characters to inject as entropy.\n     */\n    public FlinkS3FileSystem(\n            FileSystem hadoopS3FileSystem,\n            @Nullable S5CmdConfiguration s5CmdConfiguration,\n            String localTmpDirectory,\n            @Nullable String entropyInjectionKey,\n            int entropyLength,\n            @Nullable S3AccessHelper s3UploadHelper,\n            long s3uploadPartSize,\n            int maxConcurrentUploadsPerStream) {\n\n        super(hadoopS3FileSystem);\n\n        this.s5CmdConfiguration = s5CmdConfiguration;\n\n        if (entropyInjectionKey != null && entropyLength <= 0) {\n            throw new IllegalArgumentException(\n                    \"Entropy length must be >= 0 when entropy injection key is set\");\n        }\n\n        this.entropyInjectionKey = entropyInjectionKey;\n        this.entropyLength = entropyLength;\n\n        // recoverable writer parameter configuration initialization\n        this.localTmpDir = Preconditions.checkNotNull(localTmpDirectory);\n        this.tmpFileCreator = RefCountedTmpFileCreator.inDirectories(new File(localTmpDirectory));\n        this.s3AccessHelper = s3UploadHelper;\n        this.uploadThreadPool = Executors.newCachedThreadPool();\n\n        checkArgument(s3uploadPartSize >= S3_MULTIPART_MIN_PART_SIZE);\n        this.s3uploadPartSize = s3uploadPartSize;\n        this.maxConcurrentUploadsPerStream = maxConcurrentUploadsPerStream;\n        LOG.info(\"Created Flink S3 FS, s5Cmd configuration: {}\", s5CmdConfiguration);\n    }\n","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/FlinkS3FileSystem.java#L236-L272","documentation":"Error \"Entropy length must be >= 0 when entropy injection key is set\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: Entropy length must be >= 0 when entropy injection key is set.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Entropy length must be >= 0 when entropy injection key is set.","solutions":["Address the cause reported by the error message: Entropy length must be >= 0 when entropy injection key is set","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"Entropy length must be >= 0 when entropy injection key is set\") and rerun the job or command.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}