[
https://issues.apache.org/jira/browse/PHOENIX-881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13942445#comment-13942445
]
Jeffrey Zhong commented on PHOENIX-881:
---------------------------------------
Thanks [~giacomotaylor] for the reviews.
{quote}
can you remove that, or do tests fail without it?
{quote}
Yes, I can remove it. It's just a safety step as the invalid cache caused me
lots of trouble before.
{quote}
We should file a JIRA for that - I don't think it's a blocker b/c as you
mentioned, in these cases you can put the info in the hbase-sites.xml.
{quote}
Basically a valid quorum string is comma separated host:port pairs like
host1:port1,host2:port2.... so that will totally blow out our parsing code. I
can file a JIRA on that to change our JDBC url separator in the future.
{quote}
It's difficult for me to evaluate the MetaDataEndPointImpl change
{quote}
Below I pasted all the changes for MetaDataEndPointImpl.java
{noformat}
---
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -700,6 +700,7 @@ public class MetaDataEndpointImpl extends MetaDataProtocol
implements Coprocesso
HRegion region = env.getRegion();
Cache<ImmutableBytesPtr,PTable> metaDataCache =
GlobalCache.getInstance(this.env).getMetaDataCache();
PTable table = metaDataCache.getIfPresent(cacheKey);
+
// We always cache the latest version - fault in if not in cache
if (table != null || (table = buildTable(key, cacheKey, region,
asOfTimeStamp)) != null) {
return table;
@@ -988,9 +989,14 @@ public class MetaDataEndpointImpl extends MetaDataProtocol
implements Coprocesso
EnvironmentEdgeManager.currentTimeMillis(), null);
}
}
- if (table == null && buildDeletedTable(key, cacheKey, region,
clientTimeStamp) != null) {
- return new MetaDataMutationResult(MutationCode.NEWER_TABLE_FOUND,
+ if (table == null) {
+ if(buildDeletedTable(key, cacheKey, region, clientTimeStamp) !=
null) {
+ return new
MetaDataMutationResult(MutationCode.NEWER_TABLE_FOUND,
EnvironmentEdgeManager.currentTimeMillis(), null);
+ } else {
+ return new MetaDataMutationResult(MutationCode.TABLE_NOT_FOUND,
+ EnvironmentEdgeManager.currentTimeMillis(), null);
+ }
}
// Get mutations for main table.
Scan scan = newTableRowsScan(key, MIN_TABLE_TIMESTAMP,
clientTimeStamp);
{noformat}
> end2end test fails to run against a live cluster using end2endtest.py
> ---------------------------------------------------------------------
>
> Key: PHOENIX-881
> URL: https://issues.apache.org/jira/browse/PHOENIX-881
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 3.0.0, 4.0.0
> Reporter: Jeffrey Zhong
> Assignee: Jeffrey Zhong
> Attachments: phoenix-881.patch
>
>
> In most IT tests, we're using constant PHOENIX_JDBC_URL instead of
> BaseConnectedQueryIT#getUrl() which will return correct url depending where
> the test is running against.
--
This message was sent by Atlassian JIRA
(v6.2#6252)