Skip to content
Permalink
Browse files
Removing resource cache temporarily
  • Loading branch information
DImuthuUpe committed Oct 14, 2021
1 parent 8227ff7 commit 1d3fbe7ef145f194c59c94561689086c1cc3fc50
Showing 1 changed file with 10 additions and 2 deletions.
@@ -79,10 +79,13 @@ private List<GenericResource> createResourceWithParentDirectories(String hostNam
String resourceName = splitted[i];
currentPath = currentPath + "/" + resourceName;

if (resourceCache.containsKey(currentPath)) {
/*if (resourceCache.containsKey(currentPath)) {
resourceList.add(resourceCache.get(currentPath));
parentId = resourceCache.get(currentPath).getResourceId();
logger.info("Using cached resource with path {} for path {}", currentPath,
resourceCache.get(currentPath).getResourcePath());
continue;
}
}*/

String resourceId = Utils.getId(storageId + ":" + currentPath);
Optional<GenericResource> optionalGenericResource =
@@ -327,6 +330,11 @@ private void scanResourceForChildResources(GenericResource resourceObj, AuthToke
this.configuration.getOutboundEventProcessor().getMftPort())) {
MFTApiServiceGrpc.MFTApiServiceBlockingStub mftClientStub = mftApiClient.get();
directoryResourceMetadata = mftClientStub.getDirectoryResourceMetadata(resourceMetadataReq.build());

} catch (Exception e) {
logger.error("Failed to fetch dir metadata for resource {} with path {}",
resourceObj.getResourceId(), resourceObj.getResourcePath(), e);
throw e;
}

for (FileMetadataResponse fileMetadata : directoryResourceMetadata.getFilesList()) {

0 comments on commit 1d3fbe7

Please sign in to comment.