Skip to content

Commit a6dce75

Browse files
committed
wip
1 parent cdd4a5d commit a6dce75

File tree

5 files changed

+71
-19
lines changed

5 files changed

+71
-19
lines changed

extensions/cli/hbase-embed/src/main/java/org/locationtech/geowave/datastore/hbase/cli/GeoWaveHBaseUtility.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.apache.hadoop.fs.Path;
1515
import org.apache.hadoop.fs.permission.FsPermission;
1616
import org.apache.hadoop.hbase.HBaseTestingUtility;
17+
import org.apache.hadoop.hbase.MiniHBaseCluster;
1718

1819
public class GeoWaveHBaseUtility extends HBaseTestingUtility {
1920

extensions/cli/hbase-embed/src/main/java/org/locationtech/geowave/datastore/hbase/cli/HBaseMiniCluster.java

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.security.PrivilegedExceptionAction;
1313
import java.util.List;
1414
import org.apache.hadoop.conf.Configuration;
15+
import org.apache.hadoop.hbase.HBaseConfiguration;
1516
import org.apache.hadoop.hbase.client.Connection;
1617
import org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsResponse;
1718
import org.apache.hadoop.hbase.security.User;
@@ -33,7 +34,7 @@ public class HBaseMiniCluster {
3334

3435
private final String zkDataDir;
3536

36-
private Object hbaseLocalCluster;
37+
private GeoWaveHBaseUtility hbaseLocalCluster;
3738
private final String hbaseLibDir;
3839
private final String hbaseDataDir;
3940
private final int numRegionServers;
@@ -71,15 +72,11 @@ public void setup() {
7172
}
7273

7374
final ClassLoader prevCl = Thread.currentThread().getContextClassLoader();
74-
final ClassLoader hbaseMiniClusterCl =
75-
HBaseMiniClusterClassLoader.getInstance(prevCl, hbaseLibDir);
75+
final ClassLoader hbaseMiniClusterCl = prevCl;
76+
// HBaseMiniClusterClassLoader.getInstance(prevCl, hbaseLibDir);
7677
Thread.currentThread().setContextClassLoader(hbaseMiniClusterCl);
7778
try {
78-
final Configuration conf =
79-
(Configuration) Class.forName(
80-
"org.apache.hadoop.hbase.HBaseConfiguration",
81-
true,
82-
hbaseMiniClusterCl).getMethod("create").invoke(null);
79+
final Configuration conf = HBaseConfiguration.create();
8380
System.setProperty("test.build.data.basedirectory", hbaseDataDir);
8481
conf.setBoolean("hbase.online.schema.update.enable", true);
8582
conf.setBoolean("hbase.defaults.for.version.skip", true);
@@ -116,18 +113,9 @@ public void setup() {
116113

117114
// HBaseTestingUtility must be loaded dynamically by the
118115
// minicluster class loader
119-
hbaseLocalCluster =
120-
Class.forName(
121-
// "org.apache.hadoop.hbase.HBaseTestingUtility",
122-
"org.locationtech.geowave.datastore.hbase.cli.GeoWaveHBaseUtility",
123-
true,
124-
hbaseMiniClusterCl).getConstructor(Configuration.class).newInstance(conf);
125-
116+
hbaseLocalCluster = new GeoWaveHBaseUtility(conf);
126117
// Start the cluster
127-
hbaseLocalCluster.getClass().getMethod(
128-
"startMiniHBaseCluster",
129-
Integer.TYPE,
130-
Integer.TYPE).invoke(hbaseLocalCluster, 1, numRegionServers);
118+
hbaseLocalCluster.startMiniCluster(1, numRegionServers);
131119

132120

133121
if (enableVisibility) {

pom.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,54 @@
721721
</exclusion>
722722
</exclusions>
723723
</dependency>
724+
<dependency>
725+
<groupId>org.apache.hadoop</groupId>
726+
<artifactId>hadoop-client-api</artifactId>
727+
<version>${hadoop.version}</version>
728+
<scope>${hadoop.scope}</scope>
729+
<exclusions>
730+
<exclusion>
731+
<groupId>org.slf4j</groupId>
732+
<artifactId>slf4j-log4j12</artifactId>
733+
</exclusion>
734+
<exclusion>
735+
<groupId>log4j</groupId>
736+
<artifactId>log4j</artifactId>
737+
</exclusion>
738+
</exclusions>
739+
</dependency>
740+
<dependency>
741+
<groupId>org.apache.hadoop</groupId>
742+
<artifactId>hadoop-client-runtime</artifactId>
743+
<version>${hadoop.version}</version>
744+
<scope>${hadoop.scope}</scope>
745+
<exclusions>
746+
<exclusion>
747+
<groupId>org.slf4j</groupId>
748+
<artifactId>slf4j-log4j12</artifactId>
749+
</exclusion>
750+
<exclusion>
751+
<groupId>log4j</groupId>
752+
<artifactId>log4j</artifactId>
753+
</exclusion>
754+
</exclusions>
755+
</dependency>
756+
<dependency>
757+
<groupId>org.apache.hadoop</groupId>
758+
<artifactId>hadoop-hdfs-client</artifactId>
759+
<version>${hadoop.version}</version>
760+
<scope>${hadoop.scope}</scope>
761+
<exclusions>
762+
<exclusion>
763+
<groupId>org.slf4j</groupId>
764+
<artifactId>slf4j-log4j12</artifactId>
765+
</exclusion>
766+
<exclusion>
767+
<groupId>log4j</groupId>
768+
<artifactId>log4j</artifactId>
769+
</exclusion>
770+
</exclusions>
771+
</dependency>
724772
<dependency>
725773
<groupId>org.apache.hadoop</groupId>
726774
<artifactId>hadoop-minikdc</artifactId>

python/src/main/python/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ shapely==2.0.4
33
pytest==8.3.3
44
pytest-cov==5.0.0
55
pdoc3==0.6.3
6+
7+
setuptools>=68.0.0
8+
wheel>=0.41.0

test/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@
8585
</groupId>
8686
<artifactId>spring-security-oauth2</artifactId>
8787
</exclusion>
88+
<exclusion>
89+
<groupId>org.apache.hbase</groupId>
90+
<artifactId>hbase-shaded-client</artifactId>
91+
</exclusion>
8892
</exclusions>
8993
</dependency>
9094
<dependency>
@@ -186,6 +190,10 @@
186190
<groupId>org.codehaus.jackson</groupId>
187191
<artifactId>jackson-jaxrs</artifactId>
188192
</exclusion>
193+
<exclusion>
194+
<groupId>org.apache.hbase</groupId>
195+
<artifactId>hbase-shaded-client</artifactId>
196+
</exclusion>
189197
</exclusions>
190198
</dependency>
191199
<dependency>
@@ -387,6 +395,10 @@
387395
<artifactId>accumulo-native</artifactId>
388396
<groupId>org.apache.accumulo</groupId>
389397
</exclusion>
398+
<exclusion>
399+
<groupId>org.apache.hadoop</groupId>
400+
<artifactId>hadoop-client-minicluster</artifactId>
401+
</exclusion>
390402
</exclusions>
391403
</dependency>
392404
<dependency>

0 commit comments

Comments
 (0)