You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by iw...@apache.org on 2015/12/31 03:41:38 UTC
incubator-hawq git commit: HAWQ-70. Refetch file's all block
locations when partly hit metadata cache
Repository: incubator-hawq
Updated Branches:
refs/heads/master 5e16bd49e -> ff8506697
HAWQ-70. Refetch file's all block locations when partly hit metadata cache
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/ff850669
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/ff850669
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/ff850669
Branch: refs/heads/master
Commit: ff85066978fbe79edb0bc8d0f71f5627209bf2ab
Parents: 5e16bd4
Author: ivan <iw...@pivotal.io>
Authored: Thu Dec 31 10:26:25 2015 +0800
Committer: ivan <iw...@pivotal.io>
Committed: Thu Dec 31 10:26:25 2015 +0800
----------------------------------------------------------------------
src/backend/cdb/cdbmetadatacache.c | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ff850669/src/backend/cdb/cdbmetadatacache.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbmetadatacache.c b/src/backend/cdb/cdbmetadatacache.c
index f4c2369..fda0668 100644
--- a/src/backend/cdb/cdbmetadatacache.c
+++ b/src/backend/cdb/cdbmetadatacache.c
@@ -698,10 +698,14 @@ BlockLocation *GetHdfsFileBlockLocations(const HdfsFileInfo *file_info, uint64_t
}
else
{
+ /*
// Cache Hit Partly
if (cache_entry->block_num <= 1)
{
// only one file, re-fetch
+ */
+
+ // re-fetch file's all block locations, because hdfs will get incorrect result when fetch partly
LWLockRelease(MetadataCacheLock);
LWLockAcquire(MetadataCacheLock, LW_EXCLUSIVE);
@@ -710,6 +714,7 @@ BlockLocation *GetHdfsFileBlockLocations(const HdfsFileInfo *file_info, uint64_t
locations = GetHdfsFileBlockLocationsNoCache(file_info, filesize, block_num);
*hit_ratio = 0;
+ /*
}
else
{
@@ -718,6 +723,7 @@ BlockLocation *GetHdfsFileBlockLocations(const HdfsFileInfo *file_info, uint64_t
// fetch extra hdfs block locations and append to cache
locations = AppendHdfsFileBlockLocationsToCache(file_info, cache_entry, filesize, block_num, hit_ratio);
}
+ */
}
}