code: @Override
    protected TimestampedHiveDatasetVersion getDatasetVersion(Partition partition) {
      try {
        Preconditions.checkArgument(partition != null, "Argument to method ");
  
        Path dataLocation = partition.getDataLocation();
        Preconditions
            .checkArgument(dataLocation != null, "Data location is null for partition " + partition.getCompleteName());
        boolean exists = this.fs.exists(dataLocation);
        Preconditions.checkArgument(exists, "Data location doesn't exist for partition " + partition.getCompleteName());
  
        long modificationTS = this.fs.getFileStatus(dataLocation).getModificationTime();
        return new TimestampedHiveDatasetVersion(new DateTime(modificationTS), partition);
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
    }
docs: Create a {@link TimestampedHiveDatasetVersion} from a {@link Partition} based on the Modified time of underlying
  hdfs data location
  @throws IllegalArgumentException when argument is null
  @throws IllegalArgumentException when data location of partition is null
  @throws IllegalArgumentException when data location of partition doesn't exist
  {@inheritDoc}