use of alluxio.wire.UfsInfo in project alluxio by Alluxio.
the class DefaultFileSystemMaster method getUfsInfo.
@Override
public UfsInfo getUfsInfo(long mountId) {
MountInfo info = mMountTable.getMountInfo(mountId);
if (info == null) {
return new UfsInfo();
}
MountPOptions options = info.getOptions();
return new UfsInfo().setUri(info.getUfsUri()).setMountOptions(MountContext.mergeFrom(MountPOptions.newBuilder().putAllProperties(options.getPropertiesMap()).setReadOnly(options.getReadOnly()).setShared(options.getShared())).getOptions().build());
}
use of alluxio.wire.UfsInfo in project alluxio by Alluxio.
the class FileSystemMasterTest method getUfsInfoNotExist.
@Test
public void getUfsInfoNotExist() throws Exception {
UfsInfo noSuchUfsInfo = mFileSystemMaster.getUfsInfo(100L);
assertNull(noSuchUfsInfo.getUri());
assertNull(noSuchUfsInfo.getMountOptions());
}
use of alluxio.wire.UfsInfo in project alluxio by Alluxio.
the class FileSystemMasterTest method getUfsInfo.
@Test
public void getUfsInfo() throws Exception {
FileInfo alluxioRootInfo = mFileSystemMaster.getFileInfo(new AlluxioURI("alluxio://"), GET_STATUS_CONTEXT);
UfsInfo ufsRootInfo = mFileSystemMaster.getUfsInfo(alluxioRootInfo.getMountId());
assertEquals(mUnderFS, ufsRootInfo.getUri().getPath());
assertTrue(ufsRootInfo.getMountOptions().getPropertiesMap().isEmpty());
}
Aggregations