{"record":{"id":"be574ca44ebcc864","repo":"apache/hadoop","slug":"permitspersecond-must-be-0","errorCode":null,"errorMessage":"permitsPerSecond must be > 0","messagePattern":"permitsPerSecond must be > 0","errorType":"validation","errorClass":"InvalidConfigurationValueException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AggregateMetricsManager.java","lineNumber":60,"sourceCode":"\n  // Map of account name to MetricsBucket.\n  private final ConcurrentHashMap<String, MetricsBucket> buckets =\n      new ConcurrentHashMap<>();\n\n  // Scheduler for periodic dispatching of metrics.\n  private final ScheduledExecutorService scheduler;\n\n  // Private constructor to enforce singleton pattern.\n  private AggregateMetricsManager(final long dispatchIntervalInMins,\n      final int permitsPerSecond) throws InvalidConfigurationValueException {\n\n    if (dispatchIntervalInMins <= 0) {\n      throw new InvalidConfigurationValueException(\n          \"dispatchIntervalInMins must be > 0\");\n    }\n\n    if (permitsPerSecond <= 0) {\n      throw new InvalidConfigurationValueException(\n          \"permitsPerSecond must be > 0\");\n    }\n\n    rateLimiter = new SimpleRateLimiter(permitsPerSecond);\n\n    // Initialize scheduler for periodic dispatching of metrics.\n    this.scheduler = Executors.newSingleThreadScheduledExecutor(r -> {\n      Thread t = new Thread(r, \"ABFS-Aggregated-Metrics-Dispatcher\");\n      t.setDaemon(true);\n      return t;\n    });\n\n    // Schedule periodic dispatching of metrics.\n    this.scheduler.scheduleWithFixedDelay(\n        this::dispatchMetrics,\n        dispatchIntervalInMins,\n        dispatchIntervalInMins,\n        TimeUnit.MINUTES);","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AggregateMetricsManager.java#L42-L78","documentation":"Error \"permitsPerSecond must be > 0\" thrown in apache/hadoop.","triggerScenarios":"AggregateMetricsManager rate limiting is configured with a non-positive permits-per-second value.","commonSituations":"See trigger scenarios.","solutions":["Set the rate limiter permits-per-second value to a positive number.","Correct the fs.azure metrics/throughput configuration property."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}