Murtadha Hubail has posted comments on this change.

Change subject: Allow lazy loading for persistent local resources
......................................................................


Patch Set 7:

(2 comments)

https://asterix-gerrit.ics.uci.edu/#/c/344/7/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java
File 
asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java:

Line 77:         DatasetInfo dsInfo = 
datasetInfos.get(getDIDfromResourceName(resourceName));
> Would it make sense to just determine the datasetID and the resourceID here
Yes, it would. It will just cause an extra call to 
getResourceIDfromResourceName() if the dataset is not found.
We could also avoid calling getResourceByName() twice in all the methods by 
doing this at the beginning of each method:
LocalResource lr = resourceRepository.getResourceByName(resourceName);
if (lr == null) {
    return null;
}
int did = ((ILocalResourceMetadata)lr.getResourceObject()).getDatasetID();
long resourceID = lr.getResourceId();

These 6 lines will be repeated at the beginning of each method. 
What do you think?


https://asterix-gerrit.ics.uci.edu/#/c/344/7/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallbackFactory.java
File 
asterix-transactions/src/main/java/org/apache/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallbackFactory.java:

Line 75:         throw new UnsupportedOperationException();
> Do we still need this interface method because it seems no one really imple
It is used in Hyracks IndexInsertUpdateDeleteOperatorNodePushable class. I 
modified it to use the new one and removed this method from the interface.


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/344
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I48b9260a3280750145f6ddb3783673a299055910
Gerrit-PatchSet: 7
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Ian Maxon <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-Reviewer: Young-Seok Kim <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: Yes

Reply via email to