use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHbaseResourceMapper method testHbaseDottedTable.
@Test
public void testHbaseDottedTable() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(ENTITY_ATTRIBUTE_QUALIFIED_NAME, DOTTED_TABLE_QUALIFIED_NAME);
RangerAtlasEntity entity = getHbaseTableEntity(entAttribs);
RangerServiceResource resource = resourceMapper.buildResource(entity);
assertTableResource(resource, true);
}
use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHbaseResourceMapper method testHbaseDottedColumnFamily.
@Test
public void testHbaseDottedColumnFamily() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(ENTITY_ATTRIBUTE_QUALIFIED_NAME, DOTTED_COLUMN_FAMILY_QUALIFIED_NAME);
RangerAtlasEntity entity = getHbaseColumnFamilyEntity(entAttribs);
RangerServiceResource resource = resourceMapper.buildResource(entity);
assertColumnFamilyResource(resource, true);
}
use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHbaseResourceMapper method testHbaseColumn.
@Test
public void testHbaseColumn() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(ENTITY_ATTRIBUTE_QUALIFIED_NAME, COLUMN_QUALIFIED_NAME);
RangerAtlasEntity entity = getHbaseColumnEntity(entAttribs);
RangerServiceResource resource = resourceMapper.buildResource(entity);
assertColumnResource(resource, false);
}
use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHbaseResourceMapper method testHbaseTable.
@Test
public void testHbaseTable() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
entAttribs.put(ENTITY_ATTRIBUTE_QUALIFIED_NAME, TABLE_QUALIFIED_NAME);
RangerAtlasEntity entity = getHbaseTableEntity(entAttribs);
RangerServiceResource resource = resourceMapper.buildResource(entity);
assertTableResource(resource, false);
}
use of org.apache.ranger.plugin.model.RangerServiceResource in project ranger by apache.
the class TestHbaseResourceMapper method testHbaseResourceFromMissingAttribs.
@Test
public void testHbaseResourceFromMissingAttribs() throws Exception {
Map<String, Object> entAttribs = new HashMap<String, Object>();
RangerAtlasEntity entity = getHbaseTableEntity(entAttribs);
try {
RangerServiceResource resource = resourceMapper.buildResource(entity);
Assert.fail("expected exception. Found " + resource);
} catch (Exception excp) {
// ignore
}
}
Aggregations