use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHbaseResourceMapper method testHbaseNamespaceAndTable.
@Test
public void testHbaseNamespaceAndTable() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(ENTITY_ATTRIBUTE_QUALIFIED_NAME, TABLE_WITH_NAMESPACE_QUALIFIED_NAME);
RangerAtlasEntity entity = getHbaseTableEntity(entAttribs);
RangerServiceResource resource = resourceMapper.buildResource(entity);
assertTableWithNamespaceResource(resource);
}
use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHbaseResourceMapper method testHbaseNamespace.
@Test
public void testHbaseNamespace() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(ENTITY_ATTRIBUTE_QUALIFIED_NAME, NAMESPACE_QUALIFIED_NAME);
RangerAtlasEntity entity = getHbaseNamespaceEntity(entAttribs);
RangerServiceResource resource = resourceMapper.buildResource(entity);
assertNamespaceResource(resource);
}
use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHdfsResourceMapper method testHdfsResourceFromPathAndClusterName.
@Test
public void testHdfsResourceFromPathAndClusterName() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(AtlasHdfsResourceMapper.ENTITY_ATTRIBUTE_PATH, PATH);
entAttribs.put(AtlasHdfsResourceMapper.ENTITY_ATTRIBUTE_CLUSTER_NAME, CLUSTER_NAME);
RangerAtlasEntity entity = getHdfsPathEntity(entAttribs);
RangerServiceResource resource = resourceMapper.buildResource(entity);
assertServiceResource(resource);
}
use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHdfsResourceMapper method testHdfsResourceFromQualifiedNameAndNameServiceId.
@Test
public void testHdfsResourceFromQualifiedNameAndNameServiceId() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(AtlasHdfsResourceMapper.ENTITY_ATTRIBUTE_QUALIFIED_NAME, QUALIFIED_NAME);
entAttribs.put(AtlasHdfsResourceMapper.ENTITY_ATTRIBUTE_NAME_SERVICE_ID, NAMESERVICE_ID);
RangerAtlasEntity entity = getHdfsPathEntity(entAttribs);
RangerServiceResource resource = resourceMapper.buildResource(entity);
assertFederatedServiceResource(resource);
}
use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHdfsResourceMapper method testHdfsResourceFromClusterNameAndQualifiedName.
@Test
public void testHdfsResourceFromClusterNameAndQualifiedName() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(AtlasHdfsResourceMapper.ENTITY_ATTRIBUTE_CLUSTER_NAME, CLUSTER_NAME);
entAttribs.put(AtlasHdfsResourceMapper.ENTITY_ATTRIBUTE_QUALIFIED_NAME, QUALIFIED_NAME);
RangerAtlasEntity entity = getHdfsPathEntity(entAttribs);
RangerServiceResource resource = resourceMapper.buildResource(entity);
assertServiceResource(resource);
}
Aggregations