If DataFileReader were to incorporate this, then the core Avro pom might depend on Hadoop. Some have complained about this before, since Hadoop depends on Avro, creating a circular dependency. (In practice this is not an issue as long as both provide some backwards compatibility. Avro can build against an older, published version of Hadoop and vice-versa.)
Perhaps this could be implemented using reflection, e.g., something like:
That way it'd work if Hadoop is on the classpath, but would not require a dependency on Hadoop.
As a middle ground, Hadoop could be required for compilation but only used at runtime when an HDFS URI is passed in.
Alternately, we might add a UriResolver interface and a base implementation that just works for local files. Then Avro's mapred module could add an implementation that supports HDFS too. The default factory might first look for an org.apache.avro.mapred.FileSystemResolver class, and, if that doesn't exist, use the base implementation.