The fix is to define three new optional configuration parameters:
For each of these, if the value is not specified in the configuration file, the default values (defined by the file system) are used.
It is unfortunate that there is no clean way to get the default value for buffer size from FileSystem one has to use the HDFS configuration parameter "io.file.buffer.size" and fall back on an yet another (hard coded) default value. There doesn't seem to be a way to instruct filesystem to ask for the default value for the buffer size or to let it use the default value implicitly. If either block-size or replication is specified, one must specify a valid value for buffer size as well.
I tested that these work by specifying the values and checking that they are honored.