public class RangerRestClientImpl extends Object implements RangerRestClient
Constructor and Description |
---|
RangerRestClientImpl() |
Modifier and Type | Method and Description |
---|---|
List<RangerPolicy> |
changeDataSet(List<RangerPolicy> rangerPolicies,
String sourceDbName,
String targetDbName) |
boolean |
checkConnection(String url,
HiveConf hiveConf) |
void |
deleteRangerPolicy(String policyName,
String baseUrl,
String rangerHiveServiceName,
HiveConf hiveConf) |
RangerExportPolicyList |
exportRangerPolicies(String sourceRangerEndpoint,
String dbName,
String rangerHiveServiceName,
HiveConf hiveConf) |
RangerPolicy |
getDenyPolicyForReplicatedDb(String rangerServiceName,
String sourceDb,
String targetDb) |
String |
getRangerDeleteUrl(String rangerUrl,
String policyName,
String serviceName) |
String |
getRangerExportUrl(String sourceRangerEndpoint,
String rangerHiveServiceName,
String dbName) |
String |
getRangerImportUrl(String rangerUrl,
String dbName) |
RangerExportPolicyList |
importRangerPolicies(RangerExportPolicyList rangerExportPolicyList,
String dbName,
String baseUrl,
String rangerHiveServiceName,
HiveConf hiveConf) |
RangerExportPolicyList |
readRangerPoliciesFromJsonFile(org.apache.hadoop.fs.Path filePath,
HiveConf conf) |
List<RangerPolicy> |
removeMultiResourcePolicies(List<RangerPolicy> rangerPolicies) |
org.apache.hadoop.fs.Path |
saveRangerPoliciesToFile(RangerExportPolicyList rangerExportPolicyList,
org.apache.hadoop.fs.Path stagingDirPath,
String fileName,
HiveConf conf) |
public RangerExportPolicyList exportRangerPolicies(String sourceRangerEndpoint, String dbName, String rangerHiveServiceName, HiveConf hiveConf) throws Exception
exportRangerPolicies
in interface RangerRestClient
Exception
public String getRangerExportUrl(String sourceRangerEndpoint, String rangerHiveServiceName, String dbName) throws URISyntaxException
URISyntaxException
public List<RangerPolicy> removeMultiResourcePolicies(List<RangerPolicy> rangerPolicies)
removeMultiResourcePolicies
in interface RangerRestClient
public void deleteRangerPolicy(String policyName, String baseUrl, String rangerHiveServiceName, HiveConf hiveConf) throws Exception
deleteRangerPolicy
in interface RangerRestClient
Exception
public RangerExportPolicyList importRangerPolicies(RangerExportPolicyList rangerExportPolicyList, String dbName, String baseUrl, String rangerHiveServiceName, HiveConf hiveConf) throws Exception
importRangerPolicies
in interface RangerRestClient
Exception
public String getRangerImportUrl(String rangerUrl, String dbName) throws URISyntaxException
URISyntaxException
public String getRangerDeleteUrl(String rangerUrl, String policyName, String serviceName) throws URISyntaxException
URISyntaxException
public List<RangerPolicy> changeDataSet(List<RangerPolicy> rangerPolicies, String sourceDbName, String targetDbName)
changeDataSet
in interface RangerRestClient
public org.apache.hadoop.fs.Path saveRangerPoliciesToFile(RangerExportPolicyList rangerExportPolicyList, org.apache.hadoop.fs.Path stagingDirPath, String fileName, HiveConf conf) throws SemanticException
saveRangerPoliciesToFile
in interface RangerRestClient
SemanticException
public RangerExportPolicyList readRangerPoliciesFromJsonFile(org.apache.hadoop.fs.Path filePath, HiveConf conf) throws SemanticException
readRangerPoliciesFromJsonFile
in interface RangerRestClient
SemanticException
public boolean checkConnection(String url, HiveConf hiveConf) throws SemanticException
checkConnection
in interface RangerRestClient
SemanticException
public RangerPolicy getDenyPolicyForReplicatedDb(String rangerServiceName, String sourceDb, String targetDb) throws SemanticException
getDenyPolicyForReplicatedDb
in interface RangerRestClient
SemanticException
Copyright © 2022 The Apache Software Foundation. All rights reserved.