Add a validator for bulk and live loader

n3integration commented :

I ran into similar issues when first starting out using Dgraph and built a basic validator leveraging the bulk loader codebase with support for:

  1. RDF validation
  2. Schema validation
  3. Empty or corrupt gzip file validation

All three conditions can potentially terminate the bulk load process and if you’re unlucky, several hours into the map phase. Fortunately it’s possible to support a basic validator leveraging the existing codebase with little effort and adding a --dryrun or similar CLI flag to the bulk loader.