stoty commented on a change in pull request #687: Hbase compat buildtime
URL: https://github.com/apache/phoenix/pull/687#discussion_r371063084
 
 

 ##########
 File path: pom.xml
 ##########
 @@ -1031,6 +1049,55 @@
         </plugins>
       </build>
     </profile>
+    <!--
+    Do not specify the compatibility profiles directly, set 
hbase.compat.version instead.
+    e.g. mvn clean install -Dhbase.compat.version=2.2.1
+    -->
+    <profile>
+      <id>phoenix-hbase-compat-2.0.1-default</id>
+      <activation>
+        <property>
+          <name>!hbase.compat.version</name>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.phoenix</groupId>
+          <artifactId>phoenix-hbase-compat-2.0.1</artifactId>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
+      <id>phoenix-hbase-compat-2.0.1</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+        <property>
+          <name>hbase.compat.version</name>
+          <value>2.0.1</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.phoenix</groupId>
+          <artifactId>phoenix-hbase-compat-2.0.1</artifactId>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
+      <id>phoenix-hbase-compat-2.2.1</id>
+      <activation>
+        <property>
+          <name>hbase.compat.version</name>
+          <value>2.2.1</value>
 
 Review comment:
   Phoenix uses semi-public APIs that tend to change between patch releases. 
Case in point: 2.2.0 does not have the multi-merge feature that 2.2.1 added, 
while late 2.0 and 2.1 releases have also added it. We don't support 2.0.0 
either, though I don't know if that's due to API changes or some critical bug.
   
   So the modules are actually supporting version ranges, and I named them 
after the first supported release.
   
   Using the full version means that if there is a change again at say 2.2.5, 
we can also handle that more elegantly. (by having 2.2.1 and 2.2.5 modules, as 
opposed to 2.2 and 2.2.5 modules)
   
   There are actually four API combinations we could support (2.0 v. 2.2 base / 
2 region merge v multi-merge). In this patch I only added support for latest 
2.2.1+ versions, and kept the support for the old 2.0 and 2.1 versions, though 
it wouldn't take much code to support all four current combinations.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to