Skip to content

Commit 77c478f

Browse files
PHOENIX-7969 Update supported client versions in backward compatibility (#2584)
1 parent e028991 commit 77c478f

2 files changed

Lines changed: 151 additions & 48 deletions

File tree

phoenix-core/src/it/java/org/apache/phoenix/end2end/BackwardCompatibilityTestUtil.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,18 @@ public static List<ClientVersionGroup> computeClientVersionGroups() throws Excep
139139
BackwardCompatibilityIT.class.getClassLoader().getResourceAsStream(COMPATIBLE_CLIENTS_JSON)) {
140140
assertNotNull(inputStream);
141141
JsonNode jsonNode = mapper.readTree(inputStream);
142-
JsonNode HBaseProfile = jsonNode.get(hbaseProfile);
143-
List<MavenCoordinates> artifacts = new ArrayList<>();
144-
for (final JsonNode clientVersion : HBaseProfile) {
145-
artifacts.add(mapper.treeToValue(clientVersion, MavenCoordinates.class));
142+
JsonNode hbaseProfileNode = jsonNode.get(hbaseProfile);
143+
if (hbaseProfileNode == null) {
144+
return clientVersionGroups;
146145
}
147-
if (!artifacts.isEmpty()) {
148-
MavenCoordinates primary = artifacts.get(0);
149-
clientVersionGroups.add(new ClientVersionGroup(primary, artifacts));
146+
for (final JsonNode clientVersionGroupNode : hbaseProfileNode) {
147+
List<MavenCoordinates> artifacts = new ArrayList<>();
148+
for (final JsonNode artifactNode : clientVersionGroupNode) {
149+
artifacts.add(mapper.treeToValue(artifactNode, MavenCoordinates.class));
150+
}
151+
if (!artifacts.isEmpty()) {
152+
clientVersionGroups.add(new ClientVersionGroup(artifacts.get(0), artifacts));
153+
}
150154
}
151155
}
152156
return clientVersionGroups;
Lines changed: 140 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,149 @@
11
{
22
"_comment": "Lists all phoenix compatible client versions against the current branch version for a given hbase profile.",
33
"2.4": [
4-
{
5-
"artifactId": "phoenix-client-hbase-2.4",
6-
"version": "5.1.2"
7-
}
4+
[
5+
{
6+
"artifactId": "phoenix-client-hbase-2.4",
7+
"version": "5.1.2"
8+
}
9+
]
810
],
911
"2.5": [
10-
{
11-
"artifactId": "phoenix-client-hbase-2.5",
12-
"version": "5.1.3"
13-
}
12+
[
13+
{
14+
"artifactId": "phoenix-client-embedded-hbase-2.5",
15+
"version": "5.2.2"
16+
},
17+
{
18+
"artifactId": "sqlline",
19+
"version": "1.9.0",
20+
"groupId": "sqlline"
21+
},
22+
{
23+
"artifactId": "jline-terminal",
24+
"version": "3.12.1",
25+
"groupId": "org.jline"
26+
},
27+
{
28+
"artifactId": "jline-reader",
29+
"version": "3.12.1",
30+
"groupId": "org.jline"
31+
},
32+
{
33+
"artifactId": "jline-builtins",
34+
"version": "3.12.1",
35+
"groupId": "org.jline"
36+
},
37+
{
38+
"artifactId": "log4j-1.2-api",
39+
"version": "2.25.3",
40+
"groupId": "org.apache.logging.log4j"
41+
}
42+
],
43+
[
44+
{
45+
"artifactId": "phoenix-client-embedded-hbase-2.5",
46+
"version": "5.3.2"
47+
},
48+
{
49+
"artifactId": "sqlline",
50+
"version": "1.9.0",
51+
"groupId": "sqlline"
52+
},
53+
{
54+
"artifactId": "jline-terminal",
55+
"version": "3.12.1",
56+
"groupId": "org.jline"
57+
},
58+
{
59+
"artifactId": "jline-reader",
60+
"version": "3.12.1",
61+
"groupId": "org.jline"
62+
},
63+
{
64+
"artifactId": "jline-builtins",
65+
"version": "3.12.1",
66+
"groupId": "org.jline"
67+
},
68+
{
69+
"artifactId": "log4j-1.2-api",
70+
"version": "2.25.3",
71+
"groupId": "org.apache.logging.log4j"
72+
},
73+
{
74+
"artifactId": "commons-logging",
75+
"version": "1.2",
76+
"groupId": "commons-logging"
77+
}
78+
]
1479
],
1580
"2.6": [
16-
{
17-
"artifactId": "phoenix-client-embedded-hbase-2.6",
18-
"version": "5.2.1"
19-
},
20-
{
21-
"artifactId": "phoenix-core-client",
22-
"version": "5.2.1"
23-
},
24-
{
25-
"artifactId": "sqlline",
26-
"version": "1.9.0",
27-
"groupId": "sqlline"
28-
},
29-
{
30-
"artifactId": "jline-terminal",
31-
"version": "3.12.1",
32-
"groupId": "org.jline"
33-
},
34-
{
35-
"artifactId": "jline-reader",
36-
"version": "3.12.1",
37-
"groupId": "org.jline"
38-
},
39-
{
40-
"artifactId": "jline-builtins",
41-
"version": "3.12.1",
42-
"groupId": "org.jline"
43-
},
44-
{
45-
"artifactId": "log4j-1.2-api",
46-
"version": "2.18.0",
47-
"groupId": "org.apache.logging.log4j"
48-
}
81+
[
82+
{
83+
"artifactId": "phoenix-client-embedded-hbase-2.6",
84+
"version": "5.2.2"
85+
},
86+
{
87+
"artifactId": "sqlline",
88+
"version": "1.9.0",
89+
"groupId": "sqlline"
90+
},
91+
{
92+
"artifactId": "jline-terminal",
93+
"version": "3.12.1",
94+
"groupId": "org.jline"
95+
},
96+
{
97+
"artifactId": "jline-reader",
98+
"version": "3.12.1",
99+
"groupId": "org.jline"
100+
},
101+
{
102+
"artifactId": "jline-builtins",
103+
"version": "3.12.1",
104+
"groupId": "org.jline"
105+
},
106+
{
107+
"artifactId": "log4j-1.2-api",
108+
"version": "2.25.3",
109+
"groupId": "org.apache.logging.log4j"
110+
}
111+
],
112+
[
113+
{
114+
"artifactId": "phoenix-client-embedded-hbase-2.6",
115+
"version": "5.3.2"
116+
},
117+
{
118+
"artifactId": "sqlline",
119+
"version": "1.9.0",
120+
"groupId": "sqlline"
121+
},
122+
{
123+
"artifactId": "jline-terminal",
124+
"version": "3.12.1",
125+
"groupId": "org.jline"
126+
},
127+
{
128+
"artifactId": "jline-reader",
129+
"version": "3.12.1",
130+
"groupId": "org.jline"
131+
},
132+
{
133+
"artifactId": "jline-builtins",
134+
"version": "3.12.1",
135+
"groupId": "org.jline"
136+
},
137+
{
138+
"artifactId": "log4j-1.2-api",
139+
"version": "2.25.3",
140+
"groupId": "org.apache.logging.log4j"
141+
},
142+
{
143+
"artifactId": "commons-logging",
144+
"version": "1.2",
145+
"groupId": "commons-logging"
146+
}
147+
]
49148
]
50149
}

0 commit comments

Comments
 (0)