code: public synchronized void recordCommit(int commitLength) {
          Preconditions.checkArgument(commitLength >= 0, "commitLength must be a non-negative number.");
  
          // Update counters.
          this.commitCount++;
          this.accumulatedLength += commitLength;
  
          int minCount = this.config.getCheckpointMinCommitCount();
          int countThreshold = this.config.getCheckpointCommitCountThreshold();
          long lengthThreshold = this.config.getCheckpointTotalCommitLengthThreshold();
          if (this.commitCount >= minCount && (this.commitCount >= countThreshold || this.accumulatedLength >= lengthThreshold)) {
              // Reset counters.
              this.commitCount = 0;
              this.accumulatedLength = 0;
  
              // Invoke callback.
              this.executor.execute(this.createCheckpointCallback);
          }
      }
docs: Records that an operation with the given data length has been processed.
  
  @param commitLength The length of the commit (i.e., DataFrame).