PHOENIX-4710 Don't set KEEP_DELETED_CELLS or VERSIONS for SYSTEM.LOG
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/82ad1371 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/82ad1371 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/82ad1371 Branch: refs/heads/4.x-cdh5.11 Commit: 82ad13712060d049485adc096aef6fdbae4e03b0 Parents: 5f6d1a9 Author: James Taylor <jtay...@salesforce.com> Authored: Thu Apr 26 12:48:14 2018 -0700 Committer: James Taylor <jtay...@salesforce.com> Committed: Fri Apr 27 11:45:39 2018 -0700 ---------------------------------------------------------------------- .../org/apache/phoenix/coprocessor/MetaDataProtocol.java | 1 - .../apache/phoenix/query/ConnectionQueryServicesImpl.java | 9 ++------- .../phoenix/query/ConnectionlessQueryServicesImpl.java | 7 +------ 3 files changed, 3 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java index 36d6f0d..62b701d 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java @@ -72,7 +72,6 @@ public abstract class MetaDataProtocol extends MetaDataService { public static final long MIN_SYSTEM_TABLE_MIGRATION_TIMESTAMP = 0; public static final String MIGRATION_IN_PROGRESS = "MigrationInProgress"; - public static final int DEFAULT_LOG_VERSIONS = 10; public static final int DEFAULT_LOG_TTL = 7 * 24 * 60 * 60; // 7 days // Min system table timestamps for every release. http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java index 92eca64..860540d 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java @@ -170,8 +170,8 @@ import org.apache.phoenix.exception.RetriableUpgradeException; import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.exception.SQLExceptionInfo; import org.apache.phoenix.exception.UpgradeInProgressException; -import org.apache.phoenix.exception.UpgradeRequiredException; import org.apache.phoenix.exception.UpgradeNotRequiredException; +import org.apache.phoenix.exception.UpgradeRequiredException; import org.apache.phoenix.execute.MutationState; import org.apache.phoenix.hbase.index.IndexRegionSplitPolicy; import org.apache.phoenix.hbase.index.Indexer; @@ -2469,7 +2469,7 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement // Available for testing protected String getLogTableDDL() { - return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA); + return QueryConstants.CREATE_LOG_METADATA; } private String setSystemDDLProperties(String ddl) { @@ -2478,11 +2478,6 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices implement props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)); } - private String setSystemLogDDLProperties(String ddl) { - return String.format(ddl, - props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)); - } - @Override public void init(final String url, final Properties props) throws SQLException { try { http://git-wip-us.apache.org/repos/asf/phoenix/blob/82ad1371/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java index c6c2617..1f2e3ac 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java @@ -164,7 +164,7 @@ public class ConnectionlessQueryServicesImpl extends DelegateQueryServices imple } protected String getLogTableDDL() { - return setSystemLogDDLProperties(QueryConstants.CREATE_LOG_METADATA); + return QueryConstants.CREATE_LOG_METADATA; } private String setSystemDDLProperties(String ddl) { @@ -173,11 +173,6 @@ public class ConnectionlessQueryServicesImpl extends DelegateQueryServices imple props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)); } - private String setSystemLogDDLProperties(String ddl) { - return String.format(ddl, - props.getBoolean(DEFAULT_SYSTEM_KEEP_DELETED_CELLS_ATTRIB, QueryServicesOptions.DEFAULT_SYSTEM_KEEP_DELETED_CELLS)); - } - @Override public ConnectionQueryServices getChildQueryServices(ImmutableBytesWritable childId) { return this; // Just reuse the same query services