You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2020/11/09 13:22:10 UTC
[phoenix] branch 4.x updated: PHOENIX-6091 Calling
MetaDataProtocol.getVersion() on a 4.16 timestamp gives version as 4.15.x
This is an automated email from the ASF dual-hosted git repository.
stoty pushed a commit to branch 4.x
in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/4.x by this push:
new 47b8046 PHOENIX-6091 Calling MetaDataProtocol.getVersion() on a 4.16 timestamp gives version as 4.15.x
47b8046 is described below
commit 47b8046c052478529ba31f4734871ea392441190
Author: Richard Antal <an...@gmail.com>
AuthorDate: Mon Aug 24 15:47:20 2020 +0200
PHOENIX-6091 Calling MetaDataProtocol.getVersion() on a 4.16 timestamp gives version as 4.15.x
---
.../main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java | 1 +
.../test/java/org/apache/phoenix/schema/MetaDataClientTest.java | 7 +++++++
2 files changed, 8 insertions(+)
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 a3485f0..5d0fc85 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
@@ -142,6 +142,7 @@ public abstract class MetaDataProtocol extends MetaDataService {
TIMESTAMP_VERSION_MAP.put(MIN_SYSTEM_TABLE_TIMESTAMP_4_13_0, "4.13.x");
TIMESTAMP_VERSION_MAP.put(MIN_SYSTEM_TABLE_TIMESTAMP_4_14_0, "4.14.x");
TIMESTAMP_VERSION_MAP.put(MIN_SYSTEM_TABLE_TIMESTAMP_4_15_0, "4.15.x");
+ TIMESTAMP_VERSION_MAP.put(MIN_SYSTEM_TABLE_TIMESTAMP_4_16_0, "4.16.x");
}
public static final String CURRENT_CLIENT_VERSION = PHOENIX_MAJOR_VERSION + "." + PHOENIX_MINOR_VERSION + "." + PHOENIX_PATCH_NUMBER;
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/schema/MetaDataClientTest.java b/phoenix-core/src/test/java/org/apache/phoenix/schema/MetaDataClientTest.java
index 1f408b2..21c7514 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/schema/MetaDataClientTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/schema/MetaDataClientTest.java
@@ -32,6 +32,8 @@ import java.sql.SQLException;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertTrue;
import static junit.framework.TestCase.fail;
+import static org.apache.phoenix.coprocessor.MetaDataProtocol.PHOENIX_MAJOR_VERSION;
+import static org.apache.phoenix.coprocessor.MetaDataProtocol.PHOENIX_MINOR_VERSION;
public class MetaDataClientTest extends BaseConnectionlessQueryTest {
@@ -83,4 +85,9 @@ public class MetaDataClientTest extends BaseConnectionlessQueryTest {
}
}
+ @Test
+ public void testMetaDataProtocolVersion() {
+ assertEquals(String.format("%d.%d.%s", PHOENIX_MAJOR_VERSION, PHOENIX_MINOR_VERSION, "x"),
+ MetaDataProtocol.getVersion(System.currentTimeMillis()));
+ }
}