Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion phoenix-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-assembly</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-client-parent/phoenix-client-embedded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-client-parent</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>

<artifactId>phoenix-client-embedded-${hbase.suffix}</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-client-parent/phoenix-client-lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-client-parent</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>

<artifactId>phoenix-client-lite-${hbase.suffix}</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-client-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-client-parent</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-core-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-core-client</artifactId>
<name>Phoenix Core Client</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
*/
public abstract class MetaDataProtocol extends MetaDataService {
public static final int PHOENIX_MAJOR_VERSION = 5;
public static final int PHOENIX_MINOR_VERSION = 3;
public static final int PHOENIX_MINOR_VERSION = 4;

public static final int PHOENIX_PATCH_NUMBER = 0;
public static final int PHOENIX_VERSION =
Expand Down Expand Up @@ -92,9 +92,10 @@ public abstract class MetaDataProtocol extends MetaDataService {
public static final long MIN_SYSTEM_TABLE_TIMESTAMP_5_1_0 = MIN_SYSTEM_TABLE_TIMESTAMP_4_16_0;
public static final long MIN_SYSTEM_TABLE_TIMESTAMP_5_2_0 = MIN_TABLE_TIMESTAMP + 38;
public static final long MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 = MIN_TABLE_TIMESTAMP + 42;
public static final long MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 = MIN_TABLE_TIMESTAMP + 43;
// MIN_SYSTEM_TABLE_TIMESTAMP needs to be set to the max of all the MIN_SYSTEM_TABLE_TIMESTAMP_*
// constants
public static final long MIN_SYSTEM_TABLE_TIMESTAMP = MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0;
public static final long MIN_SYSTEM_TABLE_TIMESTAMP = MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0;

// Version below which we should disallow usage of mutable secondary indexing.
public static final int MUTABLE_SI_VERSION_THRESHOLD = VersionUtil.encodeVersion("0", "94", "10");
Expand Down Expand Up @@ -151,6 +152,7 @@ public abstract class MetaDataProtocol extends MetaDataService {
TIMESTAMP_VERSION_MAP.put(MIN_SYSTEM_TABLE_TIMESTAMP_5_1_0, "5.1.x");
TIMESTAMP_VERSION_MAP.put(MIN_SYSTEM_TABLE_TIMESTAMP_5_2_0, "5.2.x");
TIMESTAMP_VERSION_MAP.put(MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0, "5.3.x");
TIMESTAMP_VERSION_MAP.put(MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0, "5.4.x");
}

public static final String CURRENT_CLIENT_VERSION =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP;
import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_15_0;
import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_16_0;
import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0;
import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0;
import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.PHOENIX_MAJOR_VERSION;
import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.PHOENIX_MINOR_VERSION;
import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.PHOENIX_PATCH_NUMBER;
Expand Down Expand Up @@ -4741,44 +4741,41 @@ protected PhoenixConnection upgradeSystemCatalogIfRequired(PhoenixConnection met
}
}
}
if (currentServerSideTableTimeStamp < MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0) {
if (currentServerSideTableTimeStamp < MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0) {
metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 8,
MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 9,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but this is super fragile, we should use the actual verion constants.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PhoenixDatabaseMetaData.PHYSICAL_TABLE_NAME + " " + PVarchar.INSTANCE.getSqlTypeName());
metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 7,
MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 8,
PhoenixDatabaseMetaData.SCHEMA_VERSION + " " + PVarchar.INSTANCE.getSqlTypeName());
metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 6,
MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 7,
PhoenixDatabaseMetaData.EXTERNAL_SCHEMA_ID + " " + PVarchar.INSTANCE.getSqlTypeName());
metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 5,
MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 6,
PhoenixDatabaseMetaData.STREAMING_TOPIC_NAME + " " + PVarchar.INSTANCE.getSqlTypeName());
metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 4,
MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 5,
PhoenixDatabaseMetaData.INDEX_WHERE + " " + PVarchar.INSTANCE.getSqlTypeName());
metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 3,
MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 4,
PhoenixDatabaseMetaData.CDC_INCLUDE_TABLE + " " + PVarchar.INSTANCE.getSqlTypeName());

/**
* TODO: Provide a path to copy existing data from PHOENIX_TTL to TTL column and then to DROP
* PHOENIX_TTL Column. See PHOENIX-7023
*/
metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 2,
MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 3,
PhoenixDatabaseMetaData.TTL + " " + PVarchar.INSTANCE.getSqlTypeName());
metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 1,
MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 2,
PhoenixDatabaseMetaData.ROW_KEY_MATCHER + " " + PVarbinary.INSTANCE.getSqlTypeName());
metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0,
MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 1,
PhoenixDatabaseMetaData.IS_STRICT_TTL + " " + PBoolean.INSTANCE.getSqlTypeName());
// Values in PHOENIX_TTL column will not be used for further release as PHOENIX_TTL column is
// being deprecated
// and will be removed in later release. To copy copyDataFromPhoenixTTLtoTTL(metaConnection)
// can be used but
// as that feature was not fully built we are not moving old value to new column
// Add any 5.4.0 specific upgrade logic here if needed in the future
// Currently no new schema changes required for 5.4.0

// move TTL values stored in descriptor to SYSCAT TTL column.
moveTTLFromHBaseLevelTTLToPhoenixLevelTTL(metaConnection);
Expand Down
2 changes: 1 addition & 1 deletion phoenix-core-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-core-server</artifactId>
<name>Phoenix Core Server</name>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-core</artifactId>
<name>Phoenix Core</name>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-hbase-compat-2.5.0/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>

<artifactId>phoenix-hbase-compat-2.5.0</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-hbase-compat-2.5.4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>

<artifactId>phoenix-hbase-compat-2.5.4</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-hbase-compat-2.6.0/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>

<artifactId>phoenix-hbase-compat-2.6.0</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-mapreduce-byo-shaded-hbase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-mapreduce-byo-shaded-hbase-${hbase.suffix}</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-pherf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>

<artifactId>phoenix-pherf</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-server-${hbase.suffix}</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phoenix-tracing-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
</parent>

<artifactId>phoenix-tracing-webapp</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.4.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache Phoenix</name>
<description>A SQL layer over HBase</description>
Expand Down