#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
DFSClientto perform more accurate listing operations. To access theDFSClientfrom withinDistributedFileSystem, a utility was added in theo.a.h.hdfspackage to access the package-privatedfsfield. In thehadoopRuntime(default) configuration, theo.a.hpackage is excluded, so though this works fine in the bundled integration test, it fails when run from the generated zip.I noticed that
DistributedFileSystemexports 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.