joshelser commented on a change in pull request #687: Hbase compat buildtime
URL: https://github.com/apache/phoenix/pull/687#discussion_r374338031
##########
File path: pom.xml
##########
@@ -367,6 +380,45 @@
</pluginManagement>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>check-hbase-compatibility</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <evaluateBeanshell>
+ <condition>
+ import java.util.regex.Pattern;
+ import java.lang.Integer;
+
+ versionPattern =
Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)");
+ versionMatcher = versionPattern.matcher("${hbase.version}");
+ versionMatcher.find();
+
+ hbaseMajor = Integer.parseInt(versionMatcher.group(1));
+ hbaseMinor = Integer.parseInt(versionMatcher.group(2));
+ hbasePatch = Integer.parseInt(versionMatcher.group(3));
+
+ hbaseMajor == 2 && (
Review comment:
Thinking out loud -- you want to let this fail on new versions of HBase?
Force us to "opt-in" to a new version of HBase; letting this be the gate to
have a human say that a version of HBase is "OK"?
----------------------------------------------------------------
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