after diving into spark source code, I think newAPIHadoopFile should work like this