RANGER-3971:Upgrade-HBASE-version-to-2.4.6
(cherry picked from commit 3074e9fa349b769e391da5ad5eb95a20aaa95e9f)
diff --git a/distro/src/main/assembly/admin-web.xml b/distro/src/main/assembly/admin-web.xml
index 81a41d3..6a49815 100644
--- a/distro/src/main/assembly/admin-web.xml
+++ b/distro/src/main/assembly/admin-web.xml
@@ -101,6 +101,7 @@
<include>org.apache.hbase:hbase-protocol:jar:${hbase.version}</include>
<include>org.apache.hbase:hbase-server:jar:${hbase.version}</include>
<include>org.apache.hbase:hbase-protocol-shaded:jar:${hbase.version}</include>
+ <include>org.apache.hbase:hbase-shaded-client:jar:${hbase.version}</include>
<include>org.apache.hbase.thirdparty:hbase-shaded-protobuf:jar:${hbase-shaded-protobuf}</include>
<include>org.apache.hbase.thirdparty:hbase-shaded-netty:jar:${hbase-shaded-netty}</include>
<include>org.apache.hbase.thirdparty:hbase-shaded-miscellaneous:jar:${hbase-shaded-miscellaneous}</include>
diff --git a/hbase-agent/pom.xml b/hbase-agent/pom.xml
index 20d3e30..90063e1 100644
--- a/hbase-agent/pom.xml
+++ b/hbase-agent/pom.xml
@@ -76,6 +76,11 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>org.apache.hbase</groupId>
+ <artifactId>hbase-shaded-client</artifactId>
+ <version>${hbase.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.ranger</groupId>
<artifactId>ranger-plugins-common</artifactId>
<version>${project.version}</version>
diff --git a/hbase-agent/src/main/java/org/apache/ranger/authorization/hbase/RangerAuthorizationCoprocessor.java b/hbase-agent/src/main/java/org/apache/ranger/authorization/hbase/RangerAuthorizationCoprocessor.java
index fbb1bb4..4bdf442 100644
--- a/hbase-agent/src/main/java/org/apache/ranger/authorization/hbase/RangerAuthorizationCoprocessor.java
+++ b/hbase-agent/src/main/java/org/apache/ranger/authorization/hbase/RangerAuthorizationCoprocessor.java
@@ -788,7 +788,7 @@ public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx) t
Throwable var3 = null;
try {
- if(!admin.tableExists(AccessControlLists.ACL_TABLE_NAME)) {
+ if(!admin.tableExists(PermissionStorage.ACL_TABLE_NAME)) {
createACLTable(admin);
}
} catch (Throwable var12) {
@@ -812,8 +812,8 @@ public void postStartMaster(ObserverContext<MasterCoprocessorEnvironment> ctx) t
}
private static void createACLTable(Admin admin) throws IOException {
- ColumnFamilyDescriptor cfd = ColumnFamilyDescriptorBuilder.newBuilder(AccessControlLists.ACL_LIST_FAMILY).setMaxVersions(1).setInMemory(true).setBlockCacheEnabled(true).setBlocksize(8192).setBloomFilterType(BloomType.NONE).setScope(0).build();
- TableDescriptor td = TableDescriptorBuilder.newBuilder(AccessControlLists.ACL_TABLE_NAME).addColumnFamily(cfd).build();
+ ColumnFamilyDescriptor cfd = ColumnFamilyDescriptorBuilder.newBuilder(PermissionStorage.ACL_LIST_FAMILY).setMaxVersions(1).setInMemory(true).setBlockCacheEnabled(true).setBlocksize(8192).setBloomFilterType(BloomType.NONE).setScope(0).build();
+ TableDescriptor td = TableDescriptorBuilder.newBuilder(PermissionStorage.ACL_TABLE_NAME).addColumnFamily(cfd).build();
admin.createTable(td);
}
@@ -1403,7 +1403,7 @@ public List<UserPermission> run() throws Exception {
});
if (_userUtils.isSuperUser(user)) {
perms.add(new UserPermission(_userUtils.getUserAsString(user),
- Permission.newBuilder(AccessControlLists.ACL_TABLE_NAME).withActions(Action.values()).build()));
+ Permission.newBuilder(PermissionStorage.ACL_TABLE_NAME).withActions(Action.values()).build()));
}
}
response = AccessControlUtil.buildGetUserPermissionsResponse(perms);
diff --git a/pom.xml b/pom.xml
index 1615f98..43a7589 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,13 +124,13 @@
<hadoop.version>3.3.0</hadoop.version>
<ozone.version>1.0.0</ozone.version>
<hamcrest.version>2.2</hamcrest.version>
- <hbase.version>2.2.6</hbase.version>
+ <hbase.version>2.4.6</hbase.version>
<hive.version>3.1.2</hive.version>
<hive.storage-api.version>2.7.2</hive.storage-api.version>
<orc.version>1.5.8</orc.version>
- <hbase-shaded-protobuf>3.3.0</hbase-shaded-protobuf>
- <hbase-shaded-netty>3.3.0</hbase-shaded-netty>
- <hbase-shaded-miscellaneous>3.3.0</hbase-shaded-miscellaneous>
+ <hbase-shaded-protobuf>3.5.1</hbase-shaded-protobuf>
+ <hbase-shaded-netty>3.5.1</hbase-shaded-netty>
+ <hbase-shaded-miscellaneous>3.5.1</hbase-shaded-miscellaneous>
<libfb303.version>0.9.3</libfb303.version>
<libthrift.version>0.13.0</libthrift.version>
<htrace-core.version>4.1.0-incubating</htrace-core.version>