use of alluxio.grpc.GetStatusPOptions in project alluxio by Alluxio.
the class LoadMetadataIntegrationTest method absentCacheMustCache.
@Test
public void absentCacheMustCache() throws Exception {
ListStatusPOptions options = ListStatusPOptions.newBuilder().setRecursive(true).setLoadMetadataType(LoadMetadataPType.ONCE).setCommonOptions(FileSystemMasterCommonPOptions.newBuilder().setSyncIntervalMs(-1)).build();
GetStatusPOptions getStatusOptions = GetStatusPOptions.newBuilder().setLoadMetadataType(LoadMetadataPType.ONCE).setCommonOptions(FileSystemMasterCommonPOptions.newBuilder().setSyncIntervalMs(-1)).build();
// Each of these calls should only check one level of the directory,
// because all the sub directories should be in the absent cache.
checkListStatus("/mnt/mustcache/dir1/dir2", options, true, false, 1);
checkListStatus("/mnt/mustcache/dir1", options, true, false, 1);
checkListStatus("/mnt/mustcache", options, true, false, 1);
}
use of alluxio.grpc.GetStatusPOptions in project alluxio by Alluxio.
the class LoadMetadataIntegrationTest method loadMetadataAlways.
@Test
public void loadMetadataAlways() throws Exception {
GetStatusPOptions options = GetStatusPOptions.newBuilder().setLoadMetadataType(LoadMetadataPType.ALWAYS).build();
checkGetStatus("/mnt/dir1/dirA/fileDNE1", options, false, false, 1);
checkGetStatus("/mnt/dir1/dirA/fileDNE1", options, false, false, 1);
checkGetStatus("/mnt/dir1/dirA/fileDNE2", options, false, false, 1);
checkGetStatus("/mnt/dir1/dirA/file", options, true, true, 3);
checkGetStatus("/mnt/dir1/dirA/dirDNE/", options, false, false, 1);
}
use of alluxio.grpc.GetStatusPOptions in project alluxio by Alluxio.
the class LoadMetadataIntegrationTest method loadMetadataOnce.
@Test
public void loadMetadataOnce() throws Exception {
GetStatusPOptions options = GetStatusPOptions.newBuilder().setLoadMetadataType(LoadMetadataPType.ONCE).build();
checkGetStatus("/mnt/dir1/dirA/fileDNE1", options, false, false, 1);
checkGetStatus("/mnt/dir1/dirA/fileDNE1", options, false, false, 0);
checkGetStatus("/mnt/dir1/dirA/fileDNE2", options, false, false, 1);
checkGetStatus("/mnt/dir1/dirA/file", options, true, true, 3);
checkGetStatus("/mnt/dir1/dirA/dirDNE/", options, false, false, 1);
checkGetStatus("/mnt/dir1/dirA/dirDNE/dir1", options, false, false, 0);
checkGetStatus("/mnt/dir1/dirA/dirDNE/dir1/file1", options, false, false, 0);
checkGetStatus("/mnt/dir1/dirA/dirDNE/dir2", options, false, false, 0);
}
use of alluxio.grpc.GetStatusPOptions in project alluxio by Alluxio.
the class LoadMetadataIntegrationTest method listStatusLoadsFile.
@Test
public void listStatusLoadsFile() throws Exception {
GetStatusPOptions getStatusOptions = GetStatusPOptions.newBuilder().setLoadMetadataType(LoadMetadataPType.ONCE).build();
ListStatusPOptions lsOptions = ListStatusPOptions.newBuilder().setLoadMetadataType(LoadMetadataPType.ALWAYS).setCommonOptions(PSYNC_ALWAYS).build();
// load metadata for dirA with 'ALWAYS'
checkListStatus("/mnt/dir1/dirA", lsOptions, true, true, 3);
// the file should already be loaded
checkGetStatus("/mnt/dir1/dirA/file", getStatusOptions, true, true, 0);
}
use of alluxio.grpc.GetStatusPOptions in project alluxio by Alluxio.
the class LoadMetadataIntegrationTest method repeatedChildrenSync.
@Test
public void repeatedChildrenSync() throws Exception {
ListStatusPOptions listOptions = ListStatusPOptions.newBuilder().setRecursive(true).setLoadMetadataType(LoadMetadataPType.ONCE).setCommonOptions(FileSystemMasterCommonPOptions.newBuilder().setSyncIntervalMs(-1)).build();
GetStatusPOptions getOptions = GetStatusPOptions.newBuilder().setLoadMetadataType(LoadMetadataPType.ONCE).setCommonOptions(FileSystemMasterCommonPOptions.newBuilder().setSyncIntervalMs(-1)).build();
// This can be improved
checkGetStatus("/mnt/dir1/dirA/file", getOptions, true, true, 3);
checkListStatus("/mnt/dir1/", listOptions, true, true, 3);
}
Aggregations