public void track(JobID jobId, BlobKey blobKey, long size) {
        checkNotNull(jobId);
        checkNotNull(blobKey);
        checkArgument(size >= 0);

        synchronized (lock) {
            if (caches.putIfAbsent(Tuple2.of(jobId, blobKey), size) == null) {
                blobKeyByJob.computeIfAbsent(jobId, ignore -> new HashSet<>()).add(blobKey);

                total += size;
                if (total > sizeLimit) {
                    LOG.warn(
                            "The overall size of BLOBs in the cache exceeds "
                                    + "the limit. Limit = [{}], Current: [{}], "
                                    + "The size of next BLOB: [{}].",
                            sizeLimit,
                            total,
                            size);
                }
            } else {
                LOG.warn(
                        "Attempt to track a duplicated BLOB. This may indicate a duplicate upload "
                                + "or a hash collision. Ignoring newest upload. "
                                + "JobID = [{}], BlobKey = [{}]",
                        jobId,
                        blobKey);
            }
        }
    }
@Test
    void testTrack() {
        assertThat(tracker.getSize(jobId, blobKey)).isEqualTo(3L);
        assertThat(tracker.getBlobKeysByJobId(jobId)).contains(blobKey);
    }