[
https://issues.apache.org/jira/browse/PHOENIX-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15434462#comment-15434462
]
Hadoop QA commented on PHOENIX-3199:
------------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest
attachment
http://issues.apache.org/jira/secure/attachment/12825207/PHOENIX-3199_v1.patch
against master branch at commit a0ae8025eccbd76b4277f74e57081ddbb5a7babe.
ATTACHMENT ID: 12825207
{color:green}+1 @author{color}. The patch does not contain any @author
tags.
{color:green}+1 tests included{color}. The patch appears to include 3 new
or modified tests.
{color:green}+1 javac{color}. The applied patch does not increase the
total number of javac compiler warnings.
{color:red}-1 javadoc{color}. The javadoc tool appears to have generated
34 warning messages.
{color:green}+1 release audit{color}. The applied patch does not increase
the total number of release audit warnings.
{color:red}-1 lineLengths{color}. The patch introduces the following lines
longer than 100:
+ final byte[]
locateEndKey=ByteUtil.getLocateEndKeyInclusive(regionStartKey, regionEndKey);
+ results =
htable.coprocessorService(ServerCachingService.class, locateStartKey,
locateEndKey,
+ final byte[]
locateEndKey=ByteUtil.getLocateEndKeyInclusive(regionStartKey, regionEndKey);
+ iterateOverTable.coprocessorService(ServerCachingService.class,
regionStartKey, regionEndKey,
+ byte[]
key=ByteUtil.getLocateEndKeyInclusive(HConstants.EMPTY_START_ROW,
HConstants.EMPTY_END_ROW);
{color:green}+1 core tests{color}. The patch passed unit tests in .
Test results:
https://builds.apache.org/job/PreCommit-PHOENIX-Build/531//testReport/
Javadoc warnings:
https://builds.apache.org/job/PreCommit-PHOENIX-Build/531//artifact/patchprocess/patchJavadocWarnings.txt
Console output:
https://builds.apache.org/job/PreCommit-PHOENIX-Build/531//console
This message is automatically generated.
> ServerCacheClient would send cache to all regions unnecessarily once it
> should send cache to the first region
> -------------------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-3199
> URL: https://issues.apache.org/jira/browse/PHOENIX-3199
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.8.0
> Reporter: chenglei
> Attachments: PHOENIX-3199_v1.patch
>
>
> In the addServerCache method of org.apache.phoenix.cache.ServerCacheClient
> class, once the first region can pass the if test in line 174, because the
> startKey of the first region is HConstants.EMPTY_START_ROW, so the key is
> also HConstants.EMPTY_START_ROW in line 180. When we invoke the htable's
> coprocessorService method in line 189, the startKey and endKey(Inclusive)
> parameters are both HConstants.EMPTY_START_ROW,and the htable's
> coprocessorService method internally uses getKeysAndRegionsInRange method to
> locate
> [HConstants.EMPTY_START_ROW,HConstants.EMPTY_START_ROW] to all regions, so
> cache would be sent to all regions :
> {code:borderStyle=solid}
> 170 for (HRegionLocation entry : locations) {
> 171 // Keep track of servers we've sent to and only send once
> 172 byte[] regionStartKey =
> entry.getRegionInfo().getStartKey();
> 173 byte[] regionEndKey = entry.getRegionInfo().getEndKey();
> 174 if ( ! servers.contains(entry) &&
> 175 keyRanges.intersectRegion(regionStartKey,
> regionEndKey,
> 176 cacheUsingTable.getIndexType() ==
> IndexType.LOCAL)) {
> 177 // Call RPC once per server
> 178 servers.add(entry);
> 179 if (LOG.isDebugEnabled())
> {LOG.debug(addCustomAnnotations("Adding cache entry to be sent for " + entry,
> connection));}
> 180 final byte[] key = entry.getRegionInfo().getStartKey();
> 181 final HTableInterface htable =
> services.getTable(cacheUsingTableRef.getTable().getPhysicalName().getBytes());
> 182 closeables.add(htable);
> 183 futures.add(executor.submit(new JobCallable<Boolean>()
> {
> 184
> 185 @Override
> 186 public Boolean call() throws Exception {
> 187 final Map<byte[], AddServerCacheResponse>
> results;
> 188 try {
> 189 results =
> htable.coprocessorService(ServerCachingService.class, key, key,
> 190 new
> Batch.Call<ServerCachingService, AddServerCacheResponse>() {
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)