Kaifeng Huang created HBASE-23916:
-------------------------------------

             Summary: Inconsistent library versions notice.
                 Key: HBASE-23916
                 URL: https://issues.apache.org/jira/browse/HBASE-23916
             Project: HBase
          Issue Type: Improvement
            Reporter: Kaifeng Huang
         Attachments: apache hbase.pdf

Hi. I have implemented a tool to detect library version inconsistencies. Your 
project have 1 inconsistent library.

Take junit:junit for example, this library is declared as version 4.13 in 
hbase-rest, 4.12 in hbase-archetypes/hbase-shaded-client-project and etc... 
Such version inconsistencies may cause unnecessary maintenance effort in the 
long run. For example, if two modules become inter-dependent, library version 
conflict may happen. It has already become a common issue and hinders 
development progress. Thus a version harmonization is necessary.

Provided we applied a version harmonization, I calculated the cost it may have 
to harmonize to all upper versions including an up-to-date one. The cost refers 
to POM config changes and API invocation changes. Take junit:junit for example, 
if we harmonize all the library versions into 4.13-beta-1. The concern is, how 
much should the project code adapt to the newer library version. We list an 
effort table to quantify the harmonization cost.

The effort table is listed below. It shows the overall harmonization effort by 
modules. The columns represents the number of library APIs and API 
calls(NA,NAC), deleted APIs and API calls(NDA,NDAC) as well as modified API and 
API calls(NMA,NMAC). Modified APIs refers to those APIs whose call graph is not 
the same as previous version. Take the first row for example, if upgrading the 
library into version 4.13-beta-1. Given that 1375 APIs is used in module 
hbase-server, 0 of them is deleted in a recommended version(which will throw a 
NoMethodFoundError unless re-compiling the project), 1 of them is regarded as 
modified which could break the former API contract.
||Index||Module||NA(NAC)||NDA(NDAC)||NMA(NMAC)||
|1|hbase-server|1375(4528)|0(0)|1(1)|
|2|hbase-common|143(547)|0(0)|0(0)|
|3|hbase-mapreduce|108(389)|0(0)|0(0)|
|4|..|..|..|..|


 
Also we provided another table to show the potential files that may be affected 
due to library API change, which could help to spot the concerned API usage and 
rerun the test cases. The table is listed below.




||Module||File||Type||API||
|hbase-it|hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java|modify|org.junit.Assume.assumeFalse(boolean)|
|hbase-archetypes/hbase-shaded-client-project|hbase-archetypes/hbase-shaded-client-project/src/test/java/org/apache/hbase/archetypes/exemplars/shaded_client/TestHelloHBase.java|modify|org.junit.Assert.assertEquals(java.lang.String,java.lang.Object,java.lang.Object)|
|hbase-server|hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHBaseWalOnEC.java|modify|org.junit.Assume.assumeNoException(java.lang.String,java.lang.Throwable)|
|4|..|..|..|



If you are interested, you can have a more complete and detailed report in the 
attached PDF file.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to