Code review comment: Will this log be printed frequently when no more data to consume？

Code under review:
public boolean hasMoreDataToConsume(UUID taskId, Map<Integer, Long> partitionIdToOffset) throws UserException {
        for (Map.Entry<Integer, Long> entry : partitionIdToOffset.entrySet()) {
            if (cachedPartitionWithLatestOffsets.containsKey(entry.getKey())
                    && entry.getValue() < cachedPartitionWithLatestOffsets.get(entry.getKey())) {
                
                
                
                
                
                LOG.debug("has more data to consume. offsets to be consumed: {}, latest offsets: {}, task {}, job {}",
                        partitionIdToOffset, cachedPartitionWithLatestOffsets, taskId, id);
                return true;
            }
        }

        try {
            
            
            List<Pair<Integer, Long>> tmp = KafkaUtil.getLatestOffsets(id, taskId, getBrokerList(),
                    getTopic(), getConvertedCustomProperties(), Lists.newArrayList(partitionIdToOffset.keySet()));
            for (Pair<Integer, Long> pair : tmp) {
                cachedPartitionWithLatestOffsets.put(pair.first, pair.second);
            }
        } catch (Exception e) {
            LOG.warn("failed to get latest partition offset. {}", e.getMessage(), e);
            return false;
        }

        
        for (Map.Entry<Integer, Long> entry : partitionIdToOffset.entrySet()) {
            Integer partitionId = entry.getKey();
            if (cachedPartitionWithLatestOffsets.containsKey(partitionId)) {
                long partitionLatestOffset = cachedPartitionWithLatestOffsets.get(partitionId);
                long recordPartitionOffset = entry.getValue();
                if (recordPartitionOffset < partitionLatestOffset) {
                    LOG.debug("has more data to consume. offsets to be consumed: {},"
                            + " latest offsets: {}, task {}, job {}",
                            partitionIdToOffset, cachedPartitionWithLatestOffsets, taskId, id);
                    return true;
                } else if (recordPartitionOffset > partitionLatestOffset) {
                    String msg = "offset set in job: " + recordPartitionOffset
                                + " is greater than kafka latest offset: "
                                + partitionLatestOffset + " partition id: "
                                + partitionId;
                    throw new UserException(msg);
                }
            }
        }

        LOG.info("no more data to consume. offsets to be consumed: {}, latest offsets: {}, task {}, job {}",
                partitionIdToOffset, cachedPartitionWithLatestOffsets, taskId, id);
        return false;
    }

Line commented on: LOG.info("no more data to consume. offsets to be consumed: {}, latest offsets: {}, task {}, job {}",

Revised code:
public boolean hasMoreDataToConsume(UUID taskId, Map<Integer, Long> partitionIdToOffset) throws UserException {
        for (Map.Entry<Integer, Long> entry : partitionIdToOffset.entrySet()) {
            if (cachedPartitionWithLatestOffsets.containsKey(entry.getKey())
                    && entry.getValue() < cachedPartitionWithLatestOffsets.get(entry.getKey())) {
                
                
                
                
                
                LOG.debug("has more data to consume. offsets to be consumed: {}, latest offsets: {}, task {}, job {}",
                        partitionIdToOffset, cachedPartitionWithLatestOffsets, taskId, id);
                return true;
            }
        }

        try {
            
            
            List<Pair<Integer, Long>> tmp = KafkaUtil.getLatestOffsets(id, taskId, getBrokerList(),
                    getTopic(), getConvertedCustomProperties(), Lists.newArrayList(partitionIdToOffset.keySet()));
            for (Pair<Integer, Long> pair : tmp) {
                cachedPartitionWithLatestOffsets.put(pair.first, pair.second);
            }
        } catch (Exception e) {
            LOG.warn("failed to get latest partition offset. {}", e.getMessage(), e);
            return false;
        }

        
        for (Map.Entry<Integer, Long> entry : partitionIdToOffset.entrySet()) {
            Integer partitionId = entry.getKey();
            if (cachedPartitionWithLatestOffsets.containsKey(partitionId)) {
                long partitionLatestOffset = cachedPartitionWithLatestOffsets.get(partitionId);
                long recordPartitionOffset = entry.getValue();
                if (recordPartitionOffset < partitionLatestOffset) {
                    LOG.debug("has more data to consume. offsets to be consumed: {},"
                            + " latest offsets: {}, task {}, job {}",
                            partitionIdToOffset, cachedPartitionWithLatestOffsets, taskId, id);
                    return true;
                } else if (recordPartitionOffset > partitionLatestOffset) {
                    String msg = "offset set in job: " + recordPartitionOffset
                                + " is greater than kafka latest offset: "
                                + partitionLatestOffset + " partition id: "
                                + partitionId;
                    throw new UserException(msg);
                }
            }
        }

        LOG.debug("no more data to consume. offsets to be consumed: {}, latest offsets: {}, task {}, job {}",
                partitionIdToOffset, cachedPartitionWithLatestOffsets, taskId, id);
        return false;
    }