Skip to content

Commit 01f446e

Browse files
authored
Merge pull request JanusGraph#1214 from jerryjch/support-hbase2
Create a HBase 2 profile JanusGraph#1213
2 parents 430c364 + d4e601b commit 01f446e

File tree

15 files changed

+279
-129
lines changed

15 files changed

+279
-129
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ env:
6262
- MODULE='cassandra' ARGS='-Dtest=***/cassandra/*,*/graphdb/embedded/*'
6363
- MODULE='hbase-parent/janusgraph-hbase-10' ARGS='-Dtest=**/diskstorage/hbase/*'
6464
- MODULE='hbase-parent/janusgraph-hbase-10' ARGS='-Dtest=**/graphdb/hbase/*'
65+
- MODULE='hbase-parent/janusgraph-hbase-10' INSTALL_ARGS='-Dhbase.profile -Phbase2' ARGS='-Dtest=**/diskstorage/hbase/* -Dhbase.profile -Phbase2'
66+
- MODULE='hbase-parent/janusgraph-hbase-10' INSTALL_ARGS='-Dhbase.profile -Phbase2' ARGS='-Dtest=**/graphdb/hbase/* -Dhbase.profile -Phbase2'
67+
- MODULE='hadoop-parent/janusgraph-hadoop-2' INSTALL_ARGS='-Dhbase.profile -Phbase2' ARGS='-Dhbase.profile -Phbase2'
6568
- MODULE='cql' ARGS='-Dtest=**/diskstorage/cql/* -Dtest.skip.murmur=true'
6669
- MODULE='cql' ARGS='-Dtest=**/diskstorage/cql/* -Dtest.skip.byteorderedpartitioner=true -Dtest.skip.murmur-serial=true -Dtest.skip.murmur-ssl=true'
6770
- MODULE='cql' ARGS='-Dtest=**/graphdb/cql/* -Dtest.skip.murmur=true'
@@ -99,7 +102,7 @@ install:
99102
echo "Building janusgraph-${MODULE} and dependencies";
100103
travis_retry travis_wait \
101104
mvn install --projects janusgraph-${MODULE} --also-make \
102-
-DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version;
105+
-DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version ${INSTALL_ARGS};
103106
fi
104107

105108
script:

janusgraph-all/pom.xml

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@
5959
<artifactId>janusgraph-hbase</artifactId>
6060
<version>${project.version}</version>
6161
</dependency>
62-
<dependency>
63-
<groupId>org.apache.hbase</groupId>
64-
<artifactId>hbase-shaded-client</artifactId>
65-
<version>${hbase100.version}</version>
66-
</dependency>
6762
<dependency>
6863
<groupId>org.janusgraph</groupId>
6964
<artifactId>janusgraph-bigtable</artifactId>
@@ -177,4 +172,42 @@
177172
<!-- Done disabling unnecessary plugins -->
178173
</plugins>
179174
</build>
175+
176+
<profiles>
177+
<profile>
178+
<id>hbase1</id>
179+
<activation>
180+
<property>
181+
<name>!hbase.profile</name>
182+
</property>
183+
</activation>
184+
<dependencies>
185+
<dependency>
186+
<groupId>org.apache.hbase</groupId>
187+
<artifactId>hbase-shaded-client</artifactId>
188+
<version>${hbase1.version}</version>
189+
</dependency>
190+
<dependency>
191+
<groupId>org.apache.hbase</groupId>
192+
<artifactId>hbase-shaded-server</artifactId>
193+
<version>${hbase1.version}</version>
194+
</dependency>
195+
</dependencies>
196+
</profile>
197+
<profile>
198+
<id>hbase2</id>
199+
<dependencies>
200+
<dependency>
201+
<groupId>org.apache.hbase</groupId>
202+
<artifactId>hbase-shaded-client</artifactId>
203+
<version>${hbase2.version}</version>
204+
</dependency>
205+
<dependency>
206+
<groupId>org.apache.hbase</groupId>
207+
<artifactId>hbase-shaded-mapreduce</artifactId>
208+
<version>${hbase2.version}</version>
209+
</dependency>
210+
</dependencies>
211+
</profile>
212+
</profiles>
180213
</project>

janusgraph-dist/janusgraph-dist-hadoop-2/pom.xml

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,6 @@
2020
<top.level.basedir>${basedir}/../..</top.level.basedir>
2121
</properties>
2222

23-
<dependencies>
24-
<dependency>
25-
<groupId>org.apache.hbase</groupId>
26-
<artifactId>hbase-shaded-client</artifactId>
27-
<version>${hbase100.version}</version>
28-
</dependency>
29-
<dependency>
30-
<groupId>org.apache.hbase</groupId>
31-
<artifactId>hbase-shaded-server</artifactId>
32-
<!-- Need the -server artifact for hbase.mapreduce.TableInputFormat (Faunus) -->
33-
<version>${hbase100.version}</version>
34-
</dependency>
35-
</dependencies>
36-
3723
<build>
3824
<plugins>
3925
<plugin>
@@ -63,6 +49,43 @@
6349
</build>
6450

6551
<profiles>
52+
<profile>
53+
<id>hbase1</id>
54+
<activation>
55+
<property>
56+
<name>!hbase.profile</name>
57+
</property>
58+
</activation>
59+
<dependencies>
60+
<dependency>
61+
<groupId>org.apache.hbase</groupId>
62+
<artifactId>hbase-shaded-client</artifactId>
63+
<version>${hbase1.version}</version>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.apache.hbase</groupId>
67+
<artifactId>hbase-shaded-server</artifactId>
68+
<!-- Need the -server artifact for hbase.mapreduce.TableInputFormat (Faunus) -->
69+
<version>${hbase1.version}</version>
70+
</dependency>
71+
</dependencies>
72+
</profile>
73+
<profile>
74+
<id>hbase2</id>
75+
<dependencies>
76+
<dependency>
77+
<groupId>org.apache.hbase</groupId>
78+
<artifactId>hbase-shaded-client</artifactId>
79+
<version>${hbase2.version}</version>
80+
</dependency>
81+
<dependency>
82+
<groupId>org.apache.hbase</groupId>
83+
<artifactId>hbase-shaded-mapreduce</artifactId>
84+
<!-- Need this artifact for hbase.mapreduce.TableInputFormat (Faunus) -->
85+
<version>${hbase2.version}</version>
86+
</dependency>
87+
</dependencies>
88+
</profile>
6689
<profile>
6790
<id>janusgraph-release</id>
6891
<build>

janusgraph-examples/example-hbase/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The required Maven dependencies for HBase:
6666
<dependency>
6767
<groupId>org.apache.hbase</groupId>
6868
<artifactId>hbase-shaded-client</artifactId>
69-
<version>${hbase100.version}</version>
69+
<version>${hbase1.version}</version>
7070
<scope>runtime</scope>
7171
</dependency>
7272
```

janusgraph-examples/example-hbase/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<dependency>
2929
<groupId>org.apache.hbase</groupId>
3030
<artifactId>hbase-shaded-client</artifactId>
31-
<version>${hbase100.version}</version>
31+
<version>${hbase1.version}</version>
3232
<scope>runtime</scope>
3333
</dependency>
3434
<dependency>

janusgraph-hadoop-parent/janusgraph-hadoop-2/pom.xml

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,6 @@
5353
<classifier>hadoop2</classifier>
5454
<!-- <scope>test</scope> -->
5555
</dependency>
56-
<dependency>
57-
<groupId>org.apache.hbase</groupId>
58-
<artifactId>hbase-shaded-server</artifactId>
59-
<version>${hbase100.version}</version>
60-
<optional>true</optional>
61-
<scope>test</scope>
62-
</dependency>
63-
<dependency>
64-
<groupId>org.apache.hbase</groupId>
65-
<artifactId>hbase-shaded-client</artifactId>
66-
<version>${hbase100.version}</version>
67-
<optional>true</optional>
68-
<scope>test</scope>
69-
</dependency>
7056
<dependency>
7157
<groupId>${project.groupId}</groupId>
7258
<artifactId>janusgraph-es</artifactId>
@@ -76,6 +62,52 @@
7662
</dependency>
7763
</dependencies>
7864

65+
<profiles>
66+
<profile>
67+
<id>hbase1</id>
68+
<activation>
69+
<property>
70+
<name>!hbase.profile</name>
71+
</property>
72+
</activation>
73+
<dependencies>
74+
<dependency>
75+
<groupId>org.apache.hbase</groupId>
76+
<artifactId>hbase-shaded-client</artifactId>
77+
<version>${hbase1.version}</version>
78+
<optional>true</optional>
79+
<scope>test</scope>
80+
</dependency>
81+
<dependency>
82+
<groupId>org.apache.hbase</groupId>
83+
<artifactId>hbase-shaded-server</artifactId>
84+
<version>${hbase1.version}</version>
85+
<optional>true</optional>
86+
<scope>test</scope>
87+
</dependency>
88+
</dependencies>
89+
</profile>
90+
<profile>
91+
<id>hbase2</id>
92+
<dependencies>
93+
<dependency>
94+
<groupId>org.apache.hbase</groupId>
95+
<artifactId>hbase-shaded-client</artifactId>
96+
<version>${hbase2.version}</version>
97+
<optional>true</optional>
98+
<scope>test</scope>
99+
</dependency>
100+
<dependency>
101+
<groupId>org.apache.hbase</groupId>
102+
<artifactId>hbase-shaded-mapreduce</artifactId>
103+
<version>${hbase2.version}</version>
104+
<optional>true</optional>
105+
<scope>test</scope>
106+
</dependency>
107+
</dependencies>
108+
</profile>
109+
</profiles>
110+
79111
<build>
80112
<plugins>
81113
<plugin>

janusgraph-hadoop-parent/janusgraph-hadoop-core/pom.xml

Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,6 @@
5454
<classifier>tests</classifier>
5555
<scope>test</scope>
5656
</dependency>
57-
58-
<!-- Need this for compile-time imports on
59-
org.apache.hadoop.hbase.mapreduce -->
60-
<dependency>
61-
<groupId>org.apache.hbase</groupId>
62-
<artifactId>hbase-shaded-server</artifactId>
63-
<version>${hbase100.version}</version>
64-
<optional>true</optional>
65-
<scope>provided</scope>
66-
</dependency>
67-
<dependency>
68-
<groupId>org.apache.hbase</groupId>
69-
<artifactId>hbase-shaded-client</artifactId>
70-
<version>${hbase100.version}</version>
71-
<optional>true</optional>
72-
<scope>provided</scope>
73-
</dependency>
7457
<dependency>
7558
<groupId>org.mockito</groupId>
7659
<artifactId>mockito-core</artifactId>
@@ -159,8 +142,55 @@
159142
</plugins>
160143
</build>
161144

162-
<!-- Redeclare gpg-plugin at the bottom to ensure it runs after all the other packaging goals -->
163145
<profiles>
146+
<profile>
147+
<id>hbase1</id>
148+
<activation>
149+
<property>
150+
<name>!hbase.profile</name>
151+
</property>
152+
</activation>
153+
<dependencies>
154+
<dependency>
155+
<groupId>org.apache.hbase</groupId>
156+
<artifactId>hbase-shaded-client</artifactId>
157+
<version>${hbase1.version}</version>
158+
<optional>true</optional>
159+
<scope>provided</scope>
160+
</dependency>
161+
<!-- Need this for compile-time imports on
162+
org.apache.hadoop.hbase.mapreduce -->
163+
<dependency>
164+
<groupId>org.apache.hbase</groupId>
165+
<artifactId>hbase-shaded-server</artifactId>
166+
<version>${hbase1.version}</version>
167+
<optional>true</optional>
168+
<scope>provided</scope>
169+
</dependency>
170+
</dependencies>
171+
</profile>
172+
<profile>
173+
<id>hbase2</id>
174+
<dependencies>
175+
<dependency>
176+
<groupId>org.apache.hbase</groupId>
177+
<artifactId>hbase-shaded-client</artifactId>
178+
<version>${hbase2.version}</version>
179+
<optional>true</optional>
180+
<scope>provided</scope>
181+
</dependency>
182+
<!-- Need this for compile-time imports on
183+
org.apache.hadoop.hbase.mapreduce -->
184+
<dependency>
185+
<groupId>org.apache.hbase</groupId>
186+
<artifactId>hbase-shaded-mapreduce</artifactId>
187+
<version>${hbase2.version}</version>
188+
<optional>true</optional>
189+
<scope>provided</scope>
190+
</dependency>
191+
</dependencies>
192+
</profile>
193+
<!-- Redeclare gpg-plugin at the bottom to ensure it runs after all the other packaging goals -->
164194
<profile>
165195
<id>janusgraph-release</id>
166196

janusgraph-hbase-parent/janusgraph-hbase-10/pom.xml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<relativePath>../pom.xml</relativePath>
88
</parent>
99
<artifactId>janusgraph-hbase-10</artifactId>
10-
<name>JanusGraph-HBase: 1.x Compatibility Shim</name>
10+
<name>JanusGraph-HBase: 1.x and 2.x Compatibility Shim</name>
1111
<url>http://janusgraph.org</url>
1212

1313
<properties>
@@ -32,18 +32,6 @@
3232
<version>${project.version}</version>
3333
<scope>test</scope>
3434
</dependency>
35-
<dependency>
36-
<groupId>org.apache.hbase</groupId>
37-
<artifactId>hbase-shaded-client</artifactId>
38-
<version>${hbase100.version}</version>
39-
<optional>true</optional>
40-
</dependency>
41-
<dependency>
42-
<groupId>org.apache.hbase</groupId>
43-
<artifactId>hbase-shaded-server</artifactId>
44-
<version>${hbase100.version}</version>
45-
<optional>true</optional>
46-
</dependency>
4735
<dependency>
4836
<groupId>${project.groupId}</groupId>
4937
<artifactId>janusgraph-hbase-server</artifactId>
@@ -139,6 +127,45 @@
139127
</build>
140128

141129
<profiles>
130+
<profile>
131+
<id>hbase1</id>
132+
<activation>
133+
<property>
134+
<name>!hbase.profile</name>
135+
</property>
136+
</activation>
137+
<dependencies>
138+
<dependency>
139+
<groupId>org.apache.hbase</groupId>
140+
<artifactId>hbase-shaded-client</artifactId>
141+
<version>${hbase1.version}</version>
142+
<optional>true</optional>
143+
</dependency>
144+
<dependency>
145+
<groupId>org.apache.hbase</groupId>
146+
<artifactId>hbase-shaded-server</artifactId>
147+
<version>${hbase1.version}</version>
148+
<optional>true</optional>
149+
</dependency>
150+
</dependencies>
151+
</profile>
152+
<profile>
153+
<id>hbase2</id>
154+
<dependencies>
155+
<dependency>
156+
<groupId>org.apache.hbase</groupId>
157+
<artifactId>hbase-shaded-client</artifactId>
158+
<version>${hbase2.version}</version>
159+
<optional>true</optional>
160+
</dependency>
161+
<dependency>
162+
<groupId>org.apache.hbase</groupId>
163+
<artifactId>hbase-shaded-mapreduce</artifactId>
164+
<version>${hbase2.version}</version>
165+
<optional>true</optional>
166+
</dependency>
167+
</dependencies>
168+
</profile>
142169
<profile>
143170
<id>hadoop2</id>
144171

0 commit comments

Comments
 (0)