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(dependsOnMethods = "verifySavedSearchesForUser") public void verifyQueryConversionFromJSON() throws AtlasBaseException { List<AtlasUserSavedSearch> list = userProfileService.getSavedSearches("first-0"); for (int i = 0; i < NUM_SEARCHES; i++) { SearchParameters sp = list.get(i).getSearchParameters(); String json =... | public List<AtlasUserSavedSearch> getSavedSearches(String userName) throws AtlasBaseException { AtlasUserProfile profile = null; try { profile = getUserProfile(userName); } catch (AtlasBaseException excp) { } return (profile != null) ? profile.getSavedSearches() : null; } | UserProfileService { public List<AtlasUserSavedSearch> getSavedSearches(String userName) throws AtlasBaseException { AtlasUserProfile profile = null; try { profile = getUserProfile(userName); } catch (AtlasBaseException excp) { } return (profile != null) ? profile.getSavedSearches() : null; } } | UserProfileService { public List<AtlasUserSavedSearch> getSavedSearches(String userName) throws AtlasBaseException { AtlasUserProfile profile = null; try { profile = getUserProfile(userName); } catch (AtlasBaseException excp) { } return (profile != null) ? profile.getSavedSearches() : null; } @Inject UserProfileServic... | UserProfileService { public List<AtlasUserSavedSearch> getSavedSearches(String userName) throws AtlasBaseException { AtlasUserProfile profile = null; try { profile = getUserProfile(userName); } catch (AtlasBaseException excp) { } return (profile != null) ? profile.getSavedSearches() : null; } @Inject UserProfileServic... | UserProfileService { public List<AtlasUserSavedSearch> getSavedSearches(String userName) throws AtlasBaseException { AtlasUserProfile profile = null; try { profile = getUserProfile(userName); } catch (AtlasBaseException excp) { } return (profile != null) ? profile.getSavedSearches() : null; } @Inject UserProfileServic... |
@Test public void testDefaultValueForPrimitiveTypes() throws Exception { init(); EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(primitiveEntity), false); List<AtlasEntityHeader> entitiesCreatedResponse = response.getEntitiesByOperation(EntityOperation.CREATE); List<AtlasEntityHeader>... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test(priority = -1) public void testCreate() throws Exception { init(); EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(deptEntity), false); validateMutationResponse(response, EntityOperation.CREATE, 5); AtlasEntityHeader dept1 = response.getFirstCreatedEntityByTypeName(TestUtilsV2.D... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test(dependsOnMethods = "testCreate") public void testMapOfPrimitivesUpdate() throws Exception { AtlasEntity tableEntity = new AtlasEntity(tblEntity.getEntity()); AtlasEntitiesWithExtInfo entitiesInfo = new AtlasEntitiesWithExtInfo(tableEntity); entitiesInfo.addReferredEntity(tableEntity); Map<String, String> paramsMa... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test(dependsOnMethods = "testCreate") public void testArrayOfStructs() throws Exception { AtlasEntity tableEntity = new AtlasEntity(tblEntity.getEntity()); AtlasEntitiesWithExtInfo entitiesInfo = new AtlasEntitiesWithExtInfo(tableEntity); List<AtlasStruct> partitions = new ArrayList<AtlasStruct>(){{ add(new AtlasStruc... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test(dependsOnMethods = "testCreate") public void testStructs() throws Exception { AtlasEntity databaseEntity = dbEntity.getEntity(); AtlasEntity tableEntity = new AtlasEntity(tblEntity.getEntity()); AtlasEntitiesWithExtInfo entitiesInfo = new AtlasEntitiesWithExtInfo(tableEntity); AtlasStruct serdeInstance = new Atla... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test(dependsOnMethods = "testCreate") public void testClassUpdate() throws Exception { init(); final AtlasEntity databaseInstance = TestUtilsV2.createDBEntity(); EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(databaseInstance), false); final AtlasEntityHeader dbCreated = response.ge... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test public void testMapTypeGetNormalizedValue() { assertNull(intIntMapType.getNormalizedValue(null), "value=" + null); for (Object value : validValues) { if (value == null) { continue; } Map<Object, Object> normalizedValue = intIntMapType.getNormalizedValue(value); assertNotNull(normalizedValue, "value=" + value); } ... | @Override public Map<Object, Object> getNormalizedValue(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { obj = AtlasType.fromJson(obj.toString(), Map.class); } if (obj instanceof Map) { Map<Object, Object> ret = new HashMap<>(); Map<Object, Objects> map = (Map<Object, Objects>) obj; for (Map... | AtlasMapType extends AtlasType { @Override public Map<Object, Object> getNormalizedValue(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { obj = AtlasType.fromJson(obj.toString(), Map.class); } if (obj instanceof Map) { Map<Object, Object> ret = new HashMap<>(); Map<Object, Objects> map = (Ma... | AtlasMapType extends AtlasType { @Override public Map<Object, Object> getNormalizedValue(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { obj = AtlasType.fromJson(obj.toString(), Map.class); } if (obj instanceof Map) { Map<Object, Object> ret = new HashMap<>(); Map<Object, Objects> map = (Ma... | AtlasMapType extends AtlasType { @Override public Map<Object, Object> getNormalizedValue(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { obj = AtlasType.fromJson(obj.toString(), Map.class); } if (obj instanceof Map) { Map<Object, Object> ret = new HashMap<>(); Map<Object, Objects> map = (Ma... | AtlasMapType extends AtlasType { @Override public Map<Object, Object> getNormalizedValue(Object obj) { if (obj == null) { return null; } if (obj instanceof String) { obj = AtlasType.fromJson(obj.toString(), Map.class); } if (obj instanceof Map) { Map<Object, Object> ret = new HashMap<>(); Map<Object, Objects> map = (Ma... |
@Test public void testCheckOptionalAttrValueRetention() throws Exception { AtlasEntity dbEntity = TestUtilsV2.createDBEntity(); init(); EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(dbEntity), false); AtlasEntity firstEntityCreated = getEntityFromStore(response.getFirstCreatedEntity... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test(enabled = false) public void testSpecialCharacters() throws Exception { final String typeName = TestUtilsV2.randomString(10); String strAttrName = randomStrWithReservedChars(); String arrayAttrName = randomStrWithReservedChars(); String mapAttrName = randomStrWithReservedChars(); AtlasEntityDef typeDefinition = A... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test(expectedExceptions = AtlasBaseException.class) public void testCreateRequiredAttrNull() throws Exception { Map<String, AtlasEntity> tableCloneMap = new HashMap<>(); AtlasEntity tableEntity = new AtlasEntity(TABLE_TYPE); tableEntity.setAttribute(NAME, "table_" + TestUtilsV2.randomString()); tableCloneMap.put(table... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test (dependsOnMethods = "testCreate") public void addCustomAttributesToEntity() throws AtlasBaseException { AtlasEntity tblEntity = getEntityFromStore(tblEntityGuid); Map<String, String> customAttributes = new HashMap<>(); customAttributes.put("key1", "val1"); customAttributes.put("key2", "val2"); customAttributes.pu... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test (dependsOnMethods = "addCustomAttributesToEntity") public void updateCustomAttributesToEntity() throws AtlasBaseException { AtlasEntity tblEntity = getEntityFromStore(tblEntityGuid); Map<String, String> customAttributes = new HashMap<>(); customAttributes.put("key1", "val1"); customAttributes.put("key2", "val2");... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test (dependsOnMethods = "updateCustomAttributesToEntity") public void deleteCustomAttributesToEntity() throws AtlasBaseException { AtlasEntity tblEntity = getEntityFromStore(tblEntityGuid); Map<String, String> emptyCustomAttributes = new HashMap<>(); tblEntity.setCustomAttributes(emptyCustomAttributes); entityStore.c... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test (dependsOnMethods = "deleteCustomAttributesToEntity") public void nullCustomAttributesToEntity() throws AtlasBaseException { AtlasEntity tblEntity = getEntityFromStore(tblEntityGuid); Map<String, String> customAttributes = new HashMap<>(); customAttributes.put("key1", "val1"); customAttributes.put("key2", "val2")... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test (dependsOnMethods = "nullCustomAttributesToEntity") public void addInvalidKeysToEntityCustomAttributes() throws AtlasBaseException { AtlasEntity tblEntity = getEntityFromStore(tblEntityGuid); Map<String, String> invalidCustomAttributes = new HashMap<>(); invalidCustomAttributes.put("key0_65765-6565", "val0"); inv... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test (dependsOnMethods = "addInvalidKeysToEntityCustomAttributes") public void addInvalidValuesToEntityCustomAttributes() throws AtlasBaseException { AtlasEntity tblEntity = getEntityFromStore(tblEntityGuid); Map<String, String> invalidCustomAttributes = new HashMap<>(); invalidCustomAttributes.put("key1", randomAlpha... | @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } } | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate) throws AtlasBaseException { return createOrUpdate(entityStream, isPartialUpdate, false, false); } @Inject AtlasEntityStoreV2(AtlasGraph graph, De... |
@Test(dependsOnMethods = "testCreate") public void addLabelsToEntity() throws AtlasBaseException { Set<String> labels = new HashSet<>(); labels.add("label_1"); labels.add("label_2"); labels.add("label_3"); labels.add("label_4"); labels.add("label_5"); entityStore.setLabels(tblEntityGuid, labels); AtlasEntity tblEntity ... | @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "guid is null/empty"); } AtlasVertex entityVertex = ... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... |
@Test public void testMapTypeValidateValue() { List<String> messages = new ArrayList<>(); for (Object value : validValues) { assertTrue(intIntMapType.validateValue(value, "testObj", messages)); assertEquals(messages.size(), 0, "value=" + value); } for (Object value : invalidValues) { assertFalse(intIntMapType.validateV... | @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof Map) { Map<Object, Objects> map = (Map<Object, Objects>) obj; for (Map.Entry e : map.entrySet()) { Object key = e.getKey(); if (!keyType.isValidValue(key)) { ret = false;... | AtlasMapType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof Map) { Map<Object, Objects> map = (Map<Object, Objects>) obj; for (Map.Entry e : map.entrySet()) { Object key = e.getKey(); if (!keyType.... | AtlasMapType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof Map) { Map<Object, Objects> map = (Map<Object, Objects>) obj; for (Map.Entry e : map.entrySet()) { Object key = e.getKey(); if (!keyType.... | AtlasMapType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof Map) { Map<Object, Objects> map = (Map<Object, Objects>) obj; for (Map.Entry e : map.entrySet()) { Object key = e.getKey(); if (!keyType.... | AtlasMapType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof Map) { Map<Object, Objects> map = (Map<Object, Objects>) obj; for (Map.Entry e : map.entrySet()) { Object key = e.getKey(); if (!keyType.... |
@Test (dependsOnMethods = "addLabelsToEntity") public void updateLabelsToEntity() throws AtlasBaseException { Set<String> labels = new HashSet<>(); labels.add("label_1_update"); labels.add("label_2_update"); labels.add("label_3_update"); entityStore.setLabels(tblEntityGuid, labels); AtlasEntity tblEntity = getEntityFro... | @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "guid is null/empty"); } AtlasVertex entityVertex = ... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... |
@Test (dependsOnMethods = "updateLabelsToEntity") public void clearLabelsToEntity() throws AtlasBaseException { HashSet<String> emptyLabels = new HashSet<>(); entityStore.setLabels(tblEntityGuid, emptyLabels); AtlasEntity tblEntity = getEntityFromStore(tblEntityGuid); Assert.assertTrue(tblEntity.getLabels().isEmpty());... | @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "guid is null/empty"); } AtlasVertex entityVertex = ... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... |
@Test (dependsOnMethods = "clearLabelsToEntity") public void emptyLabelsToEntity() throws AtlasBaseException { entityStore.setLabels(tblEntityGuid, null); AtlasEntity tblEntity = getEntityFromStore(tblEntityGuid); Assert.assertTrue(tblEntity.getLabels().isEmpty()); } | @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "guid is null/empty"); } AtlasVertex entityVertex = ... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... |
@Test (dependsOnMethods = "emptyLabelsToEntity") public void invalidLabelLengthToEntity() throws AtlasBaseException { Set<String> labels = new HashSet<>(); labels.add(randomAlphanumeric(50)); labels.add(randomAlphanumeric(51)); try { entityStore.setLabels(tblEntityGuid, labels); } catch (AtlasBaseException ex) { assert... | @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "guid is null/empty"); } AtlasVertex entityVertex = ... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... |
@Test (dependsOnMethods = "invalidLabelLengthToEntity") public void invalidLabelCharactersToEntity() { Set<String> labels = new HashSet<>(); labels.add("label-1_100_45"); labels.add("LABEL-1_200-55"); labels.add("LaBeL-1-)(*U&%^%#$@!~"); try { entityStore.setLabels(tblEntityGuid, labels); } catch (AtlasBaseException ex... | @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "guid is null/empty"); } AtlasVertex entityVertex = ... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void setLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> setLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "gu... |
@Test (dependsOnMethods = "addMoreLabelsToEntity") public void deleteLabelsToEntity() throws AtlasBaseException { Set<String> labels = new HashSet<>(); labels.add("label_1_add"); labels.add("label_2_add"); entityStore.removeLabels(tblEntityGuid, labels); AtlasEntity tblEntity = getEntityFromStore(tblEntityGuid); assert... | @Override @GraphTransaction public void removeLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> removeLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, "guid is null/empty"); } if (CollectionUtils.i... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void removeLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> removeLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETER... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void removeLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> removeLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETER... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void removeLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> removeLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETER... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void removeLabels(String guid, Set<String> labels) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> removeLabels()"); } if (StringUtils.isEmpty(guid)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETER... |
@Test public void testAddBusinessAttributesStringMaxLengthCheck_2() throws Exception { Map<String, Map<String, Object>> bmMapReq = new HashMap<>(); Map<String, Object> bmAttrMapReq = new HashMap<>(); bmAttrMapReq.put("attr8", "012345678901234567890"); bmMapReq.put("bmWithAllTypes", bmAttrMapReq); try { entityStore.addO... | @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, businessAttributes={}, isOverwrite={})", guid, busines... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... |
@Test(dependsOnMethods = "testAddBusinessAttributesStringMaxLengthCheck") public void testUpdateBusinessAttributesStringMaxLengthCheck_2() throws Exception { Map<String, Map<String, Object>> bmMapReq = new HashMap<>(); Map<String, Object> bmAttrMapReq = new HashMap<>(); bmAttrMapReq.put("attr8", "012345678901234567890"... | @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, businessAttributes={}, isOverwrite={})", guid, busines... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... |
@Test(dependsOnMethods = "testAddBusinessAttributesStringMaxLengthCheck") public void testUpdateBusinessAttributesStringMaxLengthCheck_4() throws Exception { Map<String, Map<String, Object>> bmAttrMapReq = new HashMap<>(); Map<String, Object> attrValueMapReq = new HashMap<>(); List<String> stringList = new ArrayList<>(... | @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, businessAttributes={}, isOverwrite={})", guid, busines... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public void addOrUpdateBusinessAttributes(String guid, Map<String, Map<String, Object>> businessAttrbutes, boolean isOverwrite) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> addOrUpdateBusinessAttributes(guid={}, busin... |
@Test public void testEmptyFileException() { InputStream inputStream = getFile(CSV_FILES, "empty.csv"); try { entityStore.bulkCreateOrUpdateBusinessAttributes(inputStream, "empty.csv"); fail("Error occurred : Failed to recognize the empty file."); } catch (AtlasBaseException e) { assertEquals(e.getMessage(), "No data f... | @Override @GraphTransaction public BulkImportResponse bulkCreateOrUpdateBusinessAttributes(InputStream inputStream, String fileName) throws AtlasBaseException { BulkImportResponse ret = new BulkImportResponse(); try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.FILE_NAME_NOT_FOUND, ... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public BulkImportResponse bulkCreateOrUpdateBusinessAttributes(InputStream inputStream, String fileName) throws AtlasBaseException { BulkImportResponse ret = new BulkImportResponse(); try { if (StringUtils.isBlank(fileName)) { throw new AtlasB... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public BulkImportResponse bulkCreateOrUpdateBusinessAttributes(InputStream inputStream, String fileName) throws AtlasBaseException { BulkImportResponse ret = new BulkImportResponse(); try { if (StringUtils.isBlank(fileName)) { throw new AtlasB... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public BulkImportResponse bulkCreateOrUpdateBusinessAttributes(InputStream inputStream, String fileName) throws AtlasBaseException { BulkImportResponse ret = new BulkImportResponse(); try { if (StringUtils.isBlank(fileName)) { throw new AtlasB... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public BulkImportResponse bulkCreateOrUpdateBusinessAttributes(InputStream inputStream, String fileName) throws AtlasBaseException { BulkImportResponse ret = new BulkImportResponse(); try { if (StringUtils.isBlank(fileName)) { throw new AtlasB... |
@Test public void testArrayTypeDefaultValue() { Collection defValue = intArrayType.createDefaultValue(); assertEquals(defValue.size(), 1); } | @Override public Collection<?> createDefaultValue() { Collection<Object> ret = new ArrayList<>(); ret.add(elementType.createDefaultValue()); if (minCount != COUNT_NOT_SET) { for (int i = 1; i < minCount; i++) { ret.add(elementType.createDefaultValue()); } } return ret; } | AtlasArrayType extends AtlasType { @Override public Collection<?> createDefaultValue() { Collection<Object> ret = new ArrayList<>(); ret.add(elementType.createDefaultValue()); if (minCount != COUNT_NOT_SET) { for (int i = 1; i < minCount; i++) { ret.add(elementType.createDefaultValue()); } } return ret; } } | AtlasArrayType extends AtlasType { @Override public Collection<?> createDefaultValue() { Collection<Object> ret = new ArrayList<>(); ret.add(elementType.createDefaultValue()); if (minCount != COUNT_NOT_SET) { for (int i = 1; i < minCount; i++) { ret.add(elementType.createDefaultValue()); } } return ret; } AtlasArrayTyp... | AtlasArrayType extends AtlasType { @Override public Collection<?> createDefaultValue() { Collection<Object> ret = new ArrayList<>(); ret.add(elementType.createDefaultValue()); if (minCount != COUNT_NOT_SET) { for (int i = 1; i < minCount; i++) { ret.add(elementType.createDefaultValue()); } } return ret; } AtlasArrayTyp... | AtlasArrayType extends AtlasType { @Override public Collection<?> createDefaultValue() { Collection<Object> ret = new ArrayList<>(); ret.add(elementType.createDefaultValue()); if (minCount != COUNT_NOT_SET) { for (int i = 1; i < minCount; i++) { ret.add(elementType.createDefaultValue()); } } return ret; } AtlasArrayTyp... |
@Test(dependsOnMethods = "testCreate") public void testBulkAddOrUpdateBusinessAttributes() { try { AtlasEntity hive_db_1 = getEntityFromStore(dbEntityGuid); String dbName = (String) hive_db_1.getAttribute("name"); String data = TestUtilsV2.getFileData(CSV_FILES, "template_2.csv"); data = data.replaceAll("hive_db_1", db... | @Override @GraphTransaction public BulkImportResponse bulkCreateOrUpdateBusinessAttributes(InputStream inputStream, String fileName) throws AtlasBaseException { BulkImportResponse ret = new BulkImportResponse(); try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.FILE_NAME_NOT_FOUND, ... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public BulkImportResponse bulkCreateOrUpdateBusinessAttributes(InputStream inputStream, String fileName) throws AtlasBaseException { BulkImportResponse ret = new BulkImportResponse(); try { if (StringUtils.isBlank(fileName)) { throw new AtlasB... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public BulkImportResponse bulkCreateOrUpdateBusinessAttributes(InputStream inputStream, String fileName) throws AtlasBaseException { BulkImportResponse ret = new BulkImportResponse(); try { if (StringUtils.isBlank(fileName)) { throw new AtlasB... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public BulkImportResponse bulkCreateOrUpdateBusinessAttributes(InputStream inputStream, String fileName) throws AtlasBaseException { BulkImportResponse ret = new BulkImportResponse(); try { if (StringUtils.isBlank(fileName)) { throw new AtlasB... | AtlasEntityStoreV2 implements AtlasEntityStore { @Override @GraphTransaction public BulkImportResponse bulkCreateOrUpdateBusinessAttributes(InputStream inputStream, String fileName) throws AtlasBaseException { BulkImportResponse ret = new BulkImportResponse(); try { if (StringUtils.isBlank(fileName)) { throw new AtlasB... |
@Test(dataProvider = "traitRegexString") public void testIsValidName(String data, boolean expected) { assertEquals(classificationDefStore.isValidName(data), expected); } | @Override public boolean isValidName(String typeName) { Matcher m = TRAIT_NAME_PATTERN.matcher(typeName); return m.matches(); } | AtlasClassificationDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasClassificationDef> { @Override public boolean isValidName(String typeName) { Matcher m = TRAIT_NAME_PATTERN.matcher(typeName); return m.matches(); } } | AtlasClassificationDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasClassificationDef> { @Override public boolean isValidName(String typeName) { Matcher m = TRAIT_NAME_PATTERN.matcher(typeName); return m.matches(); } AtlasClassificationDefStoreV2(AtlasTypeDefGraphStoreV2 typeDefStore, AtlasTypeRegistry typeRegistry); } | AtlasClassificationDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasClassificationDef> { @Override public boolean isValidName(String typeName) { Matcher m = TRAIT_NAME_PATTERN.matcher(typeName); return m.matches(); } AtlasClassificationDefStoreV2(AtlasTypeDefGraphStoreV2 typeDefStore, AtlasTypeRegistry typeRegistry); @O... | AtlasClassificationDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasClassificationDef> { @Override public boolean isValidName(String typeName) { Matcher m = TRAIT_NAME_PATTERN.matcher(typeName); return m.matches(); } AtlasClassificationDefStoreV2(AtlasTypeDefGraphStoreV2 typeDefStore, AtlasTypeRegistry typeRegistry); @O... |
@Test(dataProvider = "invalidAttributeNameWithReservedKeywords") public void testCreateTypeWithReservedKeywords(AtlasRelationshipDef atlasRelationshipDef) throws AtlasException { try { ApplicationProperties.get().setProperty(AtlasAbstractDefStoreV2.ALLOW_RESERVED_KEYWORDS, false); relationshipDefStore.create(atlasRelat... | @Override public AtlasRelationshipDef create(AtlasRelationshipDef relationshipDef, AtlasVertex preCreateResult) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasRelationshipDefStoreV1.create({}, {})", relationshipDef, preCreateResult); } verifyTypeReadAccess(relationshipDef.getEndDef1().getTy... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { @Override public AtlasRelationshipDef create(AtlasRelationshipDef relationshipDef, AtlasVertex preCreateResult) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasRelationshipDefStoreV1.create({}, {})", relation... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { @Override public AtlasRelationshipDef create(AtlasRelationshipDef relationshipDef, AtlasVertex preCreateResult) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasRelationshipDefStoreV1.create({}, {})", relation... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { @Override public AtlasRelationshipDef create(AtlasRelationshipDef relationshipDef, AtlasVertex preCreateResult) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasRelationshipDefStoreV1.create({}, {})", relation... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { @Override public AtlasRelationshipDef create(AtlasRelationshipDef relationshipDef, AtlasVertex preCreateResult) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasRelationshipDefStoreV1.create({}, {})", relation... |
@Test(dataProvider = "updateValidProperties") public void testupdateVertexPreUpdatepropagateTags(AtlasRelationshipDef existingRelationshipDef,AtlasRelationshipDef newRelationshipDef) throws AtlasBaseException { AtlasRelationshipDefStoreV2.preUpdateCheck(existingRelationshipDef, newRelationshipDef); } | private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUpdateCheck(newRelationshipDef, existingRelationshipDef); AtlasStructDefStoreV2.update... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... |
@Test(dataProvider = "updateRename") public void testupdateVertexPreUpdateRename(AtlasRelationshipDef existingRelationshipDef,AtlasRelationshipDef newRelationshipDef) { try { AtlasRelationshipDefStoreV2.preUpdateCheck(existingRelationshipDef, newRelationshipDef); fail("expected error"); } catch (AtlasBaseException e) {... | private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUpdateCheck(newRelationshipDef, existingRelationshipDef); AtlasStructDefStoreV2.update... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... |
@Test(dataProvider = "updateRelCat") public void testupdateVertexPreUpdateRelcat(AtlasRelationshipDef existingRelationshipDef,AtlasRelationshipDef newRelationshipDef) { try { AtlasRelationshipDefStoreV2.preUpdateCheck(existingRelationshipDef, newRelationshipDef); fail("expected error"); } catch (AtlasBaseException e) {... | private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUpdateCheck(newRelationshipDef, existingRelationshipDef); AtlasStructDefStoreV2.update... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... |
@Test(dataProvider = "updateEnd1") public void testupdateVertexPreUpdateEnd1(AtlasRelationshipDef existingRelationshipDef,AtlasRelationshipDef newRelationshipDef) { try { AtlasRelationshipDefStoreV2.preUpdateCheck(existingRelationshipDef, newRelationshipDef); fail("expected error"); } catch (AtlasBaseException e) { if ... | private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUpdateCheck(newRelationshipDef, existingRelationshipDef); AtlasStructDefStoreV2.update... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... |
@Test(dataProvider = "updateEnd2") public void testupdateVertexPreUpdateEnd2(AtlasRelationshipDef existingRelationshipDef,AtlasRelationshipDef newRelationshipDef) { try { AtlasRelationshipDefStoreV2.preUpdateCheck(existingRelationshipDef, newRelationshipDef); fail("expected error"); } catch (AtlasBaseException e) { if ... | private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUpdateCheck(newRelationshipDef, existingRelationshipDef); AtlasStructDefStoreV2.update... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... | AtlasRelationshipDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasRelationshipDef> { private void preUpdateCheck(AtlasRelationshipDef newRelationshipDef, AtlasRelationshipType relationshipType, AtlasVertex vertex) throws AtlasBaseException { AtlasRelationshipDef existingRelationshipDef = toRelationshipDef(vertex); preUp... |
@Test(dataProvider = "invalidAttributeNameWithReservedKeywords") public void testCreateTypeWithReservedKeywords(AtlasEntityDef atlasEntityDef) throws AtlasException { try { ApplicationProperties.get().setProperty(AtlasAbstractDefStoreV2.ALLOW_RESERVED_KEYWORDS, false); entityDefStore.create(atlasEntityDef, null); } cat... | @Override public AtlasEntityDef create(AtlasEntityDef entityDef, AtlasVertex preCreateResult) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasEntityDefStoreV1.create({}, {})", entityDef, preCreateResult); } verifyAttributeTypeReadAccess(entityDef.getAttributeDefs()); AtlasAuthorizationUtils.... | AtlasEntityDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasEntityDef> { @Override public AtlasEntityDef create(AtlasEntityDef entityDef, AtlasVertex preCreateResult) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasEntityDefStoreV1.create({}, {})", entityDef, preCreateResult); } verifyAttribu... | AtlasEntityDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasEntityDef> { @Override public AtlasEntityDef create(AtlasEntityDef entityDef, AtlasVertex preCreateResult) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasEntityDefStoreV1.create({}, {})", entityDef, preCreateResult); } verifyAttribu... | AtlasEntityDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasEntityDef> { @Override public AtlasEntityDef create(AtlasEntityDef entityDef, AtlasVertex preCreateResult) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasEntityDefStoreV1.create({}, {})", entityDef, preCreateResult); } verifyAttribu... | AtlasEntityDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasEntityDef> { @Override public AtlasEntityDef create(AtlasEntityDef entityDef, AtlasVertex preCreateResult) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasEntityDefStoreV1.create({}, {})", entityDef, preCreateResult); } verifyAttribu... |
@Test public void testGet() { try { AtlasTypesDef typesDef = typeDefStore.searchTypesDef(new SearchFilter()); assertNotNull(typesDef.getEnumDefs()); assertEquals(typesDef.getStructDefs().size(), 0); assertNotNull(typesDef.getStructDefs()); assertEquals(typesDef.getClassificationDefs().size(), 0); assertNotNull(typesDef... | @Override public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException { final AtlasTypesDef typesDef = new AtlasTypesDef(); Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter); for(AtlasEnumType enumType : typeRegistry.getAllEnumTypes()) { if (searchPredicates... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException { final AtlasTypesDef typesDef = new AtlasTypesDef(); Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter); for(AtlasEnumType enumType : ... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException { final AtlasTypesDef typesDef = new AtlasTypesDef(); Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter); for(AtlasEnumType enumType : ... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException { final AtlasTypesDef typesDef = new AtlasTypesDef(); Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter); for(AtlasEnumType enumType : ... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException { final AtlasTypesDef typesDef = new AtlasTypesDef(); Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter); for(AtlasEnumType enumType : ... |
@Test public void testArrayTypeIsValidValue() { for (Object value : validValues) { assertTrue(intArrayType.isValidValue(value), "value=" + value); } for (Object value : invalidValues) { assertFalse(intArrayType.isValidValue(value), "value=" + value); } } | @Override public boolean isValidValue(Object obj) { if (obj != null) { if (obj instanceof List || obj instanceof Set) { Collection objList = (Collection) obj; if (!isValidElementCount(objList.size())) { return false; } for (Object element : objList) { if (!elementType.isValidValue(element)) { return false; } } } else i... | AtlasArrayType extends AtlasType { @Override public boolean isValidValue(Object obj) { if (obj != null) { if (obj instanceof List || obj instanceof Set) { Collection objList = (Collection) obj; if (!isValidElementCount(objList.size())) { return false; } for (Object element : objList) { if (!elementType.isValidValue(ele... | AtlasArrayType extends AtlasType { @Override public boolean isValidValue(Object obj) { if (obj != null) { if (obj instanceof List || obj instanceof Set) { Collection objList = (Collection) obj; if (!isValidElementCount(objList.size())) { return false; } for (Object element : objList) { if (!elementType.isValidValue(ele... | AtlasArrayType extends AtlasType { @Override public boolean isValidValue(Object obj) { if (obj != null) { if (obj instanceof List || obj instanceof Set) { Collection objList = (Collection) obj; if (!isValidElementCount(objList.size())) { return false; } for (Object element : objList) { if (!elementType.isValidValue(ele... | AtlasArrayType extends AtlasType { @Override public boolean isValidValue(Object obj) { if (obj != null) { if (obj instanceof List || obj instanceof Set) { Collection objList = (Collection) obj; if (!isValidElementCount(objList.size())) { return false; } for (Object element : objList) { if (!elementType.isValidValue(ele... |
@Test(enabled = false, dependsOnMethods = {"testCreateDept"}) public void testUpdateWithMandatoryFields(){ AtlasTypesDef atlasTypesDef = TestUtilsV2.defineInvalidUpdatedDeptEmployeeTypes(); List<AtlasEnumDef> enumDefsToUpdate = atlasTypesDef.getEnumDefs(); List<AtlasClassificationDef> classificationDefsToUpdate = atlas... | @Override @GraphTransaction public AtlasTypesDef updateTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.updateTypesDef(enums={}, structs={}, classfications={}, entities={}, relationships{}, businessMetadataDefs={})", CollectionUtils.size(type... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef updateTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.updateTypesDef(enums={}, structs={}, classfications={}, entities={}, relationships{}... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef updateTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.updateTypesDef(enums={}, structs={}, classfications={}, entities={}, relationships{}... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef updateTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.updateTypesDef(enums={}, structs={}, classfications={}, entities={}, relationships{}... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef updateTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.updateTypesDef(enums={}, structs={}, classfications={}, entities={}, relationships{}... |
@Test(dependsOnMethods = {"testUpdate"}, dataProvider = "allCreatedTypes") public void testDelete(AtlasTypesDef atlasTypesDef){ try { typeDefStore.deleteTypesDef(atlasTypesDef); } catch (AtlasBaseException e) { fail("Deletion should've succeeded"); } } | @Override @GraphTransaction public void deleteTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.deleteTypesDef(enums={}, structs={}, classfications={}, entities={}, relationships={}, businessMetadataDefs={})", CollectionUtils.size(typesDef.get... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public void deleteTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.deleteTypesDef(enums={}, structs={}, classfications={}, entities={}, relationships={}, busine... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public void deleteTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.deleteTypesDef(enums={}, structs={}, classfications={}, entities={}, relationships={}, busine... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public void deleteTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.deleteTypesDef(enums={}, structs={}, classfications={}, entities={}, relationships={}, busine... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public void deleteTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.deleteTypesDef(enums={}, structs={}, classfications={}, entities={}, relationships={}, busine... |
@Test public void deleteTypeByName() throws IOException { try { final String HIVEDB_v2_JSON = "hiveDBv2"; final String hiveDB2 = "hive_db_v2"; final String relationshipDefName = "cluster_hosts_relationship"; final String hostEntityDef = "host"; final String clusterEntityDef = "cluster"; AtlasTypesDef typesDef = TestRes... | @Override @GraphTransaction public void deleteTypeByName(String typeName) throws AtlasBaseException { AtlasType atlasType = typeRegistry.getType(typeName); if (atlasType == null) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS.TYPE_NAME_NOT_FOUND, typeName); } AtlasTypesDef typesDef = new AtlasTypesDef... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public void deleteTypeByName(String typeName) throws AtlasBaseException { AtlasType atlasType = typeRegistry.getType(typeName); if (atlasType == null) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS.TYPE_NAME_NOT_FOUND, t... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public void deleteTypeByName(String typeName) throws AtlasBaseException { AtlasType atlasType = typeRegistry.getType(typeName); if (atlasType == null) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS.TYPE_NAME_NOT_FOUND, t... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public void deleteTypeByName(String typeName) throws AtlasBaseException { AtlasType atlasType = typeRegistry.getType(typeName); if (atlasType == null) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS.TYPE_NAME_NOT_FOUND, t... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public void deleteTypeByName(String typeName) throws AtlasBaseException { AtlasType atlasType = typeRegistry.getType(typeName); if (atlasType == null) { throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS.TYPE_NAME_NOT_FOUND, t... |
@Test(dependsOnMethods = "testGet") public void testCreateWithValidAttributes(){ AtlasTypesDef hiveTypes = TestUtilsV2.defineHiveTypes(); try { AtlasTypesDef createdTypes = typeDefStore.createTypesDef(hiveTypes); assertEquals(hiveTypes.getEnumDefs(), createdTypes.getEnumDefs(), "Data integrity issue while persisting");... | @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships={}, businessMetadataDefs={})", CollectionUtils.size(ty... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... |
@Test(dependsOnMethods = "testGet") public void testCreateWithNestedContainerAttributes() { AtlasTypesDef typesDef = TestUtilsV2.defineTypeWithNestedCollectionAttributes(); try { AtlasTypesDef createdTypes = typeDefStore.createTypesDef(typesDef); assertEquals(typesDef.getEnumDefs(), createdTypes.getEnumDefs(), "Data in... | @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships={}, businessMetadataDefs={})", CollectionUtils.size(ty... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... |
@Test(dependsOnMethods = "testGet") public void testCreateWithValidSuperTypes(){ List<AtlasClassificationDef> classificationDefs = TestUtilsV2.getClassificationWithValidSuperType(); AtlasTypesDef toCreate = new AtlasTypesDef(Collections.<AtlasEnumDef>emptyList(), Collections.<AtlasStructDef>emptyList(), classificationD... | @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships={}, businessMetadataDefs={})", CollectionUtils.size(ty... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... |
@Test(dependsOnMethods = "testGet") public void testCreateWithInvalidSuperTypes(){ AtlasTypesDef typesDef; AtlasClassificationDef classificationDef = TestUtilsV2.getClassificationWithInvalidSuperType(); typesDef = new AtlasTypesDef(); typesDef.getClassificationDefs().add(classificationDef); try { AtlasTypesDef created ... | @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships={}, businessMetadataDefs={})", CollectionUtils.size(ty... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... |
@Test(dependsOnMethods = "testGet") public void testCreateClassificationDefWithValidEntityType(){ final String entityTypeName ="testCreateClassificationDefWithValidEntityTypeEntity1"; final String classificationTypeName ="testCreateClassificationDefWithValidEntityTypeClassification1"; List<AtlasEntityDef> entityDefs = ... | @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships={}, businessMetadataDefs={})", CollectionUtils.size(ty... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... |
@Test(dependsOnMethods = "testGet") public void testCreateWithInvalidEntityType(){ final String classificationTypeName ="testCreateClassificationDefWithInvalidEntityTypeClassification1"; List<AtlasClassificationDef> classificationDefs = TestUtilsV2.getClassificationWithName(classificationTypeName); Set<String> entityTy... | @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships={}, businessMetadataDefs={})", CollectionUtils.size(ty... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... |
@Test(dependsOnMethods = "testGet") public void testCreateWithInvalidEntityType2(){ final String classificationTypeName1 ="testCreateClassificationDefWithInvalidEntityType2Classification1"; final String classificationTypeName2 ="testCreateClassificationDefWithInvalidEntityType2Classification2"; final String entityTypeN... | @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships={}, businessMetadataDefs={})", CollectionUtils.size(ty... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... |
@Test public void testArrayTypeGetNormalizedValue() { assertNull(intArrayType.getNormalizedValue(null), "value=" + null); for (Object value : validValues) { if (value == null) { continue; } Collection normalizedValue = intArrayType.getNormalizedValue(value); assertNotNull(normalizedValue, "value=" + value); } for (Obje... | @Override public Collection<?> getNormalizedValue(Object obj) { Collection<Object> ret = null; if (obj instanceof String) { obj = AtlasType.fromJson(obj.toString(), List.class); } if (obj instanceof List || obj instanceof Set) { Collection collObj = (Collection) obj; if (isValidElementCount(collObj.size())) { ret = new... | AtlasArrayType extends AtlasType { @Override public Collection<?> getNormalizedValue(Object obj) { Collection<Object> ret = null; if (obj instanceof String) { obj = AtlasType.fromJson(obj.toString(), List.class); } if (obj instanceof List || obj instanceof Set) { Collection collObj = (Collection) obj; if (isValidElemen... | AtlasArrayType extends AtlasType { @Override public Collection<?> getNormalizedValue(Object obj) { Collection<Object> ret = null; if (obj instanceof String) { obj = AtlasType.fromJson(obj.toString(), List.class); } if (obj instanceof List || obj instanceof Set) { Collection collObj = (Collection) obj; if (isValidElemen... | AtlasArrayType extends AtlasType { @Override public Collection<?> getNormalizedValue(Object obj) { Collection<Object> ret = null; if (obj instanceof String) { obj = AtlasType.fromJson(obj.toString(), List.class); } if (obj instanceof List || obj instanceof Set) { Collection collObj = (Collection) obj; if (isValidElemen... | AtlasArrayType extends AtlasType { @Override public Collection<?> getNormalizedValue(Object obj) { Collection<Object> ret = null; if (obj instanceof String) { obj = AtlasType.fromJson(obj.toString(), List.class); } if (obj instanceof List || obj instanceof Set) { Collection collObj = (Collection) obj; if (isValidElemen... |
@Test(dependsOnMethods = "testGet") public void testCreateWithInvalidEntityType3(){ final String classificationTypeName1 ="testCreateClassificationDefWithInvalidEntityType3Classification1"; final String classificationTypeName2 ="testCreateClassificationDefWithInvalidEntityType3Classification2"; final String entityTypeN... | @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships={}, businessMetadataDefs={})", CollectionUtils.size(ty... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override @GraphTransaction public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException { if (LOG.isDebugEnabled()) { LOG.debug("==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships=... |
@Test(dependsOnMethods = "testGet") public void testSearchFunctionality() { SearchFilter searchFilter = new SearchFilter(); searchFilter.setParam(SearchFilter.PARAM_SUPERTYPE, "Person"); try { AtlasTypesDef typesDef = typeDefStore.searchTypesDef(searchFilter); assertNotNull(typesDef); assertNotNull(typesDef.getEntityDe... | @Override public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException { final AtlasTypesDef typesDef = new AtlasTypesDef(); Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter); for(AtlasEnumType enumType : typeRegistry.getAllEnumTypes()) { if (searchPredicates... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException { final AtlasTypesDef typesDef = new AtlasTypesDef(); Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter); for(AtlasEnumType enumType : ... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException { final AtlasTypesDef typesDef = new AtlasTypesDef(); Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter); for(AtlasEnumType enumType : ... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException { final AtlasTypesDef typesDef = new AtlasTypesDef(); Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter); for(AtlasEnumType enumType : ... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException { final AtlasTypesDef typesDef = new AtlasTypesDef(); Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter); for(AtlasEnumType enumType : ... |
@Test public void testGetOnAllEntityTypes() throws AtlasBaseException { AtlasEntityDef entityDefByName = typeDefStore.getEntityDefByName("_ALL_ENTITY_TYPES"); assertNotNull(entityDefByName); assertEquals(entityDefByName, AtlasEntityType.getEntityRoot().getEntityDef()); } | @Override public AtlasEntityDef getEntityDefByName(String name) throws AtlasBaseException { AtlasEntityDef ret = typeRegistry.getEntityDefByName(name); if (ret == null) { ret = StringUtils.equals(name, ALL_ENTITY_TYPES) ? AtlasEntityType.getEntityRoot().getEntityDef() : null; if (ret == null) { throw new AtlasBaseExcep... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasEntityDef getEntityDefByName(String name) throws AtlasBaseException { AtlasEntityDef ret = typeRegistry.getEntityDefByName(name); if (ret == null) { ret = StringUtils.equals(name, ALL_ENTITY_TYPES) ? AtlasEntityType.getEntityRoot().getEntityDef... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasEntityDef getEntityDefByName(String name) throws AtlasBaseException { AtlasEntityDef ret = typeRegistry.getEntityDefByName(name); if (ret == null) { ret = StringUtils.equals(name, ALL_ENTITY_TYPES) ? AtlasEntityType.getEntityRoot().getEntityDef... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasEntityDef getEntityDefByName(String name) throws AtlasBaseException { AtlasEntityDef ret = typeRegistry.getEntityDefByName(name); if (ret == null) { ret = StringUtils.equals(name, ALL_ENTITY_TYPES) ? AtlasEntityType.getEntityRoot().getEntityDef... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasEntityDef getEntityDefByName(String name) throws AtlasBaseException { AtlasEntityDef ret = typeRegistry.getEntityDefByName(name); if (ret == null) { ret = StringUtils.equals(name, ALL_ENTITY_TYPES) ? AtlasEntityType.getEntityRoot().getEntityDef... |
@Test public void testGetOnAllClassificationTypes() throws AtlasBaseException { AtlasClassificationDef classificationTypeDef = typeDefStore.getClassificationDefByName("_ALL_CLASSIFICATION_TYPES"); assertNotNull(classificationTypeDef); assertEquals(classificationTypeDef, AtlasClassificationType.getClassificationRoot().g... | @Override public AtlasClassificationDef getClassificationDefByName(String name) throws AtlasBaseException { AtlasClassificationDef ret = typeRegistry.getClassificationDefByName(name); if (ret == null) { ret = StringUtils.equalsIgnoreCase(name, ALL_CLASSIFICATION_TYPES) ? AtlasClassificationType.getClassificationRoot().... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasClassificationDef getClassificationDefByName(String name) throws AtlasBaseException { AtlasClassificationDef ret = typeRegistry.getClassificationDefByName(name); if (ret == null) { ret = StringUtils.equalsIgnoreCase(name, ALL_CLASSIFICATION_TYP... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasClassificationDef getClassificationDefByName(String name) throws AtlasBaseException { AtlasClassificationDef ret = typeRegistry.getClassificationDefByName(name); if (ret == null) { ret = StringUtils.equalsIgnoreCase(name, ALL_CLASSIFICATION_TYP... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasClassificationDef getClassificationDefByName(String name) throws AtlasBaseException { AtlasClassificationDef ret = typeRegistry.getClassificationDefByName(name); if (ret == null) { ret = StringUtils.equalsIgnoreCase(name, ALL_CLASSIFICATION_TYP... | AtlasTypeDefGraphStore implements AtlasTypeDefStore { @Override public AtlasClassificationDef getClassificationDefByName(String name) throws AtlasBaseException { AtlasClassificationDef ret = typeRegistry.getClassificationDefByName(name); if (ret == null) { ret = StringUtils.equalsIgnoreCase(name, ALL_CLASSIFICATION_TYP... |
@Test(dependsOnMethods = "verifyCreate") public void verifyGet() throws AtlasBaseException { AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo = hdfsPathEntityCreator.getCreateEntity(expectedPath, expectedClusterName); assertNotNull(entityWithExtInfo); } | public AtlasEntity.AtlasEntityWithExtInfo getCreateEntity(AtlasObjectId item) throws AtlasBaseException { if(item.getUniqueAttributes() == null || !item.getUniqueAttributes().containsKey(HDFS_PATH_ATTRIBUTE_NAME_PATH)) { return null; } return getCreateEntity((String) item.getUniqueAttributes().get(HDFS_PATH_ATTRIBUTE_N... | HdfsPathEntityCreator { public AtlasEntity.AtlasEntityWithExtInfo getCreateEntity(AtlasObjectId item) throws AtlasBaseException { if(item.getUniqueAttributes() == null || !item.getUniqueAttributes().containsKey(HDFS_PATH_ATTRIBUTE_NAME_PATH)) { return null; } return getCreateEntity((String) item.getUniqueAttributes().g... | HdfsPathEntityCreator { public AtlasEntity.AtlasEntityWithExtInfo getCreateEntity(AtlasObjectId item) throws AtlasBaseException { if(item.getUniqueAttributes() == null || !item.getUniqueAttributes().containsKey(HDFS_PATH_ATTRIBUTE_NAME_PATH)) { return null; } return getCreateEntity((String) item.getUniqueAttributes().g... | HdfsPathEntityCreator { public AtlasEntity.AtlasEntityWithExtInfo getCreateEntity(AtlasObjectId item) throws AtlasBaseException { if(item.getUniqueAttributes() == null || !item.getUniqueAttributes().containsKey(HDFS_PATH_ATTRIBUTE_NAME_PATH)) { return null; } return getCreateEntity((String) item.getUniqueAttributes().g... | HdfsPathEntityCreator { public AtlasEntity.AtlasEntityWithExtInfo getCreateEntity(AtlasObjectId item) throws AtlasBaseException { if(item.getUniqueAttributes() == null || !item.getUniqueAttributes().containsKey(HDFS_PATH_ATTRIBUTE_NAME_PATH)) { return null; } return getCreateEntity((String) item.getUniqueAttributes().g... |
@Test public void exportType() throws AtlasBaseException { String requestingIP = "1.0.0.0"; String hostName = "root"; AtlasExportRequest request = getRequestForFullFetch(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ZipSink zipSink = new ZipSink(baos); AtlasExportResult result = exportService.run(zipSink... | public AtlasExportResult run(ZipSink exportSink, AtlasExportRequest request, String userName, String hostName, String requestingIP) throws AtlasBaseException { long startTime = System.currentTimeMillis(); AtlasExportResult result = new AtlasExportResult(request, userName, requestingIP, hostName, startTime, getCurrentCh... | ExportService { public AtlasExportResult run(ZipSink exportSink, AtlasExportRequest request, String userName, String hostName, String requestingIP) throws AtlasBaseException { long startTime = System.currentTimeMillis(); AtlasExportResult result = new AtlasExportResult(request, userName, requestingIP, hostName, startTi... | ExportService { public AtlasExportResult run(ZipSink exportSink, AtlasExportRequest request, String userName, String hostName, String requestingIP) throws AtlasBaseException { long startTime = System.currentTimeMillis(); AtlasExportResult result = new AtlasExportResult(request, userName, requestingIP, hostName, startTi... | ExportService { public AtlasExportResult run(ZipSink exportSink, AtlasExportRequest request, String userName, String hostName, String requestingIP) throws AtlasBaseException { long startTime = System.currentTimeMillis(); AtlasExportResult result = new AtlasExportResult(request, userName, requestingIP, hostName, startTi... | ExportService { public AtlasExportResult run(ZipSink exportSink, AtlasExportRequest request, String userName, String hostName, String requestingIP) throws AtlasBaseException { long startTime = System.currentTimeMillis(); AtlasExportResult result = new AtlasExportResult(request, userName, requestingIP, hostName, startTi... |
@Test(expectedExceptions = AtlasBaseException.class) public void requestingEntityNotFound_NoData() throws AtlasBaseException, IOException { String requestingIP = "1.0.0.0"; String hostName = "root"; ByteArrayOutputStream baos = new ByteArrayOutputStream(); ZipSink zipSink = new ZipSink(baos); AtlasExportResult result =... | public AtlasExportResult run(ZipSink exportSink, AtlasExportRequest request, String userName, String hostName, String requestingIP) throws AtlasBaseException { long startTime = System.currentTimeMillis(); AtlasExportResult result = new AtlasExportResult(request, userName, requestingIP, hostName, startTime, getCurrentCh... | ExportService { public AtlasExportResult run(ZipSink exportSink, AtlasExportRequest request, String userName, String hostName, String requestingIP) throws AtlasBaseException { long startTime = System.currentTimeMillis(); AtlasExportResult result = new AtlasExportResult(request, userName, requestingIP, hostName, startTi... | ExportService { public AtlasExportResult run(ZipSink exportSink, AtlasExportRequest request, String userName, String hostName, String requestingIP) throws AtlasBaseException { long startTime = System.currentTimeMillis(); AtlasExportResult result = new AtlasExportResult(request, userName, requestingIP, hostName, startTi... | ExportService { public AtlasExportResult run(ZipSink exportSink, AtlasExportRequest request, String userName, String hostName, String requestingIP) throws AtlasBaseException { long startTime = System.currentTimeMillis(); AtlasExportResult result = new AtlasExportResult(request, userName, requestingIP, hostName, startTi... | ExportService { public AtlasExportResult run(ZipSink exportSink, AtlasExportRequest request, String userName, String hostName, String requestingIP) throws AtlasBaseException { long startTime = System.currentTimeMillis(); AtlasExportResult result = new AtlasExportResult(request, userName, requestingIP, hostName, startTi... |
@Test public void verifyOverallStatus() { assertEquals(AtlasExportResult.OperationStatus.FAIL, exportService.getOverallOperationStatus()); assertEquals(AtlasExportResult.OperationStatus.SUCCESS, exportService.getOverallOperationStatus(AtlasExportResult.OperationStatus.SUCCESS)); assertEquals(AtlasExportResult.Operation... | @VisibleForTesting AtlasExportResult.OperationStatus getOverallOperationStatus(AtlasExportResult.OperationStatus... statuses) { AtlasExportResult.OperationStatus overall = (statuses.length == 0) ? AtlasExportResult.OperationStatus.FAIL : statuses[0]; for (AtlasExportResult.OperationStatus s : statuses) { if (overall !=... | ExportService { @VisibleForTesting AtlasExportResult.OperationStatus getOverallOperationStatus(AtlasExportResult.OperationStatus... statuses) { AtlasExportResult.OperationStatus overall = (statuses.length == 0) ? AtlasExportResult.OperationStatus.FAIL : statuses[0]; for (AtlasExportResult.OperationStatus s : statuses) ... | ExportService { @VisibleForTesting AtlasExportResult.OperationStatus getOverallOperationStatus(AtlasExportResult.OperationStatus... statuses) { AtlasExportResult.OperationStatus overall = (statuses.length == 0) ? AtlasExportResult.OperationStatus.FAIL : statuses[0]; for (AtlasExportResult.OperationStatus s : statuses) ... | ExportService { @VisibleForTesting AtlasExportResult.OperationStatus getOverallOperationStatus(AtlasExportResult.OperationStatus... statuses) { AtlasExportResult.OperationStatus overall = (statuses.length == 0) ? AtlasExportResult.OperationStatus.FAIL : statuses[0]; for (AtlasExportResult.OperationStatus s : statuses) ... | ExportService { @VisibleForTesting AtlasExportResult.OperationStatus getOverallOperationStatus(AtlasExportResult.OperationStatus... statuses) { AtlasExportResult.OperationStatus overall = (statuses.length == 0) ? AtlasExportResult.OperationStatus.FAIL : statuses[0]; for (AtlasExportResult.OperationStatus s : statuses) ... |
@Test public void numberOfSavedEntries_Retrieved() throws AtlasBaseException, InterruptedException { final String source1 = "server1"; final String target1 = "cly"; int MAX_ENTRIES = 5; for (int i = 0; i < MAX_ENTRIES; i++) { saveAndGet(source1, ExportImportAuditEntry.OPERATION_EXPORT, target1); } pauseForIndexCreation... | public ExportImportAuditEntry get(ExportImportAuditEntry entry) throws AtlasBaseException { if(entry.getGuid() == null) { throw new AtlasBaseException("entity does not have GUID set. load cannot proceed."); } return dataAccess.load(entry); } | ExportImportAuditService { public ExportImportAuditEntry get(ExportImportAuditEntry entry) throws AtlasBaseException { if(entry.getGuid() == null) { throw new AtlasBaseException("entity does not have GUID set. load cannot proceed."); } return dataAccess.load(entry); } } | ExportImportAuditService { public ExportImportAuditEntry get(ExportImportAuditEntry entry) throws AtlasBaseException { if(entry.getGuid() == null) { throw new AtlasBaseException("entity does not have GUID set. load cannot proceed."); } return dataAccess.load(entry); } @Inject ExportImportAuditService(DataAccess dataAc... | ExportImportAuditService { public ExportImportAuditEntry get(ExportImportAuditEntry entry) throws AtlasBaseException { if(entry.getGuid() == null) { throw new AtlasBaseException("entity does not have GUID set. load cannot proceed."); } return dataAccess.load(entry); } @Inject ExportImportAuditService(DataAccess dataAc... | ExportImportAuditService { public ExportImportAuditEntry get(ExportImportAuditEntry entry) throws AtlasBaseException { if(entry.getGuid() == null) { throw new AtlasBaseException("entity does not have GUID set. load cannot proceed."); } return dataAccess.load(entry); } @Inject ExportImportAuditService(DataAccess dataAc... |
@Test public void testArrayTypeValidateValue() { List<String> messages = new ArrayList<>(); for (Object value : validValues) { assertTrue(intArrayType.validateValue(value, "testObj", messages)); assertEquals(messages.size(), 0, "value=" + value); } for (Object value : invalidValues) { assertFalse(intArrayType.validateV... | @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof List || obj instanceof Set) { Collection objList = (Collection) obj; if (!isValidElementCount(objList.size())) { ret = false; messages.add(objName + ": incorrect number o... | AtlasArrayType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof List || obj instanceof Set) { Collection objList = (Collection) obj; if (!isValidElementCount(objList.size())) { ret = false; messages.... | AtlasArrayType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof List || obj instanceof Set) { Collection objList = (Collection) obj; if (!isValidElementCount(objList.size())) { ret = false; messages.... | AtlasArrayType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof List || obj instanceof Set) { Collection objList = (Collection) obj; if (!isValidElementCount(objList.size())) { ret = false; messages.... | AtlasArrayType extends AtlasType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { if (obj instanceof List || obj instanceof Set) { Collection objList = (Collection) obj; if (!isValidElementCount(objList.size())) { ret = false; messages.... |
@Test(expectedExceptions = AtlasBaseException.class) public void improperInit_ReturnsNullCreationOrder() throws IOException, AtlasBaseException { byte bytes[] = new byte[10]; ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ZipSource zs = new ZipSource(bais); List<String> s = zs.getCreationOrder(); Assert.a... | @Override public List<String> getCreationOrder() { return this.creationOrder; } | ZipSource implements EntityImportStream { @Override public List<String> getCreationOrder() { return this.creationOrder; } } | ZipSource implements EntityImportStream { @Override public List<String> getCreationOrder() { return this.creationOrder; } ZipSource(InputStream inputStream); ZipSource(InputStream inputStream, ImportTransforms importTransform); } | ZipSource implements EntityImportStream { @Override public List<String> getCreationOrder() { return this.creationOrder; } ZipSource(InputStream inputStream); ZipSource(InputStream inputStream, ImportTransforms importTransform); @Override ImportTransforms getImportTransform(); @Override void setImportTransform(ImportTr... | ZipSource implements EntityImportStream { @Override public List<String> getCreationOrder() { return this.creationOrder; } ZipSource(InputStream inputStream); ZipSource(InputStream inputStream, ImportTransforms importTransform); @Override ImportTransforms getImportTransform(); @Override void setImportTransform(ImportTr... |
@Test public void transformEntityWith2Transforms() throws AtlasBaseException { AtlasEntity entity = getHiveTableAtlasEntity(); String attrValue = (String) entity.getAttribute(ATTR_NAME_QUALIFIED_NAME); transform.apply(entity); assertEquals(entity.getAttribute(ATTR_NAME_QUALIFIED_NAME), applyDefaultTransform(attrValue))... | public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (AtlasEntity e : ent... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... |
@Test public void transformEntityWithExtInfo() throws AtlasBaseException { addColumnTransform(transform); AtlasEntityWithExtInfo entityWithExtInfo = getAtlasEntityWithExtInfo(); AtlasEntity entity = entityWithExtInfo.getEntity(); String attrValue = (String) entity.getAttribute(ATTR_NAME_QUALIFIED_NAME); String[] expect... | public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (AtlasEntity e : ent... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... |
@Test public void transformEntityWithExtInfoNullCheck() throws AtlasBaseException { addColumnTransform(transform); AtlasEntityWithExtInfo entityWithExtInfo = getAtlasEntityWithExtInfo(); entityWithExtInfo.setReferredEntities(null); AtlasEntityWithExtInfo transformedEntityWithExtInfo = transform.apply(entityWithExtInfo)... | public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (AtlasEntity e : ent... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... | ImportTransforms { public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException { if (entityWithExtInfo == null) { return entityWithExtInfo; } apply(entityWithExtInfo.getEntity()); if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) { for (... |
@Test public void importServiceProcessesIOException() { ImportService importService = new ImportService(typeDefStore, typeRegistry, null,null, null,null); AtlasImportRequest req = mock(AtlasImportRequest.class); Answer<Map> answer = invocationOnMock -> { throw new IOException("file is read only"); }; when(req.getFileNa... | public AtlasImportResult run(InputStream inputStream, String userName, String hostName, String requestingIP) throws AtlasBaseException { return run(inputStream, null, userName, hostName, requestingIP); } | ImportService { public AtlasImportResult run(InputStream inputStream, String userName, String hostName, String requestingIP) throws AtlasBaseException { return run(inputStream, null, userName, hostName, requestingIP); } } | ImportService { public AtlasImportResult run(InputStream inputStream, String userName, String hostName, String requestingIP) throws AtlasBaseException { return run(inputStream, null, userName, hostName, requestingIP); } @Inject ImportService(AtlasTypeDefStore typeDefStore, AtlasTypeRegistry typeRegistry, BulkImporter ... | ImportService { public AtlasImportResult run(InputStream inputStream, String userName, String hostName, String requestingIP) throws AtlasBaseException { return run(inputStream, null, userName, hostName, requestingIP); } @Inject ImportService(AtlasTypeDefStore typeDefStore, AtlasTypeRegistry typeRegistry, BulkImporter ... | ImportService { public AtlasImportResult run(InputStream inputStream, String userName, String hostName, String requestingIP) throws AtlasBaseException { return run(inputStream, null, userName, hostName, requestingIP); } @Inject ImportService(AtlasTypeDefStore typeDefStore, AtlasTypeRegistry typeRegistry, BulkImporter ... |
@Test(dataProvider = "salesNewTypeAttrs-next") public void transformUpdatesForSubTypes(InputStream inputStream) throws IOException, AtlasBaseException { loadBaseModel(); loadHiveModel(); String transformJSON = "{ \"Asset\": { \"qualifiedName\":[ \"lowercase\", \"replace:@cl1:@cl2\" ] } }"; ZipSource zipSource = new Zip... | @VisibleForTesting void setImportTransform(EntityImportStream source, String transforms) throws AtlasBaseException { ImportTransforms importTransform = ImportTransforms.fromJson(transforms); if (importTransform == null) { return; } importTransformsShaper.shape(importTransform, source.getExportResult().getRequest()); so... | ImportService { @VisibleForTesting void setImportTransform(EntityImportStream source, String transforms) throws AtlasBaseException { ImportTransforms importTransform = ImportTransforms.fromJson(transforms); if (importTransform == null) { return; } importTransformsShaper.shape(importTransform, source.getExportResult().g... | ImportService { @VisibleForTesting void setImportTransform(EntityImportStream source, String transforms) throws AtlasBaseException { ImportTransforms importTransform = ImportTransforms.fromJson(transforms); if (importTransform == null) { return; } importTransformsShaper.shape(importTransform, source.getExportResult().g... | ImportService { @VisibleForTesting void setImportTransform(EntityImportStream source, String transforms) throws AtlasBaseException { ImportTransforms importTransform = ImportTransforms.fromJson(transforms); if (importTransform == null) { return; } importTransformsShaper.shape(importTransform, source.getExportResult().g... | ImportService { @VisibleForTesting void setImportTransform(EntityImportStream source, String transforms) throws AtlasBaseException { ImportTransforms importTransform = ImportTransforms.fromJson(transforms); if (importTransform == null) { return; } importTransformsShaper.shape(importTransform, source.getExportResult().g... |
@Test(dataProvider = "salesNewTypeAttrs-next") public void transformUpdatesForSubTypesAddsToExistingTransforms(InputStream inputStream) throws IOException, AtlasBaseException { loadBaseModel(); loadHiveModel(); String transformJSON = "{ \"Asset\": { \"qualifiedName\":[ \"replace:@cl1:@cl2\" ] }, \"hive_table\": { \"qua... | @VisibleForTesting void setImportTransform(EntityImportStream source, String transforms) throws AtlasBaseException { ImportTransforms importTransform = ImportTransforms.fromJson(transforms); if (importTransform == null) { return; } importTransformsShaper.shape(importTransform, source.getExportResult().getRequest()); so... | ImportService { @VisibleForTesting void setImportTransform(EntityImportStream source, String transforms) throws AtlasBaseException { ImportTransforms importTransform = ImportTransforms.fromJson(transforms); if (importTransform == null) { return; } importTransformsShaper.shape(importTransform, source.getExportResult().g... | ImportService { @VisibleForTesting void setImportTransform(EntityImportStream source, String transforms) throws AtlasBaseException { ImportTransforms importTransform = ImportTransforms.fromJson(transforms); if (importTransform == null) { return; } importTransformsShaper.shape(importTransform, source.getExportResult().g... | ImportService { @VisibleForTesting void setImportTransform(EntityImportStream source, String transforms) throws AtlasBaseException { ImportTransforms importTransform = ImportTransforms.fromJson(transforms); if (importTransform == null) { return; } importTransformsShaper.shape(importTransform, source.getExportResult().g... | ImportService { @VisibleForTesting void setImportTransform(EntityImportStream source, String transforms) throws AtlasBaseException { ImportTransforms importTransform = ImportTransforms.fromJson(transforms); if (importTransform == null) { return; } importTransformsShaper.shape(importTransform, source.getExportResult().g... |
@Test public void testCheckHiveTableIncrementalSkipLineage() { AtlasImportRequest importRequest; AtlasExportRequest exportRequest; importRequest = getImportRequest("cl1"); exportRequest = getExportRequest(FETCH_TYPE_INCREMENTAL, "cl2", true, getItemsToExport("hive_table", "hive_table")); assertTrue(importService.checkH... | @VisibleForTesting boolean checkHiveTableIncrementalSkipLineage(AtlasImportRequest importRequest, AtlasExportRequest exportRequest) { if (exportRequest == null || CollectionUtils.isEmpty(exportRequest.getItemsToExport())) { return false; } for (AtlasObjectId itemToExport : exportRequest.getItemsToExport()) { if (!itemT... | ImportService { @VisibleForTesting boolean checkHiveTableIncrementalSkipLineage(AtlasImportRequest importRequest, AtlasExportRequest exportRequest) { if (exportRequest == null || CollectionUtils.isEmpty(exportRequest.getItemsToExport())) { return false; } for (AtlasObjectId itemToExport : exportRequest.getItemsToExport... | ImportService { @VisibleForTesting boolean checkHiveTableIncrementalSkipLineage(AtlasImportRequest importRequest, AtlasExportRequest exportRequest) { if (exportRequest == null || CollectionUtils.isEmpty(exportRequest.getItemsToExport())) { return false; } for (AtlasObjectId itemToExport : exportRequest.getItemsToExport... | ImportService { @VisibleForTesting boolean checkHiveTableIncrementalSkipLineage(AtlasImportRequest importRequest, AtlasExportRequest exportRequest) { if (exportRequest == null || CollectionUtils.isEmpty(exportRequest.getItemsToExport())) { return false; } for (AtlasObjectId itemToExport : exportRequest.getItemsToExport... | ImportService { @VisibleForTesting boolean checkHiveTableIncrementalSkipLineage(AtlasImportRequest importRequest, AtlasExportRequest exportRequest) { if (exportRequest == null || CollectionUtils.isEmpty(exportRequest.getItemsToExport())) { return false; } for (AtlasObjectId itemToExport : exportRequest.getItemsToExport... |
@Test public void fetchTypeGuid() { String exportRequestJson = "{ \"itemsToExport\": [ { \"typeName\": \"hive_db\", \"guid\": \"111-222-333\" } ]}"; AtlasExportRequest exportRequest = AtlasType.fromJson(exportRequestJson, AtlasExportRequest.class); List<AtlasObjectId> objectGuidMap = startEntityFetchByExportRequestSpy.... | public List<AtlasObjectId> get(AtlasExportRequest exportRequest) { List<AtlasObjectId> list = new ArrayList<>(); for(AtlasObjectId objectId : exportRequest.getItemsToExport()) { List<String> guids = get(exportRequest, objectId); if (guids.isEmpty()) { continue; } objectId.setGuid(guids.get(0)); list.add(objectId); } re... | StartEntityFetchByExportRequest { public List<AtlasObjectId> get(AtlasExportRequest exportRequest) { List<AtlasObjectId> list = new ArrayList<>(); for(AtlasObjectId objectId : exportRequest.getItemsToExport()) { List<String> guids = get(exportRequest, objectId); if (guids.isEmpty()) { continue; } objectId.setGuid(guids... | StartEntityFetchByExportRequest { public List<AtlasObjectId> get(AtlasExportRequest exportRequest) { List<AtlasObjectId> list = new ArrayList<>(); for(AtlasObjectId objectId : exportRequest.getItemsToExport()) { List<String> guids = get(exportRequest, objectId); if (guids.isEmpty()) { continue; } objectId.setGuid(guids... | StartEntityFetchByExportRequest { public List<AtlasObjectId> get(AtlasExportRequest exportRequest) { List<AtlasObjectId> list = new ArrayList<>(); for(AtlasObjectId objectId : exportRequest.getItemsToExport()) { List<String> guids = get(exportRequest, objectId); if (guids.isEmpty()) { continue; } objectId.setGuid(guids... | StartEntityFetchByExportRequest { public List<AtlasObjectId> get(AtlasExportRequest exportRequest) { List<AtlasObjectId> list = new ArrayList<>(); for(AtlasObjectId objectId : exportRequest.getItemsToExport()) { List<String> guids = get(exportRequest, objectId); if (guids.isEmpty()) { continue; } objectId.setGuid(guids... |
@Test public void createWithCorrectParameters() throws AtlasBaseException, IllegalAccessException { String param1 = "@cl1"; String param2 = "@cl2"; ImportTransformer e = ImportTransformer.getTransformer(String.format("%s:%s:%s", "replace", param1, param2)); assertTrue(e instanceof ImportTransformer.Replace); assertEqua... | public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if (StringUtils.isEmpty... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... |
@Test public void testStructTypeDefaultValue() { AtlasStruct defValue = structType.createDefaultValue(); assertNotNull(defValue); assertEquals(defValue.getTypeName(), structType.getTypeName()); } | @Override public AtlasStruct createDefaultValue() { AtlasStruct ret = new AtlasStruct(structDef.getName()); populateDefaultValues(ret); return ret; } | AtlasStructType extends AtlasType { @Override public AtlasStruct createDefaultValue() { AtlasStruct ret = new AtlasStruct(structDef.getName()); populateDefaultValues(ret); return ret; } } | AtlasStructType extends AtlasType { @Override public AtlasStruct createDefaultValue() { AtlasStruct ret = new AtlasStruct(structDef.getName()); populateDefaultValues(ret); return ret; } AtlasStructType(AtlasStructDef structDef); AtlasStructType(AtlasStructDef structDef, AtlasTypeRegistry typeRegistry); } | AtlasStructType extends AtlasType { @Override public AtlasStruct createDefaultValue() { AtlasStruct ret = new AtlasStruct(structDef.getName()); populateDefaultValues(ret); return ret; } AtlasStructType(AtlasStructDef structDef); AtlasStructType(AtlasStructDef structDef, AtlasTypeRegistry typeRegistry); AtlasStructDef ... | AtlasStructType extends AtlasType { @Override public AtlasStruct createDefaultValue() { AtlasStruct ret = new AtlasStruct(structDef.getName()); populateDefaultValues(ret); return ret; } AtlasStructType(AtlasStructDef structDef); AtlasStructType(AtlasStructDef structDef, AtlasTypeRegistry typeRegistry); AtlasStructDef ... |
@Test public void createSeveralWithCorrectParameters() throws AtlasBaseException, IllegalAccessException { String param1 = "@cl1"; String param2 = "@cl2"; ImportTransformer e1 = ImportTransformer.getTransformer(String.format("%s:%s:%s", "replace", param1, param2)); ImportTransformer e2 = ImportTransformer.getTransforme... | public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if (StringUtils.isEmpty... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... |
@Test public void createWithDefaultParameters() throws AtlasBaseException { ImportTransformer e1 = ImportTransformer.getTransformer("replace:@cl1"); ImportTransformer e2 = ImportTransformer.getTransformer("replace"); assertTrue(e1 instanceof ImportTransformer.Replace); assertEquals(((ImportTransformer.Replace)e1).getTo... | public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if (StringUtils.isEmpty... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... | ImportTransformer { public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException { String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR); String key = (params == null || params.length < 1) ? transformerSpec : params[0]; final ImportTransformer ret; if ... |
@Test public void checkStoringMultipleAuditEntries() throws AtlasBaseException, InterruptedException { final String clientId = "client1"; final int MAX_ENTRIES = 5; final int LIMIT_PARAM = 3; for (int i = 0; i < MAX_ENTRIES; i++) { saveEntry(AuditOperation.PURGE, clientId); } waitForIndexCreation(); AuditSearchParamete... | public AtlasAuditEntry get(AtlasAuditEntry entry) throws AtlasBaseException { if(entry.getGuid() == null) { throw new AtlasBaseException("Entity does not have GUID set. load cannot proceed."); } return dataAccess.load(entry); } | AtlasAuditService { public AtlasAuditEntry get(AtlasAuditEntry entry) throws AtlasBaseException { if(entry.getGuid() == null) { throw new AtlasBaseException("Entity does not have GUID set. load cannot proceed."); } return dataAccess.load(entry); } } | AtlasAuditService { public AtlasAuditEntry get(AtlasAuditEntry entry) throws AtlasBaseException { if(entry.getGuid() == null) { throw new AtlasBaseException("Entity does not have GUID set. load cannot proceed."); } return dataAccess.load(entry); } @Inject AtlasAuditService(DataAccess dataAccess, AtlasDiscoveryService ... | AtlasAuditService { public AtlasAuditEntry get(AtlasAuditEntry entry) throws AtlasBaseException { if(entry.getGuid() == null) { throw new AtlasBaseException("Entity does not have GUID set. load cannot proceed."); } return dataAccess.load(entry); } @Inject AtlasAuditService(DataAccess dataAccess, AtlasDiscoveryService ... | AtlasAuditService { public AtlasAuditEntry get(AtlasAuditEntry entry) throws AtlasBaseException { if(entry.getGuid() == null) { throw new AtlasBaseException("Entity does not have GUID set. load cannot proceed."); } return dataAccess.load(entry); } @Inject AtlasAuditService(DataAccess dataAccess, AtlasDiscoveryService ... |
@Test(groups = "Glossary.CREATE") public void testCreateGlossary() { try { AtlasGlossary created = glossaryService.createGlossary(bankGlossary); bankGlossary.setGuid(created.getGuid()); created = glossaryService.createGlossary(creditUnionGlossary); creditUnionGlossary.setGuid(created.getGuid()); } catch (AtlasBaseExcep... | @GraphTransaction public AtlasGlossary createGlossary(AtlasGlossary atlasGlossary) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.createGlossary({})", atlasGlossary); } if (Objects.isNull(atlasGlossary)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "Glossary definition mis... | GlossaryService { @GraphTransaction public AtlasGlossary createGlossary(AtlasGlossary atlasGlossary) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.createGlossary({})", atlasGlossary); } if (Objects.isNull(atlasGlossary)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "Gloss... | GlossaryService { @GraphTransaction public AtlasGlossary createGlossary(AtlasGlossary atlasGlossary) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.createGlossary({})", atlasGlossary); } if (Objects.isNull(atlasGlossary)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "Gloss... | GlossaryService { @GraphTransaction public AtlasGlossary createGlossary(AtlasGlossary atlasGlossary) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.createGlossary({})", atlasGlossary); } if (Objects.isNull(atlasGlossary)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "Gloss... | GlossaryService { @GraphTransaction public AtlasGlossary createGlossary(AtlasGlossary atlasGlossary) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.createGlossary({})", atlasGlossary); } if (Objects.isNull(atlasGlossary)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "Gloss... |
@Test(groups = "Glossary.CREATE" , dependsOnMethods = "testCategoryCreation") public void testTermCreationWithoutAnyRelations() { try { checkingAccount = glossaryService.createTerm(checkingAccount); assertNotNull(checkingAccount); assertNotNull(checkingAccount.getGuid()); } catch (AtlasBaseException e) { fail("Term cre... | @GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "GlossaryTerm definition missin... | GlossaryService { @GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "GlossaryTerm... | GlossaryService { @GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "GlossaryTerm... | GlossaryService { @GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "GlossaryTerm... | GlossaryService { @GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "GlossaryTerm... |
@Test(groups = "Glossary.CREATE" , dependsOnMethods = "testTermCreationWithoutAnyRelations") public void testTermCreateWithRelation() { try { AtlasRelatedTermHeader relatedTermHeader = new AtlasRelatedTermHeader(); relatedTermHeader.setTermGuid(checkingAccount.getGuid()); relatedTermHeader.setDescription("test descript... | @GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "GlossaryTerm definition missin... | GlossaryService { @GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "GlossaryTerm... | GlossaryService { @GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "GlossaryTerm... | GlossaryService { @GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "GlossaryTerm... | GlossaryService { @GraphTransaction public AtlasGlossaryTerm createTerm(AtlasGlossaryTerm glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "GlossaryTerm... |
@Test(groups = "Glossary.CREATE" , dependsOnMethods = "testCategoryCreation") public void testTermCreationWithCategory() { try { AtlasTermCategorizationHeader termCategorizationHeader = new AtlasTermCategorizationHeader(); termCategorizationHeader.setCategoryGuid(mortgageCategory.getGuid()); termCategorizationHeader.se... | @GraphTransaction public List<AtlasGlossaryTerm> createTerms(List<AtlasGlossaryTerm> glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryTerm(s) i... | GlossaryService { @GraphTransaction public List<AtlasGlossaryTerm> createTerms(List<AtlasGlossaryTerm> glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, ... | GlossaryService { @GraphTransaction public List<AtlasGlossaryTerm> createTerms(List<AtlasGlossaryTerm> glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, ... | GlossaryService { @GraphTransaction public List<AtlasGlossaryTerm> createTerms(List<AtlasGlossaryTerm> glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, ... | GlossaryService { @GraphTransaction public List<AtlasGlossaryTerm> createTerms(List<AtlasGlossaryTerm> glossaryTerm) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.create({})", glossaryTerm); } if (Objects.isNull(glossaryTerm)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, ... |
@Test(dataProvider = "getAllGlossaryDataProvider", groups = "Glossary.GET", dependsOnGroups = "Glossary.CREATE") public void testGetAllGlossaries(int limit, int offset, SortOrder sortOrder, int expected) { try { List<AtlasGlossary> glossaries = glossaryService.getGlossaries(limit, offset, sortOrder); assertEquals(gloss... | @GraphTransaction public List<AtlasGlossary> getGlossaries(int limit, int offset, SortOrder sortOrder) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.getGlossaries({}, {}, {})", limit, offset, sortOrder); } List<String> glossaryGuids = AtlasGraphUtilsV2.findEntityGUIDsByType(GlossaryUti... | GlossaryService { @GraphTransaction public List<AtlasGlossary> getGlossaries(int limit, int offset, SortOrder sortOrder) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.getGlossaries({}, {}, {})", limit, offset, sortOrder); } List<String> glossaryGuids = AtlasGraphUtilsV2.findEntityGUIDs... | GlossaryService { @GraphTransaction public List<AtlasGlossary> getGlossaries(int limit, int offset, SortOrder sortOrder) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.getGlossaries({}, {}, {})", limit, offset, sortOrder); } List<String> glossaryGuids = AtlasGraphUtilsV2.findEntityGUIDs... | GlossaryService { @GraphTransaction public List<AtlasGlossary> getGlossaries(int limit, int offset, SortOrder sortOrder) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.getGlossaries({}, {}, {})", limit, offset, sortOrder); } List<String> glossaryGuids = AtlasGraphUtilsV2.findEntityGUIDs... | GlossaryService { @GraphTransaction public List<AtlasGlossary> getGlossaries(int limit, int offset, SortOrder sortOrder) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.getGlossaries({}, {}, {})", limit, offset, sortOrder); } List<String> glossaryGuids = AtlasGraphUtilsV2.findEntityGUIDs... |
@Test(groups = "Glossary.UPDATE", dependsOnGroups = "Glossary.CREATE") public void testUpdateGlossary() { try { bankGlossary = glossaryService.getGlossary(bankGlossary.getGuid()); bankGlossary.setShortDescription("Updated short description"); bankGlossary.setLongDescription("Updated long description"); AtlasGlossary up... | @GraphTransaction public AtlasGlossary updateGlossary(AtlasGlossary atlasGlossary) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.updateGlossary({})", atlasGlossary); } if (Objects.isNull(atlasGlossary)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "Glossary is null/empty"... | GlossaryService { @GraphTransaction public AtlasGlossary updateGlossary(AtlasGlossary atlasGlossary) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.updateGlossary({})", atlasGlossary); } if (Objects.isNull(atlasGlossary)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "Gloss... | GlossaryService { @GraphTransaction public AtlasGlossary updateGlossary(AtlasGlossary atlasGlossary) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.updateGlossary({})", atlasGlossary); } if (Objects.isNull(atlasGlossary)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "Gloss... | GlossaryService { @GraphTransaction public AtlasGlossary updateGlossary(AtlasGlossary atlasGlossary) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.updateGlossary({})", atlasGlossary); } if (Objects.isNull(atlasGlossary)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "Gloss... | GlossaryService { @GraphTransaction public AtlasGlossary updateGlossary(AtlasGlossary atlasGlossary) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.updateGlossary({})", atlasGlossary); } if (Objects.isNull(atlasGlossary)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "Gloss... |
@Test(dependsOnMethods = "testInvalidFetches") public void testDeleteGlossary() { try { glossaryService.deleteGlossary(bankGlossary.getGuid()); try { glossaryService.getGlossary(bankGlossary.getGuid()); } catch (AtlasBaseException e) { assertEquals(e.getAtlasErrorCode(), AtlasErrorCode.INSTANCE_GUID_NOT_FOUND); } try {... | @GraphTransaction public void deleteGlossary(String glossaryGuid) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.deleteGlossary({})", glossaryGuid); } if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/empty"); } AtlasGloss... | GlossaryService { @GraphTransaction public void deleteGlossary(String glossaryGuid) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.deleteGlossary({})", glossaryGuid); } if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/emp... | GlossaryService { @GraphTransaction public void deleteGlossary(String glossaryGuid) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.deleteGlossary({})", glossaryGuid); } if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/emp... | GlossaryService { @GraphTransaction public void deleteGlossary(String glossaryGuid) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.deleteGlossary({})", glossaryGuid); } if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/emp... | GlossaryService { @GraphTransaction public void deleteGlossary(String glossaryGuid) throws AtlasBaseException { if (DEBUG_ENABLED) { LOG.debug("==> GlossaryService.deleteGlossary({})", glossaryGuid); } if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/emp... |
@Test public void testStructTypeIsValidValue() { for (Object value : validValues) { assertTrue(structType.isValidValue(value), "value=" + value); } for (Object value : invalidValues) { assertFalse(structType.isValidValue(value), "value=" + value); } } | @Override public boolean isValidValue(Object obj) { if (obj != null) { if (obj instanceof AtlasStruct) { AtlasStruct structObj = (AtlasStruct) obj; for (AtlasAttributeDef attributeDef : structDef.getAttributeDefs()) { if (!isAssignableValue(structObj.getAttribute(attributeDef.getName()), attributeDef)) { return false; ... | AtlasStructType extends AtlasType { @Override public boolean isValidValue(Object obj) { if (obj != null) { if (obj instanceof AtlasStruct) { AtlasStruct structObj = (AtlasStruct) obj; for (AtlasAttributeDef attributeDef : structDef.getAttributeDefs()) { if (!isAssignableValue(structObj.getAttribute(attributeDef.getName... | AtlasStructType extends AtlasType { @Override public boolean isValidValue(Object obj) { if (obj != null) { if (obj instanceof AtlasStruct) { AtlasStruct structObj = (AtlasStruct) obj; for (AtlasAttributeDef attributeDef : structDef.getAttributeDefs()) { if (!isAssignableValue(structObj.getAttribute(attributeDef.getName... | AtlasStructType extends AtlasType { @Override public boolean isValidValue(Object obj) { if (obj != null) { if (obj instanceof AtlasStruct) { AtlasStruct structObj = (AtlasStruct) obj; for (AtlasAttributeDef attributeDef : structDef.getAttributeDefs()) { if (!isAssignableValue(structObj.getAttribute(attributeDef.getName... | AtlasStructType extends AtlasType { @Override public boolean isValidValue(Object obj) { if (obj != null) { if (obj instanceof AtlasStruct) { AtlasStruct structObj = (AtlasStruct) obj; for (AtlasAttributeDef attributeDef : structDef.getAttributeDefs()) { if (!isAssignableValue(structObj.getAttribute(attributeDef.getName... |
@Test(dataProvider = "getGlossaryTermsProvider" , groups = "Glossary.GET.postUpdate", dependsOnGroups = "Glossary.UPDATE") public void testGetGlossaryTerms(int offset, int limit, int expected) { String guid = bankGlossary.getGuid(); SortOrder sortOrder = SortOrder.ASCENDING; try { List<AtlasRelatedTermHeader> glossaryT... | @GraphTransaction public List<AtlasGlossaryTerm> getGlossaryTerms(String glossaryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/empty"); } if (DEBUG_ENABLED) { LOG.debug("==>... | GlossaryService { @GraphTransaction public List<AtlasGlossaryTerm> getGlossaryTerms(String glossaryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/empty"); } if (DEBUG_ENABLED... | GlossaryService { @GraphTransaction public List<AtlasGlossaryTerm> getGlossaryTerms(String glossaryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/empty"); } if (DEBUG_ENABLED... | GlossaryService { @GraphTransaction public List<AtlasGlossaryTerm> getGlossaryTerms(String glossaryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/empty"); } if (DEBUG_ENABLED... | GlossaryService { @GraphTransaction public List<AtlasGlossaryTerm> getGlossaryTerms(String glossaryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/empty"); } if (DEBUG_ENABLED... |
@Test(dataProvider = "getGlossaryCategoriesProvider" , groups = "Glossary.GET.postUpdate", dependsOnGroups = "Glossary.UPDATE") public void testGetGlossaryCategories(int offset, int limit, int expected) { String guid = bankGlossary.getGuid(); SortOrder sortOrder = SortOrder.ASCENDING; try { List<AtlasRelatedCategoryHea... | @GraphTransaction public List<AtlasGlossaryCategory> getGlossaryCategories(String glossaryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/empty"); } if (DEBUG_ENABLED) { LOG.d... | GlossaryService { @GraphTransaction public List<AtlasGlossaryCategory> getGlossaryCategories(String glossaryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/empty"); } if (DEBU... | GlossaryService { @GraphTransaction public List<AtlasGlossaryCategory> getGlossaryCategories(String glossaryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/empty"); } if (DEBU... | GlossaryService { @GraphTransaction public List<AtlasGlossaryCategory> getGlossaryCategories(String glossaryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/empty"); } if (DEBU... | GlossaryService { @GraphTransaction public List<AtlasGlossaryCategory> getGlossaryCategories(String glossaryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(glossaryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "glossaryGuid is null/empty"); } if (DEBU... |
@Test(dataProvider = "getCategoryTermsProvider", dependsOnGroups = "Glossary.CREATE") public void testGetCategoryTerms(int offset, int limit, int expected) { for (AtlasGlossaryCategory c : Arrays.asList(accountCategory, mortgageCategory)) { try { List<AtlasRelatedTermHeader> categoryTerms = glossaryService.getCategoryT... | @GraphTransaction public List<AtlasRelatedTermHeader> getCategoryTerms(String categoryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(categoryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "categoryGuid is null/empty"); } if (DEBUG_ENABLED) { LOG.debug... | GlossaryService { @GraphTransaction public List<AtlasRelatedTermHeader> getCategoryTerms(String categoryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(categoryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "categoryGuid is null/empty"); } if (DEBUG_EN... | GlossaryService { @GraphTransaction public List<AtlasRelatedTermHeader> getCategoryTerms(String categoryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(categoryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "categoryGuid is null/empty"); } if (DEBUG_EN... | GlossaryService { @GraphTransaction public List<AtlasRelatedTermHeader> getCategoryTerms(String categoryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(categoryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "categoryGuid is null/empty"); } if (DEBUG_EN... | GlossaryService { @GraphTransaction public List<AtlasRelatedTermHeader> getCategoryTerms(String categoryGuid, int offset, int limit, SortOrder sortOrder) throws AtlasBaseException { if (Objects.isNull(categoryGuid)) { throw new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, "categoryGuid is null/empty"); } if (DEBUG_EN... |
@Test( dependsOnGroups = "Glossary.CREATE" ) public void testImportGlossaryData(){ try { InputStream inputStream = getFile(CSV_FILES,"template_1.csv"); List<AtlasGlossaryTerm> atlasGlossaryTermList = glossaryService.importGlossaryData(inputStream,"template_1.csv"); assertNotNull(atlasGlossaryTermList); assertEquals(atl... | public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtils.readFileData(fil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... |
@Test public void testEmptyFileException() { InputStream inputStream = getFile(CSV_FILES, "empty.csv"); try { glossaryService.importGlossaryData(inputStream, "empty.csv"); fail("Error occurred : Failed to recognize the empty file."); } catch (AtlasBaseException e) { assertEquals(e.getMessage(),"No data found in the upl... | public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtils.readFileData(fil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... |
@Test public void testIncorrectFileException() { InputStream inputStream = getFile(CSV_FILES, "incorrectFile.csv"); try { glossaryService.importGlossaryData(inputStream, "incorrectFile.csv"); fail("Error occurred : Failed to recognize the incorrect file."); } catch (AtlasBaseException e) { assertEquals(e.getMessage(),"... | public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtils.readFileData(fil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... | GlossaryService { public List<AtlasGlossaryTerm> importGlossaryData(InputStream inputStream, String fileName) throws AtlasBaseException { List<AtlasGlossaryTerm> ret; try { if (StringUtils.isBlank(fileName)) { throw new AtlasBaseException(AtlasErrorCode.INVALID_FILE_TYPE, fileName); } List<String[]> fileData = FileUtil... |
@Test public void testStructTypeGetNormalizedValue() { assertNull(structType.getNormalizedValue(null), "value=" + null); for (Object value : validValues) { if (value == null) { continue; } Object normalizedValue = structType.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 AtlasStruct) { normalizeAttributeValues((AtlasStruct) obj); ret = obj; } else if (obj instanceof Map) { normalizeAttributeValues((Map) obj); ret = obj; } } } return ret; } | AtlasStructType extends AtlasType { @Override public Object getNormalizedValue(Object obj) { Object ret = null; if (obj != null) { if (isValidValue(obj)) { if (obj instanceof AtlasStruct) { normalizeAttributeValues((AtlasStruct) obj); ret = obj; } else if (obj instanceof Map) { normalizeAttributeValues((Map) obj); ret ... | AtlasStructType extends AtlasType { @Override public Object getNormalizedValue(Object obj) { Object ret = null; if (obj != null) { if (isValidValue(obj)) { if (obj instanceof AtlasStruct) { normalizeAttributeValues((AtlasStruct) obj); ret = obj; } else if (obj instanceof Map) { normalizeAttributeValues((Map) obj); ret ... | AtlasStructType extends AtlasType { @Override public Object getNormalizedValue(Object obj) { Object ret = null; if (obj != null) { if (isValidValue(obj)) { if (obj instanceof AtlasStruct) { normalizeAttributeValues((AtlasStruct) obj); ret = obj; } else if (obj instanceof Map) { normalizeAttributeValues((Map) obj); ret ... | AtlasStructType extends AtlasType { @Override public Object getNormalizedValue(Object obj) { Object ret = null; if (obj != null) { if (isValidValue(obj)) { if (obj instanceof AtlasStruct) { normalizeAttributeValues((AtlasStruct) obj); ret = obj; } else if (obj instanceof Map) { normalizeAttributeValues((Map) obj); ret ... |
@Test public void testImportThatUpdatesRegisteredDatabase() throws Exception { when(hiveClient.getAllDatabases()).thenReturn(Arrays.asList(new String[]{TEST_DB_NAME})); String description = "This is a default database"; Database db = new Database(TEST_DB_NAME, description, "/user/hive/default", null); when(hiveClient.g... | @VisibleForTesting public void importHiveMetadata(String databaseToImport, String tableToImport, boolean failOnError) throws Exception { LOG.info("Importing Hive metadata"); importDatabases(failOnError, databaseToImport, tableToImport); } | HiveMetaStoreBridge { @VisibleForTesting public void importHiveMetadata(String databaseToImport, String tableToImport, boolean failOnError) throws Exception { LOG.info("Importing Hive metadata"); importDatabases(failOnError, databaseToImport, tableToImport); } } | HiveMetaStoreBridge { @VisibleForTesting public void importHiveMetadata(String databaseToImport, String tableToImport, boolean failOnError) throws Exception { LOG.info("Importing Hive metadata"); importDatabases(failOnError, databaseToImport, tableToImport); } HiveMetaStoreBridge(Configuration atlasProperties, HiveConf... | HiveMetaStoreBridge { @VisibleForTesting public void importHiveMetadata(String databaseToImport, String tableToImport, boolean failOnError) throws Exception { LOG.info("Importing Hive metadata"); importDatabases(failOnError, databaseToImport, tableToImport); } HiveMetaStoreBridge(Configuration atlasProperties, HiveConf... | HiveMetaStoreBridge { @VisibleForTesting public void importHiveMetadata(String databaseToImport, String tableToImport, boolean failOnError) throws Exception { LOG.info("Importing Hive metadata"); importDatabases(failOnError, databaseToImport, tableToImport); } HiveMetaStoreBridge(Configuration atlasProperties, HiveConf... |
@Test public void testShouldGetZookeeperAcl() { when(configuration.getString(HAConfiguration.HA_ZOOKEEPER_ACL)).thenReturn("sasl:myclient@EXAMPLE.COM"); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); assertTrue(zookeeperProperties.hasAcl()); } | public static ZookeeperProperties getZookeeperProperties(Configuration configuration) { String[] zkServers; if (configuration.containsKey(HA_ZOOKEEPER_CONNECT)) { zkServers = configuration.getStringArray(HA_ZOOKEEPER_CONNECT); } else { zkServers = configuration.getStringArray("atlas.kafka." + ZOOKEEPER_PREFIX + "connec... | HAConfiguration { public static ZookeeperProperties getZookeeperProperties(Configuration configuration) { String[] zkServers; if (configuration.containsKey(HA_ZOOKEEPER_CONNECT)) { zkServers = configuration.getStringArray(HA_ZOOKEEPER_CONNECT); } else { zkServers = configuration.getStringArray("atlas.kafka." + ZOOKEEPE... | HAConfiguration { public static ZookeeperProperties getZookeeperProperties(Configuration configuration) { String[] zkServers; if (configuration.containsKey(HA_ZOOKEEPER_CONNECT)) { zkServers = configuration.getStringArray(HA_ZOOKEEPER_CONNECT); } else { zkServers = configuration.getStringArray("atlas.kafka." + ZOOKEEPE... | HAConfiguration { public static ZookeeperProperties getZookeeperProperties(Configuration configuration) { String[] zkServers; if (configuration.containsKey(HA_ZOOKEEPER_CONNECT)) { zkServers = configuration.getStringArray(HA_ZOOKEEPER_CONNECT); } else { zkServers = configuration.getStringArray("atlas.kafka." + ZOOKEEPE... | HAConfiguration { public static ZookeeperProperties getZookeeperProperties(Configuration configuration) { String[] zkServers; if (configuration.containsKey(HA_ZOOKEEPER_CONNECT)) { zkServers = configuration.getStringArray(HA_ZOOKEEPER_CONNECT); } else { zkServers = configuration.getStringArray("atlas.kafka." + ZOOKEEPE... |
@Test public void testShouldGetZookeeperAuth() { when(configuration.getString(HAConfiguration.HA_ZOOKEEPER_AUTH)).thenReturn("sasl:myclient@EXAMPLE.COM"); HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration); assertTrue(zookeeperProperties.hasAuth()); } | public static ZookeeperProperties getZookeeperProperties(Configuration configuration) { String[] zkServers; if (configuration.containsKey(HA_ZOOKEEPER_CONNECT)) { zkServers = configuration.getStringArray(HA_ZOOKEEPER_CONNECT); } else { zkServers = configuration.getStringArray("atlas.kafka." + ZOOKEEPER_PREFIX + "connec... | HAConfiguration { public static ZookeeperProperties getZookeeperProperties(Configuration configuration) { String[] zkServers; if (configuration.containsKey(HA_ZOOKEEPER_CONNECT)) { zkServers = configuration.getStringArray(HA_ZOOKEEPER_CONNECT); } else { zkServers = configuration.getStringArray("atlas.kafka." + ZOOKEEPE... | HAConfiguration { public static ZookeeperProperties getZookeeperProperties(Configuration configuration) { String[] zkServers; if (configuration.containsKey(HA_ZOOKEEPER_CONNECT)) { zkServers = configuration.getStringArray(HA_ZOOKEEPER_CONNECT); } else { zkServers = configuration.getStringArray("atlas.kafka." + ZOOKEEPE... | HAConfiguration { public static ZookeeperProperties getZookeeperProperties(Configuration configuration) { String[] zkServers; if (configuration.containsKey(HA_ZOOKEEPER_CONNECT)) { zkServers = configuration.getStringArray(HA_ZOOKEEPER_CONNECT); } else { zkServers = configuration.getStringArray("atlas.kafka." + ZOOKEEPE... | HAConfiguration { public static ZookeeperProperties getZookeeperProperties(Configuration configuration) { String[] zkServers; if (configuration.containsKey(HA_ZOOKEEPER_CONNECT)) { zkServers = configuration.getStringArray(HA_ZOOKEEPER_CONNECT); } else { zkServers = configuration.getStringArray("atlas.kafka." + ZOOKEEPE... |
@Test(dataProvider = "ozonePathProvider") public void testGetPathEntityOzone3Path(OzoneKeyValidator validator) { String scheme = validator.scheme; String ozonePath = scheme + validator.location; PathExtractorContext extractorContext = new PathExtractorContext(METADATA_NAMESPACE); Path path = new Path(ozonePath); AtlasE... | 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 testGetPathEntityHdfsPath() { PathExtractorContext extractorContext = new PathExtractorContext(METADATA_NAMESPACE); Path path = new Path(HDFS_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 testGetPathEntityHdfsPathLowerCase() { PathExtractorContext extractorContext = new PathExtractorContext(METADATA_NAMESPACE, true, null); Path path = new Path(HDFS_PATH); AtlasEntityWithExtInfo entityWithExtInfo = AtlasPathExtractorUtil.getPathEntity(path, extractorContext); AtlasEntity entity = entity... | 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 testGetPathEntityABFSPath() { PathExtractorContext extractorContext = new PathExtractorContext(METADATA_NAMESPACE); Path path = new Path(ABFS_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 testGetPathEntityABFSSPath() { PathExtractorContext extractorContext = new PathExtractorContext(METADATA_NAMESPACE); Path path = new Path(ABFSS_PATH); AtlasEntityWithExtInfo entityWithExtInfo = AtlasPathExtractorUtil.getPathEntity(path, extractorContext); AtlasEntity entity = entityWithExtInfo.getEnti... | 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 testGetPathEntityS3V2Path() { PathExtractorContext extractorContext = new PathExtractorContext(METADATA_NAMESPACE, AWS_S3_ATLAS_MODEL_VERSION_V2); Path path = new Path(S3_PATH); AtlasEntityWithExtInfo entityWithExtInfo = AtlasPathExtractorUtil.getPathEntity(path, extractorContext); AtlasEntity entity ... | 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(); } ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.