Class KafkaJsonLoader

java.lang.Object
org.apache.drill.exec.store.easy.json.loader.JsonLoaderImpl
org.apache.drill.exec.store.kafka.decoders.KafkaJsonLoader
All Implemented Interfaces:
JsonLoader, ErrorFactory

public class KafkaJsonLoader extends JsonLoaderImpl
  • Constructor Details

  • Method Details

    • endBatch

      public void endBatch()
      Description copied from class: JsonLoaderImpl
      Finish reading a batch of data. We may have pending "null" columns: a column for which we've seen only nulls, or an array that has always been empty. The batch needs to finish, and needs a type, but we still don't know the type. Since we must decide on one, we do the following guess Varchar, and switch to text mode.

      This choices is not perfect. Switching to text mode means results will vary from run to run depending on the order that we see empty and non-empty values for this column. Plus, since the system is distributed, the decision made here may conflict with that made in some other fragment.

      The only real solution is for the user to provide a schema.

      Bottom line: the user is responsible for not giving Drill ambiguous data that would require Drill to predict the future.

      Overrides:
      endBatch in class JsonLoaderImpl