Open syed72 opened 1 year ago
Mounting - HdfsFuseWrapper wrapper = new HdfsFuseWrapper(hdfsUri); wrapper.mount(Paths.get(mountPoint), true, true);
-- I tried changing permissions of mounted point in that machine. but not use.
Tried all the options, also checked the net no help from anywhere
I am trying to mount and use hdfs using jnr-fuse. but iam getting below error.
-bash: cd: mydirectory: Input/output error
public class HdfsFuseWrapper extends FuseStubFS{
@Override public int getxattr(String path, String name, Pointer value, @size_t long size) { try { // Get the extended attribute from HDFS System.out.println("getxpath:"+path+" "+name); org.apache.hadoop.fs.FileStatus fileStatus = fileSystem.getFileStatus(new Path(path)); // String attrValue = fileStatus.getExtendedAttribute(name); System.out.println("prin::"+fileStatus.toString()); String attrValue = "abc"; if (attrValue == null) { return -ErrorCodes.ENODATA(); // No data available error }
}
@Override public int getattr(String path, FileStat stat) { try { // Get the file status from HDFS org.apache.hadoop.fs.FileStatus fileStatus = fileSystem.getFileStatus(new Path(path)); System.out.println("permis:"+fileStatus.getPermission()); // Set the file attributes in the stat structure stat.st_mode.set(fileStatus.getPermission().toShort()); stat.st_nlink.set(1); // Number of hard links stat.st_size.set(fileStatus.getLen());
}
can someone help on this please?