1 used direct access to DFSClient to perform more accurate listing operations. To access the DFSClient from within DistributedFileSystem, a utility was added in the o.a.h.hdfs package to access the package-private dfs field. In the hadoopRuntime (default) configuration, the o.a.h package is excluded, so though this works fine in the bundled integration test, it fails when run from the generated zip.
I noticed that DistributedFileSystem exports a public getClient() method which we can use instead. It's marked @VisibleForTesting, but is still less hacky than using a workaround to access package-private field.
1 used direct access to
DFSClient
to perform more accurate listing operations. To access theDFSClient
from withinDistributedFileSystem
, a utility was added in theo.a.h.hdfs
package to access the package-privatedfs
field. In thehadoopRuntime
(default) configuration, theo.a.h
package is excluded, so though this works fine in the bundled integration test, it fails when run from the generated zip.I noticed that
DistributedFileSystem
exports a publicgetClient()
method which we can use instead. It's marked@VisibleForTesting
, but is still less hacky than using a workaround to access package-private field.