target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testGetPathEntityS3AV2Path() { PathExtractorContext extractorContext = new PathExtractorContext(METADATA_NAMESPACE, AWS_S3_ATLAS_MODEL_VERSION_V2); Path path = new Path(S3A_PATH); AtlasEntityWithExtInfo entityWithExtInfo = AtlasPathExtractorUtil.getPathEntity(path, extractorContext); AtlasEntity entit...
public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } if (isS3Path(strPath)) { ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
@Test public void testGetPathEntityS3Path() { PathExtractorContext extractorContext = new PathExtractorContext(METADATA_NAMESPACE); Path path = new Path(S3_PATH); AtlasEntityWithExtInfo entityWithExtInfo = AtlasPathExtractorUtil.getPathEntity(path, extractorContext); AtlasEntity entity = entityWithExtInfo.getEntity(); ...
public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } if (isS3Path(strPath)) { ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
@Test public void testStructTypeValidateValue() { List<String> messages = new ArrayList<>(); for (Object value : validValues) { assertTrue(structType.validateValue(value, "testObj", messages)); assertEquals(messages.size(), 0, "value=" + value); } for (Object value : invalidValues) { assertFalse(structType.validateValu...
@Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof AtlasStruct) { AtlasStruct structObj = (AtlasStruct) obj; for (AtlasAttributeDef attributeDef : structDef.getAttributeDefs()) { String attrName = attributeDef.getName(); ...
AtlasStructType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof AtlasStruct) { AtlasStruct structObj = (AtlasStruct) obj; for (AtlasAttributeDef attributeDef : structDef.getAttributeDefs()) { String...
AtlasStructType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof AtlasStruct) { AtlasStruct structObj = (AtlasStruct) obj; for (AtlasAttributeDef attributeDef : structDef.getAttributeDefs()) { String...
AtlasStructType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof AtlasStruct) { AtlasStruct structObj = (AtlasStruct) obj; for (AtlasAttributeDef attributeDef : structDef.getAttributeDefs()) { String...
AtlasStructType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof AtlasStruct) { AtlasStruct structObj = (AtlasStruct) obj; for (AtlasAttributeDef attributeDef : structDef.getAttributeDefs()) { String...
@Test public void testGetPathEntityS3APath() { PathExtractorContext extractorContext = new PathExtractorContext(METADATA_NAMESPACE); Path path = new Path(S3A_PATH); AtlasEntityWithExtInfo entityWithExtInfo = AtlasPathExtractorUtil.getPathEntity(path, extractorContext); AtlasEntity entity = entityWithExtInfo.getEntity()...
public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } if (isS3Path(strPath)) { ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
AtlasPathExtractorUtil { public static AtlasEntityWithExtInfo getPathEntity(Path path, PathExtractorContext context) { AtlasEntityWithExtInfo entityWithExtInfo = new AtlasEntityWithExtInfo(); AtlasEntity ret; String strPath = path.toString(); if (context.isConvertPathToLowerCase()) { strPath = strPath.toLowerCase(); } ...
@Test public void updateClassificationsShouldNotThrowExceptionIfResponseIs204() { AtlasClientV2 atlasClient = new AtlasClientV2(service, configuration); AtlasClassification atlasClassification = new AtlasClassification("Testdb"); atlasClassification.setEntityGuid("abb672b1-e4bd-402d-a98f-73cd8f775e2a"); WebResource.Bui...
public void updateClassifications(String guid, List<AtlasClassification> classifications) throws AtlasServiceException { callAPI(formatPathParameters(API_V2.UPDATE_CLASSIFICATIONS, guid), (Class<?>)null, classifications); }
AtlasClientV2 extends AtlasBaseClient { public void updateClassifications(String guid, List<AtlasClassification> classifications) throws AtlasServiceException { callAPI(formatPathParameters(API_V2.UPDATE_CLASSIFICATIONS, guid), (Class<?>)null, classifications); } }
AtlasClientV2 extends AtlasBaseClient { public void updateClassifications(String guid, List<AtlasClassification> classifications) throws AtlasServiceException { callAPI(formatPathParameters(API_V2.UPDATE_CLASSIFICATIONS, guid), (Class<?>)null, classifications); } AtlasClientV2(String[] baseUrl, String[] basicAuthUserNa...
AtlasClientV2 extends AtlasBaseClient { public void updateClassifications(String guid, List<AtlasClassification> classifications) throws AtlasServiceException { callAPI(formatPathParameters(API_V2.UPDATE_CLASSIFICATIONS, guid), (Class<?>)null, classifications); } AtlasClientV2(String[] baseUrl, String[] basicAuthUserNa...
AtlasClientV2 extends AtlasBaseClient { public void updateClassifications(String guid, List<AtlasClassification> classifications) throws AtlasServiceException { callAPI(formatPathParameters(API_V2.UPDATE_CLASSIFICATIONS, guid), (Class<?>)null, classifications); } AtlasClientV2(String[] baseUrl, String[] basicAuthUserNa...
@Test public void updateClassificationsShouldThrowExceptionIfResponseIsNot204() { AtlasClientV2 atlasClient = new AtlasClientV2(service, configuration); AtlasClassification atlasClassification = new AtlasClassification("Testdb"); atlasClassification.setEntityGuid("abb672b1-e4bd-402d-a98f-73cd8f775e2a"); WebResource.Bui...
public void updateClassifications(String guid, List<AtlasClassification> classifications) throws AtlasServiceException { callAPI(formatPathParameters(API_V2.UPDATE_CLASSIFICATIONS, guid), (Class<?>)null, classifications); }
AtlasClientV2 extends AtlasBaseClient { public void updateClassifications(String guid, List<AtlasClassification> classifications) throws AtlasServiceException { callAPI(formatPathParameters(API_V2.UPDATE_CLASSIFICATIONS, guid), (Class<?>)null, classifications); } }
AtlasClientV2 extends AtlasBaseClient { public void updateClassifications(String guid, List<AtlasClassification> classifications) throws AtlasServiceException { callAPI(formatPathParameters(API_V2.UPDATE_CLASSIFICATIONS, guid), (Class<?>)null, classifications); } AtlasClientV2(String[] baseUrl, String[] basicAuthUserNa...
AtlasClientV2 extends AtlasBaseClient { public void updateClassifications(String guid, List<AtlasClassification> classifications) throws AtlasServiceException { callAPI(formatPathParameters(API_V2.UPDATE_CLASSIFICATIONS, guid), (Class<?>)null, classifications); } AtlasClientV2(String[] baseUrl, String[] basicAuthUserNa...
AtlasClientV2 extends AtlasBaseClient { public void updateClassifications(String guid, List<AtlasClassification> classifications) throws AtlasServiceException { callAPI(formatPathParameters(API_V2.UPDATE_CLASSIFICATIONS, guid), (Class<?>)null, classifications); } AtlasClientV2(String[] baseUrl, String[] basicAuthUserNa...
@Test public void shouldVerifyServerIsReady() throws AtlasServiceException { setupRetryParams(); AtlasClient atlasClient = new AtlasClient(service, configuration); WebResource.Builder builder = setupBuilder(AtlasClient.API_V1.VERSION, service); ClientResponse response = mock(ClientResponse.class); when(response.getStat...
public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(entityInstanceDefinition, Referenceable....
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
@Test public void testCreateEntity() throws Exception { setupRetryParams(); AtlasClient atlasClient = new AtlasClient(service, configuration); WebResource.Builder builder = setupBuilder(AtlasClient.API_V1.CREATE_ENTITY, service); ClientResponse response = mock(ClientResponse.class); when(response.getStatus()).thenRetur...
protected List<String> createEntity(ArrayNode entities) throws AtlasServiceException { LOG.debug("Creating entities: {}", entities); ObjectNode response = callAPIWithBody(API_V1.CREATE_ENTITY, entities.toString()); List<String> results = extractEntityResult(response).getCreatedEntities(); LOG.debug("Create entities ret...
AtlasClient extends AtlasBaseClient { protected List<String> createEntity(ArrayNode entities) throws AtlasServiceException { LOG.debug("Creating entities: {}", entities); ObjectNode response = callAPIWithBody(API_V1.CREATE_ENTITY, entities.toString()); List<String> results = extractEntityResult(response).getCreatedEnti...
AtlasClient extends AtlasBaseClient { protected List<String> createEntity(ArrayNode entities) throws AtlasServiceException { LOG.debug("Creating entities: {}", entities); ObjectNode response = callAPIWithBody(API_V1.CREATE_ENTITY, entities.toString()); List<String> results = extractEntityResult(response).getCreatedEnti...
AtlasClient extends AtlasBaseClient { protected List<String> createEntity(ArrayNode entities) throws AtlasServiceException { LOG.debug("Creating entities: {}", entities); ObjectNode response = callAPIWithBody(API_V1.CREATE_ENTITY, entities.toString()); List<String> results = extractEntityResult(response).getCreatedEnti...
AtlasClient extends AtlasBaseClient { protected List<String> createEntity(ArrayNode entities) throws AtlasServiceException { LOG.debug("Creating entities: {}", entities); ObjectNode response = callAPIWithBody(API_V1.CREATE_ENTITY, entities.toString()); List<String> results = extractEntityResult(response).getCreatedEnti...
@Test public void shouldGetAdminStatus() throws AtlasServiceException { setupRetryParams(); AtlasClient atlasClient = new AtlasClient(service, configuration); WebResource.Builder builder = setupBuilder(AtlasClient.API_V1.STATUS, service); ClientResponse response = mock(ClientResponse.class); when(response.getStatus())....
public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(entityInstanceDefinition, Referenceable....
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
@Test public void shouldReturnStatusAsUnknownIfJSONIsInvalid() throws AtlasServiceException { setupRetryParams(); AtlasClient atlasClient = new AtlasClient(service, configuration); WebResource.Builder builder = setupBuilder(AtlasClient.API_V1.STATUS, service); ClientResponse response = mock(ClientResponse.class); when(...
public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(entityInstanceDefinition, Referenceable....
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
@Test public void shouldSelectActiveAmongMultipleServersIfHAIsEnabled() { setupRetryParams(); when(client.resource(UriBuilder.fromUri("http: when(client.resource(UriBuilder.fromUri("http: WebResource.Builder builder = setupBuilder(AtlasClient.API_V1.STATUS, service); ClientResponse firstResponse = mock(ClientResponse.c...
public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(entityInstanceDefinition, Referenceable....
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
@Test public void shouldRetryUntilServiceBecomesActive() { setupRetryParams(); when(client.resource(UriBuilder.fromUri("http: WebResource.Builder builder = setupBuilder(AtlasClient.API_V1.STATUS, service); ClientResponse response = mock(ClientResponse.class); when(response.getStatus()).thenReturn(Response.Status.OK.get...
public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(entityInstanceDefinition, Referenceable....
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
@Test public void shouldRetryIfCannotConnectToServiceInitially() { setupRetryParams(); when(client.resource(UriBuilder.fromUri("http: WebResource.Builder builder = setupBuilder(AtlasClient.API_V1.STATUS, service); ClientResponse response = mock(ClientResponse.class); when(response.getStatus()).thenReturn(Response.Statu...
public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(entityInstanceDefinition, Referenceable....
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
@Test public void testEntityTypeDefaultValue() { AtlasEntity defValue = entityType.createDefaultValue(); assertNotNull(defValue); assertEquals(defValue.getTypeName(), entityType.getTypeName()); }
@Override public AtlasEntity createDefaultValue() { AtlasEntity ret = new AtlasEntity(entityDef.getName()); populateDefaultValues(ret); return ret; }
AtlasEntityType extends AtlasStructType { @Override public AtlasEntity createDefaultValue() { AtlasEntity ret = new AtlasEntity(entityDef.getName()); populateDefaultValues(ret); return ret; } }
AtlasEntityType extends AtlasStructType { @Override public AtlasEntity createDefaultValue() { AtlasEntity ret = new AtlasEntity(entityDef.getName()); populateDefaultValues(ret); return ret; } AtlasEntityType(AtlasEntityDef entityDef); AtlasEntityType(AtlasEntityDef entityDef, AtlasTypeRegistry typeRegistry); }
AtlasEntityType extends AtlasStructType { @Override public AtlasEntity createDefaultValue() { AtlasEntity ret = new AtlasEntity(entityDef.getName()); populateDefaultValues(ret); return ret; } AtlasEntityType(AtlasEntityDef entityDef); AtlasEntityType(AtlasEntityDef entityDef, AtlasTypeRegistry typeRegistry); AtlasEnti...
AtlasEntityType extends AtlasStructType { @Override public AtlasEntity createDefaultValue() { AtlasEntity ret = new AtlasEntity(entityDef.getName()); populateDefaultValues(ret); return ret; } AtlasEntityType(AtlasEntityDef entityDef); AtlasEntityType(AtlasEntityDef entityDef, AtlasTypeRegistry typeRegistry); AtlasEnti...
@Test(expectedExceptions = IllegalArgumentException.class) public void shouldThrowExceptionIfActiveServerIsNotFound() { setupRetryParams(); when(client.resource(UriBuilder.fromUri("http: WebResource.Builder builder = setupBuilder(AtlasClient.API_V1.STATUS, service); ClientResponse response = mock(ClientResponse.class);...
public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(entityInstanceDefinition, Referenceable....
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
AtlasClient extends AtlasBaseClient { public Referenceable getEntity(String guid) throws AtlasServiceException { ObjectNode jsonResponse = callAPIWithBodyAndParams(API_V1.GET_ENTITY, null, guid); String entityInstanceDefinition = AtlasType.toJson(jsonResponse.get(AtlasClient.DEFINITION)); return AtlasType.fromV1Json(en...
@Test public void shouldNotCreateAtlasTopicIfNotConfiguredToDoSo() { Configuration configuration = mock(Configuration.class); when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)). thenReturn(false); when(configuration.getString("atlas.authentication.method.kerberos")).thenReturn(...
public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { try { LOG.warn("Atte...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
@Test public void shouldNotCreateTopicIfItAlreadyExists() { Configuration configuration = mock(Configuration.class); when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)). thenReturn(true); when(configuration.getString("atlas.authentication.method.kerberos")).thenReturn("false"); ...
public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { try { LOG.warn("Atte...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
@Test public void shouldCreateTopicIfItDoesNotExist() { Configuration configuration = mock(Configuration.class); when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)). thenReturn(true); when(configuration.getString("atlas.authentication.method.kerberos")).thenReturn("false"); fina...
public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { try { LOG.warn("Atte...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
@Test public void shouldNotFailIfExceptionOccursDuringCreatingTopic() { Configuration configuration = mock(Configuration.class); when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)). thenReturn(true); when(configuration.getString("atlas.authentication.method.kerberos")).thenRetur...
public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { try { LOG.warn("Atte...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
@Test public void shouldCreateMultipleTopics() { Configuration configuration = mock(Configuration.class); when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)). thenReturn(true); when(configuration.getString("atlas.authentication.method.kerberos")).thenReturn("false"); final ZkUti...
public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { try { LOG.warn("Atte...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
@Test public void shouldCreateTopicEvenIfEarlierOneFails() { Configuration configuration = mock(Configuration.class); when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)). thenReturn(true); when(configuration.getString("atlas.authentication.method.kerberos")).thenReturn("false");...
public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { try { LOG.warn("Atte...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
@Test public void shouldCloseResources() { Configuration configuration = mock(Configuration.class); when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)). thenReturn(true); when(configuration.getString("atlas.authentication.method.kerberos")).thenReturn("false"); final ZkUtils zoo...
public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { try { LOG.warn("Atte...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
@Test public void shouldNotProcessTopicCreationIfSecurityFails() { Configuration configuration = mock(Configuration.class); when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)). thenReturn(true); final ZkUtils zookeeperUtils = mock(ZkUtils.class); final Map<String, Boolean> creat...
public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { try { LOG.warn("Atte...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
AtlasTopicCreator { public void createAtlasTopic(Configuration atlasProperties, String... topicNames) { if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) { if (!handleSecurity(atlasProperties)) { return; } ZkUtils zkUtils = createZkUtils(atlasProperties); for (String topicName : topicNames) { ...
@Test (timeOut = 10000) public void testNotifyEntitiesDoesNotHangOnException() throws Exception { List<HookNotification> hookNotifications = new ArrayList<>(); doThrow(new NotificationException(new Exception())).when(notificationInterface) .send(NotificationInterface.NotificationType.HOOK, hookNotifications); AtlasHook...
@VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxAttempts = ma...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
@Test public void testEntityTypeIsValidValue() { for (Object value : validValues) { assertTrue(entityType.isValidValue(value), "value=" + value); } for (Object value : invalidValues) { assertFalse(entityType.isValidValue(value), "value=" + value); } }
@Override public boolean isValidValue(Object obj) { if (obj != null) { for (AtlasEntityType superType : superTypes) { if (!superType.isValidValue(obj)) { return false; } } return super.isValidValue(obj) && validateRelationshipAttributes(obj); } return true; }
AtlasEntityType extends AtlasStructType { @Override public boolean isValidValue(Object obj) { if (obj != null) { for (AtlasEntityType superType : superTypes) { if (!superType.isValidValue(obj)) { return false; } } return super.isValidValue(obj) && validateRelationshipAttributes(obj); } return true; } }
AtlasEntityType extends AtlasStructType { @Override public boolean isValidValue(Object obj) { if (obj != null) { for (AtlasEntityType superType : superTypes) { if (!superType.isValidValue(obj)) { return false; } } return super.isValidValue(obj) && validateRelationshipAttributes(obj); } return true; } AtlasEntityType(At...
AtlasEntityType extends AtlasStructType { @Override public boolean isValidValue(Object obj) { if (obj != null) { for (AtlasEntityType superType : superTypes) { if (!superType.isValidValue(obj)) { return false; } } return super.isValidValue(obj) && validateRelationshipAttributes(obj); } return true; } AtlasEntityType(At...
AtlasEntityType extends AtlasStructType { @Override public boolean isValidValue(Object obj) { if (obj != null) { for (AtlasEntityType superType : superTypes) { if (!superType.isValidValue(obj)) { return false; } } return super.isValidValue(obj) && validateRelationshipAttributes(obj); } return true; } AtlasEntityType(At...
@Test public void testNotifyEntitiesRetriesOnException() throws NotificationException { List<HookNotification> hookNotifications = new ArrayList<HookNotification>() {{ add(new EntityCreateRequest("user")); } }; doThrow(new NotificationException(new Exception())).when(notificationInterface) .send(NotificationInterface.N...
@VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxAttempts = ma...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
@Test public void testFailedMessageIsLoggedIfRequired() throws NotificationException { List<HookNotification> hookNotifications = new ArrayList<HookNotification>() {{ add(new EntityCreateRequest("user")); } }; doThrow(new NotificationException(new Exception(), Arrays.asList("test message"))) .when(notificationInterface...
@VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxAttempts = ma...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
@Test public void testFailedMessageIsNotLoggedIfNotRequired() throws NotificationException { List<HookNotification> hookNotifications = new ArrayList<>(); doThrow(new NotificationException(new Exception(), Arrays.asList("test message"))) .when(notificationInterface) .send(NotificationInterface.NotificationType.HOOK, ho...
@VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxAttempts = ma...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
@Test public void testAllFailedMessagesAreLogged() throws NotificationException { List<HookNotification> hookNotifications = new ArrayList<HookNotification>() {{ add(new EntityCreateRequest("user")); } }; doThrow(new NotificationException(new Exception(), Arrays.asList("test message1", "test message2"))) .when(notifica...
@VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxAttempts = ma...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
@Test public void testFailedMessageIsNotLoggedIfNotANotificationException() throws Exception { List<HookNotification> hookNotifications = new ArrayList<>(); doThrow(new RuntimeException("test message")).when(notificationInterface) .send(NotificationInterface.NotificationType.HOOK, hookNotifications); AtlasHook.notifyEn...
@VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxAttempts = ma...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
AtlasHook { @VisibleForTesting static void notifyEntitiesInternal(List<HookNotification> messages, int maxRetries, UserGroupInformation ugi, NotificationInterface notificationInterface, boolean shouldLogFailedMessages, FailedMessagesLogger logger) { if (messages == null || messages.isEmpty()) { return; } final int maxA...
@Test(enabled = true) public void testAccessAllowedForUserAndGroup() { try { AtlasEntityAccessRequest request = new AtlasEntityAccessRequest(null, AtlasPrivilege.ENTITY_UPDATE); request.setUser("admin", Collections.singleton("ROLE_ADMIN")); boolean isAccessAllowed = authorizer.isAccessAllowed(request); AssertJUnit.asse...
@Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.getUser(), request.getUserGroups()); for (String rol...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
@Test(enabled = true) public void testAccessAllowedForGroup() { try { AtlasEntityAccessRequest request = new AtlasEntityAccessRequest(null, AtlasPrivilege.ENTITY_UPDATE); request.setUser("nonmappeduser", Collections.singleton("ROLE_ADMIN")); boolean isAccessAllowed = authorizer.isAccessAllowed(request); AssertJUnit.ass...
@Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.getUser(), request.getUserGroups()); for (String rol...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
@Test(enabled = true) public void testAccessNotAllowedForUserAndGroup() { try { AtlasEntityAccessRequest request = new AtlasEntityAccessRequest(null, AtlasPrivilege.ENTITY_UPDATE); request.setUser("nonmappeduser", Collections.singleton("GROUP-NOT-IN-POLICYFILE")); boolean isAccessAllowed = authorizer.isAccessAllowed(re...
@Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.getUser(), request.getUserGroups()); for (String rol...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
@Test(enabled = true) public void testLabels() { try { AtlasEntityAccessRequest request = new AtlasEntityAccessRequest(null, AtlasPrivilege.ENTITY_ADD_LABEL); request.setUser(USER_DATA_SCIENTIST, Collections.emptySet()); boolean isAccessAllowed = authorizer.isAccessAllowed(request); AssertJUnit.assertEquals("user " + U...
@Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.getUser(), request.getUserGroups()); for (String rol...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
@Test(enabled = true) public void testBusinessMetadata() { try { AtlasEntityAccessRequest request = new AtlasEntityAccessRequest(null, AtlasPrivilege.ENTITY_UPDATE_BUSINESS_METADATA); request.setUser(USER_DATA_SCIENTIST, Collections.emptySet()); boolean isAccessAllowed = authorizer.isAccessAllowed(request); AssertJUnit...
@Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.getUser(), request.getUserGroups()); for (String rol...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
AtlasSimpleAuthorizer implements AtlasAuthorizer { @Override public boolean isAccessAllowed(AtlasAdminAccessRequest request) throws AtlasAuthorizationException { if (LOG.isDebugEnabled()) { LOG.debug("==> SimpleAtlasAuthorizer.isAccessAllowed({})", request); } boolean ret = false; Set<String> roles = getRoles(request.g...
@Test public void testEntityTypeGetNormalizedValue() { assertNull(entityType.getNormalizedValue(null), "value=" + null); for (Object value : validValues) { if (value == null) { continue; } Object normalizedValue = entityType.getNormalizedValue(value); assertNotNull(normalizedValue, "value=" + value); } for (Object valu...
@Override public Object getNormalizedValue(Object obj) { Object ret = null; if (obj != null) { if (isValidValue(obj)) { if (obj instanceof AtlasEntity) { normalizeAttributeValues((AtlasEntity) obj); ret = obj; } else if (obj instanceof Map) { normalizeAttributeValues((Map) obj); ret = obj; } } } return ret; }
AtlasEntityType extends AtlasStructType { @Override public Object getNormalizedValue(Object obj) { Object ret = null; if (obj != null) { if (isValidValue(obj)) { if (obj instanceof AtlasEntity) { normalizeAttributeValues((AtlasEntity) obj); ret = obj; } else if (obj instanceof Map) { normalizeAttributeValues((Map) obj)...
AtlasEntityType extends AtlasStructType { @Override public Object getNormalizedValue(Object obj) { Object ret = null; if (obj != null) { if (isValidValue(obj)) { if (obj instanceof AtlasEntity) { normalizeAttributeValues((AtlasEntity) obj); ret = obj; } else if (obj instanceof Map) { normalizeAttributeValues((Map) obj)...
AtlasEntityType extends AtlasStructType { @Override public Object getNormalizedValue(Object obj) { Object ret = null; if (obj != null) { if (isValidValue(obj)) { if (obj instanceof AtlasEntity) { normalizeAttributeValues((AtlasEntity) obj); ret = obj; } else if (obj instanceof Map) { normalizeAttributeValues((Map) obj)...
AtlasEntityType extends AtlasStructType { @Override public Object getNormalizedValue(Object obj) { Object ret = null; if (obj != null) { if (isValidValue(obj)) { if (obj instanceof AtlasEntity) { normalizeAttributeValues((AtlasEntity) obj); ret = obj; } else if (obj instanceof Map) { normalizeAttributeValues((Map) obj)...
@Test public void testGetTopTermsAsendingInput() { Map<String, AtlasJanusGraphIndexClient.TermFreq> terms = generateTerms( 10, 12, 15); List<String> top5Terms = AtlasJanusGraphIndexClient.getTopTerms(terms); assertOrder(top5Terms, 2,1,0); }
@VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : termsMap.values()) { termsQueue.add(term); } ret = new ArrayLis...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
@Test public void testGetTopTermsAsendingInput2() { Map<String, AtlasJanusGraphIndexClient.TermFreq> terms = generateTerms( 10, 12, 15, 20, 25, 26, 30, 40); List<String> top5Terms = AtlasJanusGraphIndexClient.getTopTerms(terms); assertOrder(top5Terms, 7, 6, 5, 4, 3); }
@VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : termsMap.values()) { termsQueue.add(term); } ret = new ArrayLis...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
@Test public void testGetTopTermsDescendingInput() { Map<String, AtlasJanusGraphIndexClient.TermFreq> terms = generateTerms( 10, 9, 8); List<String> top5Terms = AtlasJanusGraphIndexClient.getTopTerms(terms); assertOrder(top5Terms, 0, 1, 2); }
@VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : termsMap.values()) { termsQueue.add(term); } ret = new ArrayLis...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
@Test public void testGetTopTermsDescendingInput2() { Map<String, AtlasJanusGraphIndexClient.TermFreq> terms = generateTerms( 10, 9, 8, 7, 6, 5, 4, 3, 2); List<String> top5Terms = AtlasJanusGraphIndexClient.getTopTerms(terms); assertOrder(top5Terms, 0, 1, 2, 3, 4); }
@VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : termsMap.values()) { termsQueue.add(term); } ret = new ArrayLis...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
@Test public void testGetTopTermsRandom() { Map<String, AtlasJanusGraphIndexClient.TermFreq> terms = generateTerms( 10, 19, 28, 27, 16, 1, 30, 3, 36); List<String> top5Terms = AtlasJanusGraphIndexClient.getTopTerms(terms); assertOrder(top5Terms, 8, 6, 2, 3, 1); }
@VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : termsMap.values()) { termsQueue.add(term); } ret = new ArrayLis...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
@Test public void testGetTopTermsRandom2() { Map<String, AtlasJanusGraphIndexClient.TermFreq> terms = generateTerms( 36, 19, 28, 27, 16, 1, 30, 3, 10); List<String> top5Terms = AtlasJanusGraphIndexClient.getTopTerms(terms); assertOrder(top5Terms, 0, 6, 2, 3, 1); }
@VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : termsMap.values()) { termsQueue.add(term); } ret = new ArrayLis...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
@Test public void testGetTopTermsRandom3() { Map<String, AtlasJanusGraphIndexClient.TermFreq> terms = generateTerms( 36, 36, 28, 27, 16, 1, 30, 3, 10); List<String> top5Terms = AtlasJanusGraphIndexClient.getTopTerms(terms); assertOrder(top5Terms, 0, 1, 6, 2, 3); }
@VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : termsMap.values()) { termsQueue.add(term); } ret = new ArrayLis...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
@Test public void testGetTopTermsRandom4() { Map<String, AtlasJanusGraphIndexClient.TermFreq> terms = generateTerms( 10, 10, 28, 27, 16, 1, 30, 36, 36); List<String> top5Terms = AtlasJanusGraphIndexClient.getTopTerms(terms); assertOrder(top5Terms, 7, 8, 6, 2, 3); }
@VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : termsMap.values()) { termsQueue.add(term); } ret = new ArrayLis...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
@Test public void testGetTopTermsRandom5() { Map<String, AtlasJanusGraphIndexClient.TermFreq> terms = generateTerms( 36, 10, 28, 27, 16, 1, 30, 36, 36); List<String> top5Terms = AtlasJanusGraphIndexClient.getTopTerms(terms); assertOrder(top5Terms, 0, 7, 8, 6, 2); }
@VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : termsMap.values()) { termsQueue.add(term); } ret = new ArrayLis...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting static List<String> getTopTerms(Map<String, TermFreq> termsMap) { final List<String> ret; if (MapUtils.isNotEmpty(termsMap)) { PriorityQueue<TermFreq> termsQueue = new PriorityQueue(termsMap.size(), FREQ_COMPARATOR); for (TermFreq term : t...
@Test public void testGenerateSuggestionString() { List<String> fields = new ArrayList<>(); fields.add("one"); fields.add("two"); fields.add("three"); String generatedString = AtlasJanusGraphIndexClient.generateSuggestionsString(fields); Assert.assertEquals(generatedString, "'one', 'two', 'three'"); }
@VisibleForTesting protected static String generateSuggestionsString(List<String> suggestionIndexFieldNames) { StringBuilder ret = new StringBuilder(); Iterator<String> iterator = suggestionIndexFieldNames.iterator(); while(iterator.hasNext()) { ret.append("'").append(iterator.next()).append("'"); if(iterator.hasNext()...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting protected static String generateSuggestionsString(List<String> suggestionIndexFieldNames) { StringBuilder ret = new StringBuilder(); Iterator<String> iterator = suggestionIndexFieldNames.iterator(); while(iterator.hasNext()) { ret.append("...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting protected static String generateSuggestionsString(List<String> suggestionIndexFieldNames) { StringBuilder ret = new StringBuilder(); Iterator<String> iterator = suggestionIndexFieldNames.iterator(); while(iterator.hasNext()) { ret.append("...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting protected static String generateSuggestionsString(List<String> suggestionIndexFieldNames) { StringBuilder ret = new StringBuilder(); Iterator<String> iterator = suggestionIndexFieldNames.iterator(); while(iterator.hasNext()) { ret.append("...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting protected static String generateSuggestionsString(List<String> suggestionIndexFieldNames) { StringBuilder ret = new StringBuilder(); Iterator<String> iterator = suggestionIndexFieldNames.iterator(); while(iterator.hasNext()) { ret.append("...
@Test public void testEntityTypeValidateValue() { List<String> messages = new ArrayList<>(); for (Object value : validValues) { assertTrue(entityType.validateValue(value, "testObj", messages)); assertEquals(messages.size(), 0, "value=" + value); } for (Object value : invalidValues) { assertFalse(entityType.validateValu...
@Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof AtlasEntity || obj instanceof Map) { for (AtlasEntityType superType : superTypes) { ret = superType.validateValue(obj, objName, messages) && ret; } ret = super.validateVa...
AtlasEntityType extends AtlasStructType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof AtlasEntity || obj instanceof Map) { for (AtlasEntityType superType : superTypes) { ret = superType.validateValue(obj, objName, ...
AtlasEntityType extends AtlasStructType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof AtlasEntity || obj instanceof Map) { for (AtlasEntityType superType : superTypes) { ret = superType.validateValue(obj, objName, ...
AtlasEntityType extends AtlasStructType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof AtlasEntity || obj instanceof Map) { for (AtlasEntityType superType : superTypes) { ret = superType.validateValue(obj, objName, ...
AtlasEntityType extends AtlasStructType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof AtlasEntity || obj instanceof Map) { for (AtlasEntityType superType : superTypes) { ret = superType.validateValue(obj, objName, ...
@Test public void testGenerateSearchWeightString() { Map<String, Integer> fields = new HashMap<>(); fields.put("one", 10); fields.put("two", 1); fields.put("three", 15); String generatedString = AtlasJanusGraphIndexClient.generateSearchWeightString(fields); Assert.assertEquals(generatedString, " one^10 two^1 three^15")...
@VisibleForTesting protected static String generateSearchWeightString(Map<String, Integer> indexFieldName2SearchWeightMap) { StringBuilder searchWeightBuilder = new StringBuilder(); for (Map.Entry<String, Integer> entry : indexFieldName2SearchWeightMap.entrySet()) { searchWeightBuilder.append(" ") .append(entry.getKey(...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting protected static String generateSearchWeightString(Map<String, Integer> indexFieldName2SearchWeightMap) { StringBuilder searchWeightBuilder = new StringBuilder(); for (Map.Entry<String, Integer> entry : indexFieldName2SearchWeightMap.entry...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting protected static String generateSearchWeightString(Map<String, Integer> indexFieldName2SearchWeightMap) { StringBuilder searchWeightBuilder = new StringBuilder(); for (Map.Entry<String, Integer> entry : indexFieldName2SearchWeightMap.entry...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting protected static String generateSearchWeightString(Map<String, Integer> indexFieldName2SearchWeightMap) { StringBuilder searchWeightBuilder = new StringBuilder(); for (Map.Entry<String, Integer> entry : indexFieldName2SearchWeightMap.entry...
AtlasJanusGraphIndexClient implements AtlasGraphIndexClient { @VisibleForTesting protected static String generateSearchWeightString(Map<String, Integer> indexFieldName2SearchWeightMap) { StringBuilder searchWeightBuilder = new StringBuilder(); for (Map.Entry<String, Integer> entry : indexFieldName2SearchWeightMap.entry...
@Test public void vertexFetch() { JsonNode node = getCol1(); MappedElementCache cache = new MappedElementCache(); TinkerGraph tg = TinkerGraph.open(); addVertex(tg, node); Vertex vx = cache.getMappedVertex(tg, 98336); assertNotNull(vx); assertEquals(cache.lruVertexCache.size(), 1); }
public Vertex getMappedVertex(Graph gr, Object key) { try { Vertex ret = lruVertexCache.get(key); if (ret == null) { synchronized (lruVertexCache) { ret = lruVertexCache.get(key); if(ret == null) { ret = fetchVertex(gr, key); lruVertexCache.put(key, ret); } } } return ret; } catch (Exception ex) { LOG.error("getMappedV...
MappedElementCache { public Vertex getMappedVertex(Graph gr, Object key) { try { Vertex ret = lruVertexCache.get(key); if (ret == null) { synchronized (lruVertexCache) { ret = lruVertexCache.get(key); if(ret == null) { ret = fetchVertex(gr, key); lruVertexCache.put(key, ret); } } } return ret; } catch (Exception ex) { ...
MappedElementCache { public Vertex getMappedVertex(Graph gr, Object key) { try { Vertex ret = lruVertexCache.get(key); if (ret == null) { synchronized (lruVertexCache) { ret = lruVertexCache.get(key); if(ret == null) { ret = fetchVertex(gr, key); lruVertexCache.put(key, ret); } } } return ret; } catch (Exception ex) { ...
MappedElementCache { public Vertex getMappedVertex(Graph gr, Object key) { try { Vertex ret = lruVertexCache.get(key); if (ret == null) { synchronized (lruVertexCache) { ret = lruVertexCache.get(key); if(ret == null) { ret = fetchVertex(gr, key); lruVertexCache.put(key, ret); } } } return ret; } catch (Exception ex) { ...
MappedElementCache { public Vertex getMappedVertex(Graph gr, Object key) { try { Vertex ret = lruVertexCache.get(key); if (ret == null) { synchronized (lruVertexCache) { ret = lruVertexCache.get(key); if(ret == null) { ret = fetchVertex(gr, key); lruVertexCache.put(key, ret); } } } return ret; } catch (Exception ex) { ...
@Test public void idFetch() { JsonNode node = getCol1(); final int EXPECTED_ID = 98336; Object o = GraphSONUtility.getTypedValueFromJsonNode(node.get(GraphSONTokensTP2._ID)); assertNotNull(o); assertEquals((int) o, EXPECTED_ID); }
static Object getTypedValueFromJsonNode(final JsonNode node) { Object theValue = null; if (node != null && !node.isNull()) { if (node.isBoolean()) { theValue = node.booleanValue(); } else if (node.isDouble()) { theValue = node.doubleValue(); } else if (node.isFloatingPointNumber()) { theValue = node.floatValue(); } els...
GraphSONUtility { static Object getTypedValueFromJsonNode(final JsonNode node) { Object theValue = null; if (node != null && !node.isNull()) { if (node.isBoolean()) { theValue = node.booleanValue(); } else if (node.isDouble()) { theValue = node.doubleValue(); } else if (node.isFloatingPointNumber()) { theValue = node.f...
GraphSONUtility { static Object getTypedValueFromJsonNode(final JsonNode node) { Object theValue = null; if (node != null && !node.isNull()) { if (node.isBoolean()) { theValue = node.booleanValue(); } else if (node.isDouble()) { theValue = node.doubleValue(); } else if (node.isFloatingPointNumber()) { theValue = node.f...
GraphSONUtility { static Object getTypedValueFromJsonNode(final JsonNode node) { Object theValue = null; if (node != null && !node.isNull()) { if (node.isBoolean()) { theValue = node.booleanValue(); } else if (node.isDouble()) { theValue = node.doubleValue(); } else if (node.isFloatingPointNumber()) { theValue = node.f...
GraphSONUtility { static Object getTypedValueFromJsonNode(final JsonNode node) { Object theValue = null; if (node != null && !node.isNull()) { if (node.isBoolean()) { theValue = node.booleanValue(); } else if (node.isDouble()) { theValue = node.doubleValue(); } else if (node.isFloatingPointNumber()) { theValue = node.f...
@Test public void verifyReadProperties() { JsonNode node = getCol1(); Map<String, Object> props = GraphSONUtility.readProperties(node); assertEquals(props.get("__superTypeNames").getClass(), ArrayList.class); assertEquals(props.get("Asset.name").getClass(), String.class); assertEquals(props.get("hive_column.position")....
static Map<String, Object> readProperties(final JsonNode node) { final Map<String, Object> map = new HashMap<>(); final Iterator<Map.Entry<String, JsonNode>> iterator = node.fields(); while (iterator.hasNext()) { final Map.Entry<String, JsonNode> entry = iterator.next(); if (!isReservedKey(entry.getKey())) { final Obje...
GraphSONUtility { static Map<String, Object> readProperties(final JsonNode node) { final Map<String, Object> map = new HashMap<>(); final Iterator<Map.Entry<String, JsonNode>> iterator = node.fields(); while (iterator.hasNext()) { final Map.Entry<String, JsonNode> entry = iterator.next(); if (!isReservedKey(entry.getKe...
GraphSONUtility { static Map<String, Object> readProperties(final JsonNode node) { final Map<String, Object> map = new HashMap<>(); final Iterator<Map.Entry<String, JsonNode>> iterator = node.fields(); while (iterator.hasNext()) { final Map.Entry<String, JsonNode> entry = iterator.next(); if (!isReservedKey(entry.getKe...
GraphSONUtility { static Map<String, Object> readProperties(final JsonNode node) { final Map<String, Object> map = new HashMap<>(); final Iterator<Map.Entry<String, JsonNode>> iterator = node.fields(); while (iterator.hasNext()) { final Map.Entry<String, JsonNode> entry = iterator.next(); if (!isReservedKey(entry.getKe...
GraphSONUtility { static Map<String, Object> readProperties(final JsonNode node) { final Map<String, Object> map = new HashMap<>(); final Iterator<Map.Entry<String, JsonNode>> iterator = node.fields(); while (iterator.hasNext()) { final Map.Entry<String, JsonNode> entry = iterator.next(); if (!isReservedKey(entry.getKe...
@Test public void dataNodeReadAndVertexAddedToGraph() { JsonNode entityNode = getCol1(); TinkerGraph tg = TinkerGraph.open(); GraphSONUtility gu = new GraphSONUtility(emptyRelationshipCache); Map<String, Object> map = gu.vertexFromJson(tg, entityNode); assertNull(map); assertEquals((long) tg.traversal().V().count().nex...
public Map<String, Object> vertexFromJson(Graph g, final JsonNode json) { final Map<String, Object> props = readProperties(json); if (props.containsKey(Constants.TYPENAME_PROPERTY_KEY)) { return null; } Map<String, Object> schemaUpdate = null; VertexFeatures vertexFeatures = g.features().vertex(); Object vertexId = get...
GraphSONUtility { public Map<String, Object> vertexFromJson(Graph g, final JsonNode json) { final Map<String, Object> props = readProperties(json); if (props.containsKey(Constants.TYPENAME_PROPERTY_KEY)) { return null; } Map<String, Object> schemaUpdate = null; VertexFeatures vertexFeatures = g.features().vertex(); Obj...
GraphSONUtility { public Map<String, Object> vertexFromJson(Graph g, final JsonNode json) { final Map<String, Object> props = readProperties(json); if (props.containsKey(Constants.TYPENAME_PROPERTY_KEY)) { return null; } Map<String, Object> schemaUpdate = null; VertexFeatures vertexFeatures = g.features().vertex(); Obj...
GraphSONUtility { public Map<String, Object> vertexFromJson(Graph g, final JsonNode json) { final Map<String, Object> props = readProperties(json); if (props.containsKey(Constants.TYPENAME_PROPERTY_KEY)) { return null; } Map<String, Object> schemaUpdate = null; VertexFeatures vertexFeatures = g.features().vertex(); Obj...
GraphSONUtility { public Map<String, Object> vertexFromJson(Graph g, final JsonNode json) { final Map<String, Object> props = readProperties(json); if (props.containsKey(Constants.TYPENAME_PROPERTY_KEY)) { return null; } Map<String, Object> schemaUpdate = null; VertexFeatures vertexFeatures = g.features().vertex(); Obj...
@Test public void typeNodeReadAndVertexNotAddedToGraph() { JsonNode entityNode = getDbType(); TinkerGraph tg = TinkerGraph.open(); GraphSONUtility gu = new GraphSONUtility(emptyRelationshipCache); gu.vertexFromJson(tg, entityNode); Assert.assertEquals((long) tg.traversal().V().count().next(), 0L); }
public Map<String, Object> vertexFromJson(Graph g, final JsonNode json) { final Map<String, Object> props = readProperties(json); if (props.containsKey(Constants.TYPENAME_PROPERTY_KEY)) { return null; } Map<String, Object> schemaUpdate = null; VertexFeatures vertexFeatures = g.features().vertex(); Object vertexId = get...
GraphSONUtility { public Map<String, Object> vertexFromJson(Graph g, final JsonNode json) { final Map<String, Object> props = readProperties(json); if (props.containsKey(Constants.TYPENAME_PROPERTY_KEY)) { return null; } Map<String, Object> schemaUpdate = null; VertexFeatures vertexFeatures = g.features().vertex(); Obj...
GraphSONUtility { public Map<String, Object> vertexFromJson(Graph g, final JsonNode json) { final Map<String, Object> props = readProperties(json); if (props.containsKey(Constants.TYPENAME_PROPERTY_KEY)) { return null; } Map<String, Object> schemaUpdate = null; VertexFeatures vertexFeatures = g.features().vertex(); Obj...
GraphSONUtility { public Map<String, Object> vertexFromJson(Graph g, final JsonNode json) { final Map<String, Object> props = readProperties(json); if (props.containsKey(Constants.TYPENAME_PROPERTY_KEY)) { return null; } Map<String, Object> schemaUpdate = null; VertexFeatures vertexFeatures = g.features().vertex(); Obj...
GraphSONUtility { public Map<String, Object> vertexFromJson(Graph g, final JsonNode json) { final Map<String, Object> props = readProperties(json); if (props.containsKey(Constants.TYPENAME_PROPERTY_KEY)) { return null; } Map<String, Object> schemaUpdate = null; VertexFeatures vertexFeatures = g.features().vertex(); Obj...
@Test public void testGenerateSolrQueryString() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparameters2OR.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParameters(fileName, underTest); Assert.assertEquals(underTest.build(), "+t AND -__s...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testGenerateSolrQueryString2() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparameters1OR.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParameters(fileName, underTest); Assert.assertEquals(underTest.build(), "+t AND -__...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testGenerateSolrQueryString3() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparameters2AND.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParameters(fileName, underTest); Assert.assertEquals(underTest.build(), "+t AND -_...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testGenerateSolrQueryString4() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparameters1AND.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParameters(fileName, underTest); Assert.assertEquals(underTest.build(), "+t AND -_...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testReorderDynAttributes() { AtlasTypeRegistry typeRegistry = new AtlasTypeRegistry(); AtlasTransientTypeRegistry ttr = null; boolean commit = false; List<AtlasEntityDef> entityDefs = new ArrayList<>(); String failureMsg = null; entityDefs.add(createTableEntityDefForTopSort()); try { ttr = typeRegistr...
private List<AtlasAttribute> reorderDynAttributes() { Map<AtlasAttribute, List<AtlasAttribute>> adj = createTokenAttributesMap(); return topologicalSort(adj); }
AtlasEntityType extends AtlasStructType { private List<AtlasAttribute> reorderDynAttributes() { Map<AtlasAttribute, List<AtlasAttribute>> adj = createTokenAttributesMap(); return topologicalSort(adj); } }
AtlasEntityType extends AtlasStructType { private List<AtlasAttribute> reorderDynAttributes() { Map<AtlasAttribute, List<AtlasAttribute>> adj = createTokenAttributesMap(); return topologicalSort(adj); } AtlasEntityType(AtlasEntityDef entityDef); AtlasEntityType(AtlasEntityDef entityDef, AtlasTypeRegistry typeRegistry)...
AtlasEntityType extends AtlasStructType { private List<AtlasAttribute> reorderDynAttributes() { Map<AtlasAttribute, List<AtlasAttribute>> adj = createTokenAttributesMap(); return topologicalSort(adj); } AtlasEntityType(AtlasEntityDef entityDef); AtlasEntityType(AtlasEntityDef entityDef, AtlasTypeRegistry typeRegistry)...
AtlasEntityType extends AtlasStructType { private List<AtlasAttribute> reorderDynAttributes() { Map<AtlasAttribute, List<AtlasAttribute>> adj = createTokenAttributesMap(); return topologicalSort(adj); } AtlasEntityType(AtlasEntityDef entityDef); AtlasEntityType(AtlasEntityDef entityDef, AtlasTypeRegistry typeRegistry)...
@Test public void testGenerateSolrQueryString5() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparameters0.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParameters(fileName, underTest); Assert.assertEquals(underTest.build(), "+t AND -__st...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testGenerateSolrQueryString6() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparameters3.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParameters(fileName, underTest); Assert.assertEquals(underTest.build(), "+t10 AND -__...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testGenerateSolrQueryStringGT() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparametersGT.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParameters(fileName, underTest); Assert.assertEquals(underTest.build(), "+t10 AND -...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testGenerateSolrQueryStringGTE() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparametersGTE.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParameters(fileName, underTest); Assert.assertEquals(underTest.build(), "+t10 AND...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testGenerateSolrQueryStringLT() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparametersLT.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParameters(fileName, underTest); Assert.assertEquals(underTest.build(), "+t10 AND -...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testGenerateSolrQueryStringLE() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparametersLTE.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParameters(fileName, underTest); Assert.assertEquals(underTest.build(), "+t10 AND ...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testGenerateSolrQueryStartsWith() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparametersStartsWith.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParameters(fileName, underTest); Assert.assertEquals(underTest.build(), "...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testGenerateSolrQueryString2TypeNames() throws IOException, AtlasBaseException { final String fileName = "src/test/resources/searchparameters2Types.json"; AtlasSolrQueryBuilder underTest = new AtlasSolrQueryBuilder(); processSearchParametersForMultipleTypeNames(fileName, underTest); Assert.assertEqual...
public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).append(" "); isAndNeeded =...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
AtlasSolrQueryBuilder { public String build() throws AtlasBaseException { StringBuilder queryBuilder = new StringBuilder(); boolean isAndNeeded = false; if (queryString != null ) { if (LOG.isDebugEnabled()) { LOG.debug("Initial query string is {}.", queryString); } queryBuilder.append("+").append(queryString.trim()).ap...
@Test public void testGetFileAsInputStream() throws Exception { Configuration props = ApplicationProperties.get("test.properties"); InputStream inStr = null; try { inStr = ApplicationProperties.getFileAsInputStream(props, "jaas.properties.file", null); assertNotNull(inStr); } finally { if (inStr != null) { inStr.close(...
public static InputStream getFileAsInputStream(Configuration configuration, String propertyName, String defaultFileName) throws AtlasException { File fileToLoad = null; String fileName = configuration.getString(propertyName); if (fileName == null) { if (defaultFileName == null) { throw new AtlasException(propertyName +...
ApplicationProperties extends PropertiesConfiguration { public static InputStream getFileAsInputStream(Configuration configuration, String propertyName, String defaultFileName) throws AtlasException { File fileToLoad = null; String fileName = configuration.getString(propertyName); if (fileName == null) { if (defaultFil...
ApplicationProperties extends PropertiesConfiguration { public static InputStream getFileAsInputStream(Configuration configuration, String propertyName, String defaultFileName) throws AtlasException { File fileToLoad = null; String fileName = configuration.getString(propertyName); if (fileName == null) { if (defaultFil...
ApplicationProperties extends PropertiesConfiguration { public static InputStream getFileAsInputStream(Configuration configuration, String propertyName, String defaultFileName) throws AtlasException { File fileToLoad = null; String fileName = configuration.getString(propertyName); if (fileName == null) { if (defaultFil...
ApplicationProperties extends PropertiesConfiguration { public static InputStream getFileAsInputStream(Configuration configuration, String propertyName, String defaultFileName) throws AtlasException { File fileToLoad = null; String fileName = configuration.getString(propertyName); if (fileName == null) { if (defaultFil...
@Test public void testvalidateAtlasRelationshipDef() throws AtlasBaseException { AtlasRelationshipEndDef ep_single = new AtlasRelationshipEndDef("typeA", "attr1", Cardinality.SINGLE); AtlasRelationshipEndDef ep_single_container = new AtlasRelationshipEndDef("typeB", "attr2", Cardinality.SINGLE); AtlasRelationshipEndDef...
public static void validateAtlasRelationshipDef(AtlasRelationshipDef relationshipDef) throws AtlasBaseException { AtlasRelationshipEndDef endDef1 = relationshipDef.getEndDef1(); AtlasRelationshipEndDef endDef2 = relationshipDef.getEndDef2(); RelationshipCategory relationshipCategory = relationshipDef.getRelationshipCat...
AtlasRelationshipType extends AtlasStructType { public static void validateAtlasRelationshipDef(AtlasRelationshipDef relationshipDef) throws AtlasBaseException { AtlasRelationshipEndDef endDef1 = relationshipDef.getEndDef1(); AtlasRelationshipEndDef endDef2 = relationshipDef.getEndDef2(); RelationshipCategory relations...
AtlasRelationshipType extends AtlasStructType { public static void validateAtlasRelationshipDef(AtlasRelationshipDef relationshipDef) throws AtlasBaseException { AtlasRelationshipEndDef endDef1 = relationshipDef.getEndDef1(); AtlasRelationshipEndDef endDef2 = relationshipDef.getEndDef2(); RelationshipCategory relations...
AtlasRelationshipType extends AtlasStructType { public static void validateAtlasRelationshipDef(AtlasRelationshipDef relationshipDef) throws AtlasBaseException { AtlasRelationshipEndDef endDef1 = relationshipDef.getEndDef1(); AtlasRelationshipEndDef endDef2 = relationshipDef.getEndDef2(); RelationshipCategory relations...
AtlasRelationshipType extends AtlasStructType { public static void validateAtlasRelationshipDef(AtlasRelationshipDef relationshipDef) throws AtlasBaseException { AtlasRelationshipEndDef endDef1 = relationshipDef.getEndDef1(); AtlasRelationshipEndDef endDef2 = relationshipDef.getEndDef2(); RelationshipCategory relations...
@Test public void createdBasedOnInitialSize() { Spying.resetCounters(); int incrementByFactor = 2; SpyingFixedBufferList fixedBufferList = new SpyingFixedBufferList(incrementByFactor); addElements(fixedBufferList, 0, 3); List<Spying> list = fixedBufferList.toList(); assertSpyingList(list, 3); assertEquals(Spying.callsT...
public List<T> toList() { return this.buffer.subList(0, this.length); }
FixedBufferList { public List<T> toList() { return this.buffer.subList(0, this.length); } }
FixedBufferList { public List<T> toList() { return this.buffer.subList(0, this.length); } FixedBufferList(Class<T> clazz); FixedBufferList(Class<T> clazz, int incrementCapacityBy); }
FixedBufferList { public List<T> toList() { return this.buffer.subList(0, this.length); } FixedBufferList(Class<T> clazz); FixedBufferList(Class<T> clazz, int incrementCapacityBy); T next(); List<T> toList(); void reset(); }
FixedBufferList { public List<T> toList() { return this.buffer.subList(0, this.length); } FixedBufferList(Class<T> clazz); FixedBufferList(Class<T> clazz, int incrementCapacityBy); T next(); List<T> toList(); void reset(); }
@Test public void retrieveEmptyList() { int size = 5; SpyingFixedBufferList fixedBufferList = new SpyingFixedBufferList(size); List<Spying> list = fixedBufferList.toList(); assertEquals(list.size(), 0); addElements(fixedBufferList, 0, 3); list = fixedBufferList.toList(); assertEquals(list.size(), 3); }
public List<T> toList() { return this.buffer.subList(0, this.length); }
FixedBufferList { public List<T> toList() { return this.buffer.subList(0, this.length); } }
FixedBufferList { public List<T> toList() { return this.buffer.subList(0, this.length); } FixedBufferList(Class<T> clazz); FixedBufferList(Class<T> clazz, int incrementCapacityBy); }
FixedBufferList { public List<T> toList() { return this.buffer.subList(0, this.length); } FixedBufferList(Class<T> clazz); FixedBufferList(Class<T> clazz, int incrementCapacityBy); T next(); List<T> toList(); void reset(); }
FixedBufferList { public List<T> toList() { return this.buffer.subList(0, this.length); } FixedBufferList(Class<T> clazz); FixedBufferList(Class<T> clazz, int incrementCapacityBy); T next(); List<T> toList(); void reset(); }
@Test public void testGetAllTraitsSuperTraits() throws Exception { AtlasTypeRegistry typeSystem = mock(AtlasTypeRegistry.class); String traitName = "MyTrait"; Struct myTrait = new Struct(traitName); String superTraitName = "MySuperTrait"; AtlasClassificationType traitDef = mock(AtlasClassificationType.class); Set<Strin...
@VisibleForTesting public static List<Struct> getAllTraits(Referenceable entityDefinition, AtlasTypeRegistry typeRegistry) throws AtlasException { List<Struct> ret = new ArrayList<>(); for (String traitName : entityDefinition.getTraitNames()) { Struct trait = entityDefinition.getTrait(traitName); AtlasClassificationTyp...
NotificationEntityChangeListener implements EntityChangeListener { @VisibleForTesting public static List<Struct> getAllTraits(Referenceable entityDefinition, AtlasTypeRegistry typeRegistry) throws AtlasException { List<Struct> ret = new ArrayList<>(); for (String traitName : entityDefinition.getTraitNames()) { Struct t...
NotificationEntityChangeListener implements EntityChangeListener { @VisibleForTesting public static List<Struct> getAllTraits(Referenceable entityDefinition, AtlasTypeRegistry typeRegistry) throws AtlasException { List<Struct> ret = new ArrayList<>(); for (String traitName : entityDefinition.getTraitNames()) { Struct t...
NotificationEntityChangeListener implements EntityChangeListener { @VisibleForTesting public static List<Struct> getAllTraits(Referenceable entityDefinition, AtlasTypeRegistry typeRegistry) throws AtlasException { List<Struct> ret = new ArrayList<>(); for (String traitName : entityDefinition.getTraitNames()) { Struct t...
NotificationEntityChangeListener implements EntityChangeListener { @VisibleForTesting public static List<Struct> getAllTraits(Referenceable entityDefinition, AtlasTypeRegistry typeRegistry) throws AtlasException { List<Struct> ret = new ArrayList<>(); for (String traitName : entityDefinition.getTraitNames()) { Struct t...
@Test public void testConsumersStartedIfHAIsDisabled() throws Exception { List<NotificationConsumer<Object>> consumers = new ArrayList(); NotificationConsumer notificationConsumerMock = mock(NotificationConsumer.class); consumers.add(notificationConsumerMock); when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_...
void startInternal(Configuration configuration, ExecutorService executorService) { if (consumers == null) { consumers = new ArrayList<>(); } if (executorService != null) { executors = executorService; } if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is disabled, starting consumers inline."); startConsu...
NotificationHookConsumer implements Service, ActiveStateChangeHandler { void startInternal(Configuration configuration, ExecutorService executorService) { if (consumers == null) { consumers = new ArrayList<>(); } if (executorService != null) { executors = executorService; } if (!HAConfiguration.isHAEnabled(configuratio...
NotificationHookConsumer implements Service, ActiveStateChangeHandler { void startInternal(Configuration configuration, ExecutorService executorService) { if (consumers == null) { consumers = new ArrayList<>(); } if (executorService != null) { executors = executorService; } if (!HAConfiguration.isHAEnabled(configuratio...
NotificationHookConsumer implements Service, ActiveStateChangeHandler { void startInternal(Configuration configuration, ExecutorService executorService) { if (consumers == null) { consumers = new ArrayList<>(); } if (executorService != null) { executors = executorService; } if (!HAConfiguration.isHAEnabled(configuratio...
NotificationHookConsumer implements Service, ActiveStateChangeHandler { void startInternal(Configuration configuration, ExecutorService executorService) { if (consumers == null) { consumers = new ArrayList<>(); } if (executorService != null) { executors = executorService; } if (!HAConfiguration.isHAEnabled(configuratio...
@Test public void testConsumersAreNotStartedIfHAIsEnabled() throws Exception { List<NotificationConsumer<Object>> consumers = new ArrayList(); NotificationConsumer notificationConsumerMock = mock(NotificationConsumer.class); consumers.add(notificationConsumerMock); when(configuration.containsKey(HAConfiguration.ATLAS_S...
void startInternal(Configuration configuration, ExecutorService executorService) { if (consumers == null) { consumers = new ArrayList<>(); } if (executorService != null) { executors = executorService; } if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is disabled, starting consumers inline."); startConsu...
NotificationHookConsumer implements Service, ActiveStateChangeHandler { void startInternal(Configuration configuration, ExecutorService executorService) { if (consumers == null) { consumers = new ArrayList<>(); } if (executorService != null) { executors = executorService; } if (!HAConfiguration.isHAEnabled(configuratio...
NotificationHookConsumer implements Service, ActiveStateChangeHandler { void startInternal(Configuration configuration, ExecutorService executorService) { if (consumers == null) { consumers = new ArrayList<>(); } if (executorService != null) { executors = executorService; } if (!HAConfiguration.isHAEnabled(configuratio...
NotificationHookConsumer implements Service, ActiveStateChangeHandler { void startInternal(Configuration configuration, ExecutorService executorService) { if (consumers == null) { consumers = new ArrayList<>(); } if (executorService != null) { executors = executorService; } if (!HAConfiguration.isHAEnabled(configuratio...
NotificationHookConsumer implements Service, ActiveStateChangeHandler { void startInternal(Configuration configuration, ExecutorService executorService) { if (consumers == null) { consumers = new ArrayList<>(); } if (executorService != null) { executors = executorService; } if (!HAConfiguration.isHAEnabled(configuratio...
@Test public void testStatusOfActiveServerIsReturned() throws IOException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.ACTIVE); AdminResource adminResource = new AdminResource(serviceState, null, null, null, null, null, null, null, null, null, null, null, null); Response response = adminRes...
@GET @Path("status") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getStatus() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getStatus()"); } Map<String, Object> responseData = new HashMap() {{ put(AtlasClient.STATUS, serviceState.getState().toString()); }}; if(serviceState.isInstanceInMigration()) {...
AdminResource { @GET @Path("status") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getStatus() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getStatus()"); } Map<String, Object> responseData = new HashMap() {{ put(AtlasClient.STATUS, serviceState.getState().toString()); }}; if(serviceState.isInstance...
AdminResource { @GET @Path("status") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getStatus() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getStatus()"); } Map<String, Object> responseData = new HashMap() {{ put(AtlasClient.STATUS, serviceState.getState().toString()); }}; if(serviceState.isInstance...
AdminResource { @GET @Path("status") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getStatus() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getStatus()"); } Map<String, Object> responseData = new HashMap() {{ put(AtlasClient.STATUS, serviceState.getState().toString()); }}; if(serviceState.isInstance...
AdminResource { @GET @Path("status") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getStatus() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getStatus()"); } Map<String, Object> responseData = new HashMap() {{ put(AtlasClient.STATUS, serviceState.getState().toString()); }}; if(serviceState.isInstance...
@Test public void testResourceGetsValueFromServiceState() throws IOException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE); AdminResource adminResource = new AdminResource(serviceState, null, null, null, null, null, null, null, null, null, null, null, null); Response response = admi...
@GET @Path("status") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getStatus() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getStatus()"); } Map<String, Object> responseData = new HashMap() {{ put(AtlasClient.STATUS, serviceState.getState().toString()); }}; if(serviceState.isInstanceInMigration()) {...
AdminResource { @GET @Path("status") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getStatus() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getStatus()"); } Map<String, Object> responseData = new HashMap() {{ put(AtlasClient.STATUS, serviceState.getState().toString()); }}; if(serviceState.isInstance...
AdminResource { @GET @Path("status") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getStatus() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getStatus()"); } Map<String, Object> responseData = new HashMap() {{ put(AtlasClient.STATUS, serviceState.getState().toString()); }}; if(serviceState.isInstance...
AdminResource { @GET @Path("status") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getStatus() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getStatus()"); } Map<String, Object> responseData = new HashMap() {{ put(AtlasClient.STATUS, serviceState.getState().toString()); }}; if(serviceState.isInstance...
AdminResource { @GET @Path("status") @Produces(Servlets.JSON_MEDIA_TYPE) public Response getStatus() { if (LOG.isDebugEnabled()) { LOG.debug("==> AdminResource.getStatus()"); } Map<String, Object> responseData = new HashMap() {{ put(AtlasClient.STATUS, serviceState.getState().toString()); }}; if(serviceState.isInstance...
@Test public void testLeaderElectionIsJoinedOnStart() throws Exception { when(configuration.containsKey(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(true); when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(true); when(configuration.getStringArray(HAConfiguration.ATLAS_SE...
@Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; } cacheActiveStateChangeHandlers(); serverId = AtlasServerIdSelector.se...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
@Test public void testClassificationTypeDefaultValue() { AtlasClassification defValue = classificationType.createDefaultValue(); assertNotNull(defValue); assertEquals(defValue.getTypeName(), classificationType.getTypeName()); }
@Override public AtlasClassification createDefaultValue() { AtlasClassification ret = new AtlasClassification(classificationDef.getName()); populateDefaultValues(ret); return ret; }
AtlasClassificationType extends AtlasStructType { @Override public AtlasClassification createDefaultValue() { AtlasClassification ret = new AtlasClassification(classificationDef.getName()); populateDefaultValues(ret); return ret; } }
AtlasClassificationType extends AtlasStructType { @Override public AtlasClassification createDefaultValue() { AtlasClassification ret = new AtlasClassification(classificationDef.getName()); populateDefaultValues(ret); return ret; } AtlasClassificationType(AtlasClassificationDef classificationDef); AtlasClassificationT...
AtlasClassificationType extends AtlasStructType { @Override public AtlasClassification createDefaultValue() { AtlasClassification ret = new AtlasClassification(classificationDef.getName()); populateDefaultValues(ret); return ret; } AtlasClassificationType(AtlasClassificationDef classificationDef); AtlasClassificationT...
AtlasClassificationType extends AtlasStructType { @Override public AtlasClassification createDefaultValue() { AtlasClassification ret = new AtlasClassification(classificationDef.getName()); populateDefaultValues(ret); return ret; } AtlasClassificationType(AtlasClassificationDef classificationDef); AtlasClassificationT...
@Test public void testListenerIsAddedForActiveInstanceCallbacks() throws Exception { when(configuration.containsKey(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(true); when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(true); when(configuration.getStringArray(HAConfigurat...
@Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; } cacheActiveStateChangeHandlers(); serverId = AtlasServerIdSelector.se...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
@Test public void testLeaderElectionIsNotStartedIfNotInHAMode() throws AtlasException { when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY, false)).thenReturn(false); ActiveInstanceElectorService activeInstanceElectorService = new ActiveInstanceElectorService(configuration, new HashSet<ActiveStat...
@Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; } cacheActiveStateChangeHandlers(); serverId = AtlasServerIdSelector.se...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void start() throws AtlasException { metricsUtil.onServerStart(); if (!HAConfiguration.isHAEnabled(configuration)) { metricsUtil.onServerActivation(); LOG.info("HA is not enabled, no need to start leader election service"); return; ...
@Test public void testNoActionOnStopIfHAModeIsDisabled() { when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY, false)).thenReturn(false); ActiveInstanceElectorService activeInstanceElectorService = new ActiveInstanceElectorService(configuration, new HashSet<ActiveStateChangeHandler>(), curatorFac...
@Override public void stop() { if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is not enabled, no need to stop leader election service"); return; } try { leaderLatch.close(); curatorFactory.close(); } catch (IOException e) { LOG.error("Error closing leader latch", e); } }
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void stop() { if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is not enabled, no need to stop leader election service"); return; } try { leaderLatch.close(); curatorFactory.close(); } catch (IOException e) { LOG.erro...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void stop() { if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is not enabled, no need to stop leader election service"); return; } try { leaderLatch.close(); curatorFactory.close(); } catch (IOException e) { LOG.erro...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void stop() { if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is not enabled, no need to stop leader election service"); return; } try { leaderLatch.close(); curatorFactory.close(); } catch (IOException e) { LOG.erro...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void stop() { if (!HAConfiguration.isHAEnabled(configuration)) { LOG.info("HA is not enabled, no need to stop leader election service"); return; } try { leaderLatch.close(); curatorFactory.close(); } catch (IOException e) { LOG.erro...
@Test public void testActiveStateSetOnBecomingLeader() { ActiveInstanceElectorService activeInstanceElectorService = new ActiveInstanceElectorService(configuration, new HashSet<ActiveStateChangeHandler>(), curatorFactory, activeInstanceState, serviceState, metricsUtil); activeInstanceElectorService.isLeader(); InOrder ...
@Override public void isLeader() { LOG.warn("Server instance with server id {} is elected as leader", serverId); serviceState.becomingActive(); try { for (ActiveStateChangeHandler handler : activeStateChangeHandlers) { handler.instanceIsActive(); } activeInstanceState.update(serverId); serviceState.setActive(); metrics...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void isLeader() { LOG.warn("Server instance with server id {} is elected as leader", serverId); serviceState.becomingActive(); try { for (ActiveStateChangeHandler handler : activeStateChangeHandlers) { handler.instanceIsActive(); } ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void isLeader() { LOG.warn("Server instance with server id {} is elected as leader", serverId); serviceState.becomingActive(); try { for (ActiveStateChangeHandler handler : activeStateChangeHandlers) { handler.instanceIsActive(); } ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void isLeader() { LOG.warn("Server instance with server id {} is elected as leader", serverId); serviceState.becomingActive(); try { for (ActiveStateChangeHandler handler : activeStateChangeHandlers) { handler.instanceIsActive(); } ...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void isLeader() { LOG.warn("Server instance with server id {} is elected as leader", serverId); serviceState.becomingActive(); try { for (ActiveStateChangeHandler handler : activeStateChangeHandlers) { handler.instanceIsActive(); } ...
@Test public void testPassiveStateSetOnLoosingLeadership() { ActiveInstanceElectorService activeInstanceElectorService = new ActiveInstanceElectorService(configuration, new HashSet<ActiveStateChangeHandler>(), curatorFactory, activeInstanceState, serviceState, metricsUtil); activeInstanceElectorService.notLeader(); InO...
@Override public void notLeader() { LOG.warn("Server instance with server id {} is removed as leader", serverId); serviceState.becomingPassive(); for (int idx = activeStateChangeHandlers.size() - 1; idx >= 0; idx--) { try { activeStateChangeHandlers.get(idx).instanceIsPassive(); } catch (AtlasException e) { LOG.error("...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void notLeader() { LOG.warn("Server instance with server id {} is removed as leader", serverId); serviceState.becomingPassive(); for (int idx = activeStateChangeHandlers.size() - 1; idx >= 0; idx--) { try { activeStateChangeHandlers...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void notLeader() { LOG.warn("Server instance with server id {} is removed as leader", serverId); serviceState.becomingPassive(); for (int idx = activeStateChangeHandlers.size() - 1; idx >= 0; idx--) { try { activeStateChangeHandlers...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void notLeader() { LOG.warn("Server instance with server id {} is removed as leader", serverId); serviceState.becomingPassive(); for (int idx = activeStateChangeHandlers.size() - 1; idx >= 0; idx--) { try { activeStateChangeHandlers...
ActiveInstanceElectorService implements Service, LeaderLatchListener { @Override public void notLeader() { LOG.warn("Server instance with server id {} is removed as leader", serverId); serviceState.becomingPassive(); for (int idx = activeStateChangeHandlers.size() - 1; idx >= 0; idx--) { try { activeStateChangeHandlers...
@Test public void testcanApplyToEntityType() throws AtlasBaseException { AtlasEntityDef entityDefA = new AtlasEntityDef("EntityA"); AtlasEntityDef entityDefB = new AtlasEntityDef("EntityB"); AtlasEntityDef entityDefC = new AtlasEntityDef("EntityC", null, null, null, new HashSet<>(Arrays.asList(entityDefA.getName()))); ...
public boolean canApplyToEntityType(AtlasEntityType entityType) { return CollectionUtils.isEmpty(this.entityTypes) || this.entityTypes.contains(entityType.getTypeName()); }
AtlasClassificationType extends AtlasStructType { public boolean canApplyToEntityType(AtlasEntityType entityType) { return CollectionUtils.isEmpty(this.entityTypes) || this.entityTypes.contains(entityType.getTypeName()); } }
AtlasClassificationType extends AtlasStructType { public boolean canApplyToEntityType(AtlasEntityType entityType) { return CollectionUtils.isEmpty(this.entityTypes) || this.entityTypes.contains(entityType.getTypeName()); } AtlasClassificationType(AtlasClassificationDef classificationDef); AtlasClassificationType(Atlas...
AtlasClassificationType extends AtlasStructType { public boolean canApplyToEntityType(AtlasEntityType entityType) { return CollectionUtils.isEmpty(this.entityTypes) || this.entityTypes.contains(entityType.getTypeName()); } AtlasClassificationType(AtlasClassificationDef classificationDef); AtlasClassificationType(Atlas...
AtlasClassificationType extends AtlasStructType { public boolean canApplyToEntityType(AtlasEntityType entityType) { return CollectionUtils.isEmpty(this.entityTypes) || this.entityTypes.contains(entityType.getTypeName()); } AtlasClassificationType(AtlasClassificationDef classificationDef); AtlasClassificationType(Atlas...
@Test public void testShouldBeActiveIfHAIsDisabled() { when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY, false)).thenReturn(false); ServiceState serviceState = new ServiceState(configuration); assertEquals(ServiceState.ServiceStateValue.ACTIVE, serviceState.getState()); }
public ServiceStateValue getState() { return state; }
ServiceState { public ServiceStateValue getState() { return state; } }
ServiceState { public ServiceStateValue getState() { return state; } ServiceState(); ServiceState(Configuration configuration); }
ServiceState { public ServiceStateValue getState() { return state; } ServiceState(); ServiceState(Configuration configuration); ServiceStateValue getState(); void becomingActive(); void setActive(); void becomingPassive(); void setPassive(); boolean isInstanceInTransition(); void setMigration(); boolean isInstanceInMi...
ServiceState { public ServiceStateValue getState() { return state; } ServiceState(); ServiceState(Configuration configuration); ServiceStateValue getState(); void becomingActive(); void setActive(); void becomingPassive(); void setPassive(); boolean isInstanceInTransition(); void setMigration(); boolean isInstanceInMi...
@Test(expectedExceptions = IllegalStateException.class) public void testShouldDisallowTransitionIfHAIsDisabled() { when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY, false)).thenReturn(false); ServiceState serviceState = new ServiceState(configuration); serviceState.becomingPassive(); fail("Shou...
public void becomingPassive() { LOG.warn("Instance becoming passive from {}", state); setState(ServiceStateValue.BECOMING_PASSIVE); }
ServiceState { public void becomingPassive() { LOG.warn("Instance becoming passive from {}", state); setState(ServiceStateValue.BECOMING_PASSIVE); } }
ServiceState { public void becomingPassive() { LOG.warn("Instance becoming passive from {}", state); setState(ServiceStateValue.BECOMING_PASSIVE); } ServiceState(); ServiceState(Configuration configuration); }
ServiceState { public void becomingPassive() { LOG.warn("Instance becoming passive from {}", state); setState(ServiceStateValue.BECOMING_PASSIVE); } ServiceState(); ServiceState(Configuration configuration); ServiceStateValue getState(); void becomingActive(); void setActive(); void becomingPassive(); void setPassive(...
ServiceState { public void becomingPassive() { LOG.warn("Instance becoming passive from {}", state); setState(ServiceStateValue.BECOMING_PASSIVE); } ServiceState(); ServiceState(Configuration configuration); ServiceStateValue getState(); void becomingActive(); void setActive(); void becomingPassive(); void setPassive(...
@Test public void testSharedPathIsCreatedIfNotExists() throws Exception { when(configuration.getString(HAConfiguration.ATLAS_SERVER_ADDRESS_PREFIX +"id1")).thenReturn(HOST_PORT); when(configuration.getString( HAConfiguration.ATLAS_SERVER_HA_ZK_ROOT_KEY, HAConfiguration.ATLAS_SERVER_ZK_ROOT_DEFAULT)). thenReturn(HAConfi...
public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddressForId(configuration...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
@Test public void testSharedPathIsCreatedWithRightACLIfNotExists() throws Exception { when(configuration.getString(HAConfiguration.ATLAS_SERVER_ADDRESS_PREFIX +"id1")).thenReturn(HOST_PORT); when(configuration.getString(HAConfiguration.HA_ZOOKEEPER_ACL)).thenReturn("sasl:myclient@EXAMPLE.COM"); when(configuration.getSt...
public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddressForId(configuration...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
@Test public void testDataIsUpdatedWithAtlasServerAddress() throws Exception { when(configuration.getString(HAConfiguration.ATLAS_SERVER_ADDRESS_PREFIX +"id1")).thenReturn(HOST_PORT); when(configuration.getString( HAConfiguration.ATLAS_SERVER_HA_ZK_ROOT_KEY, HAConfiguration.ATLAS_SERVER_ZK_ROOT_DEFAULT)). thenReturn(HA...
public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddressForId(configuration...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
ActiveInstanceState { public void update(String serverId) throws AtlasBaseException { try { CuratorFramework client = curatorFactory.clientInstance(); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); String atlasServerAddress = HAConfiguration.getBoundAddr...
@Test public void testShouldPassThroughRequestsIfActive() throws IOException, ServletException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.ACTIVE); when(servletRequest.getRequestURI()).thenReturn("api/atlas/types"); ActiveServerFilter activeServerFilter = new ActiveServerFilter(activeInsta...
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)servletRequest).getRequestURI()); filte...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
@Test public void testShouldFailIfCannotRetrieveActiveServerAddress() throws IOException, ServletException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE); when(servletRequest.getRequestURI()).thenReturn("api/atlas/types"); ActiveServerFilter activeServerFilter = new ActiveServerFilte...
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)servletRequest).getRequestURI()); filte...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
@Test public void testClassificationTypeIsValidValue() { for (Object value : validValues) { assertTrue(classificationType.isValidValue(value), "value=" + value); } for (Object value : invalidValues) { assertFalse(classificationType.isValidValue(value), "value=" + value); } }
@Override public boolean isValidValue(Object obj) { if (obj != null) { for (AtlasClassificationType superType : superTypes) { if (!superType.isValidValue(obj)) { return false; } } if (!validateTimeBoundaries(obj, null)) { return false; } return super.isValidValue(obj); } return true; }
AtlasClassificationType extends AtlasStructType { @Override public boolean isValidValue(Object obj) { if (obj != null) { for (AtlasClassificationType superType : superTypes) { if (!superType.isValidValue(obj)) { return false; } } if (!validateTimeBoundaries(obj, null)) { return false; } return super.isValidValue(obj); ...
AtlasClassificationType extends AtlasStructType { @Override public boolean isValidValue(Object obj) { if (obj != null) { for (AtlasClassificationType superType : superTypes) { if (!superType.isValidValue(obj)) { return false; } } if (!validateTimeBoundaries(obj, null)) { return false; } return super.isValidValue(obj); ...
AtlasClassificationType extends AtlasStructType { @Override public boolean isValidValue(Object obj) { if (obj != null) { for (AtlasClassificationType superType : superTypes) { if (!superType.isValidValue(obj)) { return false; } } if (!validateTimeBoundaries(obj, null)) { return false; } return super.isValidValue(obj); ...
AtlasClassificationType extends AtlasStructType { @Override public boolean isValidValue(Object obj) { if (obj != null) { for (AtlasClassificationType superType : superTypes) { if (!superType.isValidValue(obj)) { return false; } } if (!validateTimeBoundaries(obj, null)) { return false; } return super.isValidValue(obj); ...
@Test public void testShouldRedirectRequestToActiveServerAddress() throws IOException, ServletException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE); when(servletRequest.getRequestURI()).thenReturn("api/atlas/types"); ActiveServerFilter activeServerFilter = new ActiveServerFilter(a...
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)servletRequest).getRequestURI()); filte...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
@Test public void adminImportRequestsToPassiveServerShouldToActiveServerAddress() throws IOException, ServletException { String importExportUrls[] = {"api/admin/export", "api/admin/import", "api/admin/importfile"}; for (String partialUrl : importExportUrls) { when(serviceState.getState()).thenReturn(ServiceState.Servic...
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)servletRequest).getRequestURI()); filte...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
@Test public void testRedirectedRequestShouldContainQueryParameters() throws IOException, ServletException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE); when(servletRequest.getRequestURI()).thenReturn("api/atlas/types"); ActiveServerFilter activeServerFilter = new ActiveServerFilte...
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)servletRequest).getRequestURI()); filte...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
@Test public void testRedirectedRequestShouldContainEncodeQueryParameters() throws IOException, ServletException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE); ActiveServerFilter activeServerFilter = new ActiveServerFilter(activeInstanceState, serviceState); when(activeInstanceState...
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)servletRequest).getRequestURI()); filte...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
@Test public void testShouldRedirectPOSTRequest() throws IOException, ServletException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE); when(servletRequest.getRequestURI()).thenReturn("api/atlas/types"); ActiveServerFilter activeServerFilter = new ActiveServerFilter(activeInstanceStat...
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)servletRequest).getRequestURI()); filte...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
@Test public void testShouldRedirectPUTRequest() throws IOException, ServletException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE); when(servletRequest.getRequestURI()).thenReturn("api/atlas/types"); ActiveServerFilter activeServerFilter = new ActiveServerFilter(activeInstanceState...
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)servletRequest).getRequestURI()); filte...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
@Test public void testShouldRedirectDELETERequest() throws IOException, ServletException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE); when(servletRequest.getRequestURI()).thenReturn("api/atlas/types"); ActiveServerFilter activeServerFilter = new ActiveServerFilter(activeInstanceSt...
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)servletRequest).getRequestURI()); filte...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
@Test public void testShouldReturnServiceUnavailableIfStateBecomingActive() throws IOException, ServletException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.BECOMING_ACTIVE); when(servletRequest.getRequestURI()).thenReturn("api/atlas/types"); ActiveServerFilter activeServerFilter = new Act...
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)servletRequest).getRequestURI()); filte...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
@Test public void testShouldNotRedirectAdminAPIs() throws IOException, ServletException { when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE); when(servletRequest.getMethod()).thenReturn(HttpMethod.GET); when(servletRequest.getRequestURI()). thenReturn("api/atlas/admin/asmasn"); ActiveServe...
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)servletRequest).getRequestURI()); filte...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...
ActiveServerFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { if (isFilteredURI(servletRequest)) { LOG.debug("Is a filtered URI: {}. Passing request downstream.", ((HttpServletRequest)...