hdfs
hdfs copied to clipboard
Improve exceptions API
I am using hdfscli with fastparquet to remotely read a parquet file over HDFS.
When it turns to be an exception, hdfscli rises a HdfsError generic exception.
I suggest it should add more specific classes like HdfsFileDoesNotExist inheriting from IOError, or the like. This way it will be easier to filter exceptions and integrating it with libraries that expect a file-like interface.
Making it easier to tell apart exceptions (without looking at the message) sounds like a good idea. I'd be happy to review a PR which implements this.