use of alluxio.grpc.GetStatusPOptions in project alluxio by Alluxio.
the class LoadMetadataIntegrationTest method loadMetadataNever.
@Test
public void loadMetadataNever() throws Exception {
GetStatusPOptions options = GetStatusPOptions.newBuilder().setLoadMetadataType(LoadMetadataPType.NEVER).build();
checkGetStatus("/mnt/dir1/dirA/fileDNE1", options, false, true, 0);
checkGetStatus("/mnt/dir1/dirA/fileDNE1", options, false, true, 0);
checkGetStatus("/mnt/dir1/dirA/fileDNE2", options, false, true, 0);
checkGetStatus("/mnt/dir1/dirA/file", options, false, true, 0);
checkGetStatus("/mnt/dir1/dirA/dirDNE/", options, false, true, 0);
checkGetStatus("/mnt/dir1/dirA/dirDNE/fileDNE3", options, false, true, 0);
}
use of alluxio.grpc.GetStatusPOptions in project alluxio by Alluxio.
the class LoadMetadataIntegrationTest method loadNeverConfiguration.
@LocalAlluxioClusterResource.Config(confParams = { PropertyKey.Name.USER_FILE_METADATA_LOAD_TYPE, "NEVER" })
@Test
public void loadNeverConfiguration() throws Exception {
GetStatusPOptions options = GetStatusPOptions.getDefaultInstance();
checkGetStatus("/mnt/dir1/dirA/fileDNE1", options, false, true, 0);
checkGetStatus("/mnt/dir1/dirA/fileDNE1", options, false, true, 0);
}
use of alluxio.grpc.GetStatusPOptions in project alluxio by Alluxio.
the class LoadMetadataIntegrationTest method syncOverrideLoadMetadata.
@Test
public void syncOverrideLoadMetadata() throws Exception {
GetStatusPOptions options = GetStatusPOptions.newBuilder().setLoadMetadataType(LoadMetadataPType.NEVER).setCommonOptions(FileSystemMasterCommonPOptions.newBuilder().setSyncIntervalMs(0)).build();
// The first time, it needs status of /dir1, /dir1/dirA to create the dirs in Alluxio
// and the file itself
checkGetStatus("/mnt/dir1/dirA/file", options, true, true, 3);
// The second time, it only needs to sync the file, so 1 access
checkGetStatus("/mnt/dir1/dirA/file", options, true, true, 1);
}
use of alluxio.grpc.GetStatusPOptions in project alluxio by Alluxio.
the class UfsSyncIntegrationTest method alluxioModeFingerprintUpdate.
@Test
public void alluxioModeFingerprintUpdate() throws Exception {
GetStatusPOptions options = GetStatusPOptions.newBuilder().setLoadMetadataType(LoadMetadataPType.ONCE).setCommonOptions(PSYNC_NEVER).build();
writeUfsFile(ufsPath(EXISTING_FILE), 10);
Assert.assertNotNull(mFileSystem.getStatus(new AlluxioURI(alluxioPath(EXISTING_FILE)), options));
// Set initial alluxio permissions
mFileSystem.setAttribute(new AlluxioURI(alluxioPath(EXISTING_FILE)), SetAttributePOptions.newBuilder().setMode(new Mode((short) 0777).toProto()).build());
URIStatus status = mFileSystem.getStatus(new AlluxioURI(alluxioPath(EXISTING_FILE)), options);
String startFingerprint = status.getUfsFingerprint();
// Change alluxio permissions
mFileSystem.setAttribute(new AlluxioURI(alluxioPath(EXISTING_FILE)), SetAttributePOptions.newBuilder().setMode(new Mode((short) 0655).toProto()).build());
status = mFileSystem.getStatus(new AlluxioURI(alluxioPath(EXISTING_FILE)), options);
String endFingerprint = status.getUfsFingerprint();
// Verify the fingerprints are different.
Assert.assertNotEquals(startFingerprint, endFingerprint);
}
use of alluxio.grpc.GetStatusPOptions in project alluxio by Alluxio.
the class UfsSyncIntegrationTest method getStatusFileSync.
@Test
public void getStatusFileSync() throws Exception {
GetStatusPOptions options = GetStatusPOptions.newBuilder().setLoadMetadataType(LoadMetadataPType.NEVER).setCommonOptions(PSYNC_ALWAYS).build();
checkGetStatus(EXISTING_FILE, options, true);
}
Aggregations