use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHdfsResourceMapper method testHdfsResourceFromPathAndClusterNameAndQualifiedName.
@Test
public void testHdfsResourceFromPathAndClusterNameAndQualifiedName() 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);
entAttribs.put(AtlasHdfsResourceMapper.ENTITY_ATTRIBUTE_QUALIFIED_NAME, QUALIFIED_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 testHdfsResourceFromPathAndClusterNameFromDefault.
@Test
public void testHdfsResourceFromPathAndClusterNameFromDefault() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(AtlasHdfsResourceMapper.ENTITY_ATTRIBUTE_PATH, PATH);
RangerAtlasEntity entity = getHdfsPathEntity(entAttribs);
RangerServiceResource resource = resourceMapperWithDefaultClusterName.buildResource(entity);
assertServiceResource(resource);
}
use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHdfsResourceMapper method testHdfsResourceFromQualifiedNameAndNameServiceIdFromProperty.
@Test
public void testHdfsResourceFromQualifiedNameAndNameServiceIdFromProperty() 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 = resourceMapperWithFederatedService.buildResource(entity);
assertServiceResource(resource);
}
use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHiveResourceMapper method testHiveColumn.
@Test
public void testHiveColumn() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(AtlasHiveResourceMapper.ENTITY_ATTRIBUTE_QUALIFIED_NAME, COLUMN_QUALIFIED_NAME);
RangerAtlasEntity entity = getHiveColumnEntity(entAttribs);
RangerServiceResource resource = resourceMapper.buildResource(entity);
assertColumnResource(resource);
}
use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHiveResourceMapper method testHiveDb.
@Test
public void testHiveDb() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(AtlasHiveResourceMapper.ENTITY_ATTRIBUTE_QUALIFIED_NAME, DB_QUALIFIED_NAME);
RangerAtlasEntity entity = getHiveDbEntity(entAttribs);
RangerServiceResource resource = resourceMapper.buildResource(entity);
assertDbResource(resource);
}
Aggregations