Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIVE-21063 : Support statistics in cachedStore for transactional table #514

Closed
wants to merge 3 commits into from

Conversation

maheshk114
Copy link
Contributor

No description provided.

try {
tableLock.writeLock().lock();
PartitionWrapper partitionWrapper = partitionCache.get(CacheUtils.buildPartitionCacheKey(partVals));
if (partitionWrapper != null) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if partitionWrapper is null? If not doing anything, remove if, NPE is better than skip silently (I see couple of places like this).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in object store if partition is not present we can ignore updating the cache. will modify the code to add log in all places.

boolean areAllPartsFound = true;
long partsFound = 0;
long partsFound = partNames.size();
Map<List<String>, Long> partNameToWriteId = writeIdList != null ? new HashMap<>() : null;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the logic for get_aggr_stats_for different than ObjectStore? I see in ObjectStore, stats are aggregated anyway as long as partitions are valid:

    for (Partition part : parts) {
        if (!isCurrentStatsValidForTheQuery(part, part.getWriteId(), writeIdList, false)) {
          .......
          return null;
        }
      }
    }
    return get_aggr_stats_for(catName, dbName, tblName, partNames, colNames);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior is same as objet store ...if partition is not present then ignore, but if partition is present and is not compatible then return null.

@github-actions
Copy link

github-actions bot commented Jun 9, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.

@github-actions github-actions bot added the stale label Jun 9, 2020
@github-actions github-actions bot closed this Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants