@Override public boolean hasNext() {
    /*
    Poll more records from Kafka queue IF:
    Initial poll -> (records == null)
      OR
    Need to poll at least one more record (consumerPosition < endOffset) AND consumerRecordIterator is empty (!hasMore)
    */
    if (!hasMore && consumerPosition < endOffset || records == null) {
      pollRecords();
      findNext();
    }
    return hasMore;
  }
Check if there is more records to be consumed and pull more from the broker if current batch of record is empty.
This method might block up to {@link this#pollTimeoutMs} to pull records from Kafka Broker.

@throws PollTimeoutException if poll returns 0 record and consumer position did not reach requested endOffset.
Such an exception is a retryable exception, and it can be a transient exception that if retried may succeed.

@return true if has more records to be consumed.
kafka-handler/src/java/org/apache/hadoop/hive/kafka/KafkaRecordIterator.java