Skip to content

Commit d8bd4b2

Browse files
committed
Fix IllegalAccessError when converting viewfs to hdfs
1 parent 18f1510 commit d8bd4b2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

gluten-substrait/src/main/scala/org/apache/hadoop/fs/viewfs/ViewFileSystemUtils.scala

+1-4
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ object ViewFileSystemUtils {
3131
val path = new Path(f)
3232
FileSystem.get(path.toUri, hadoopConfig) match {
3333
case vfs: ViewFileSystem =>
34-
val fsStateField = vfs.getClass.getDeclaredField("fsState")
35-
fsStateField.setAccessible(true)
36-
val fsState = fsStateField.get(vfs).asInstanceOf[InodeTree[FileSystem]]
37-
val res = fsState.resolve(f, true)
34+
val res = vfs.fsState.resolve(f, true)
3835
if (res.isInternalDir) {
3936
f
4037
} else {

0 commit comments

Comments
 (0)