id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
35204049_321
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/TermResourceDefinitionTest.java", "identifier": "TermResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetTypeName() {\n ResourceDefinition termDefinition = new TermResourceDefinition();\n assertEquals(termDefinition.getTypeName(), \"Term\");\n }", "class_method_signature": "TermResourceDefinitionTest.testGetTypeName()", "constructor": false, "full_signature...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/definition/TermResourceDefinition.java", "identifier": "TermResourceDefinition", "interfaces": "", "methods": [ { "class_method_signature": "TermResourceDefinition.TermResourceDefinition()", "constructor": true, "ful...
{ "body": "@Override\n public String getTypeName() {\n return \"Term\";\n }", "class_method_signature": "TermResourceDefinition.getTypeName()", "constructor": false, "full_signature": "@Override public String getTypeName()", "identifier": "getTypeName", "invocations": [], "modifiers": "@Overr...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_264
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/VertexWrapperTest.java", "identifier": "VertexWrapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetPropertyKeys() {\n String testType = \"testType\";\n // vertex returns unordered set\n Set<String> propertyKeys = new HashSet<>();\n propertyKeys.add(\"foobar\");\n propertyKeys.add(\"Prefix.foo\");\n propertyKeys.add(\"Prefix.bar\");\...
{ "fields": [ { "declarator": "vertex", "modifier": "private final", "original_string": "private final Vertex vertex;", "type": "Vertex", "var_name": "vertex" }, { "declarator": "vertexType", "modifier": "private final", "original_string": "private final Str...
{ "body": "public Collection<String> getPropertyKeys() {\n Collection<String> propertyKeys = new TreeSet<>(resourceComparator);\n\n for (String p : vertex.getPropertyKeys()) {\n String cleanName = propertyMapper.toCleanName(p, vertexType);\n if (! removedProperties.contains(cleanNa...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_136
{ "fields": [ { "declarator": "graphBackedSearchIndexer", "modifier": "@Inject\n private", "original_string": "@Inject\n private GraphBackedSearchIndexer graphBackedSearchIndexer;", "type": "GraphBackedSearchIndexer", "var_name": "graphBackedSearchIndexer" } ], "file": ...
{ "body": "@Test\n public void verifyFullTextIndex() {\n AtlasGraph graph = TestUtils.getGraph();\n AtlasGraphManagement managementSystem = graph.getManagementSystem();\n try {\n AtlasGraphIndex fullTextIndex = managementSystem.getGraphIndex(Constants.FULLTEXT_INDEX);\n assertTru...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GraphBackedSearchIndexer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GraphBackedSearchIndexer.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "private void rollback(AtlasGraphManagement management) throws IndexException {\n try {\n management.rollback();\n\n recomputeIndexedKeys = true;\n } catch (Exception e) {\n LOG.error(\"Index rollback failed \", e);\n throw new IndexException(\"Index...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_65
{ "fields": [ { "declarator": "ACTIVE_SERVER_ADDRESS = \"http://localhost:21000/\"", "modifier": "public static final", "original_string": "public static final String ACTIVE_SERVER_ADDRESS = \"http://localhost:21000/\";", "type": "String", "var_name": "ACTIVE_SERVER_ADDRESS" }, ...
{ "body": "@Test\n public void testShouldRedirectPOSTRequest() throws IOException, ServletException {\n when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE);\n when(servletRequest.getRequestURI()).thenReturn(\"api/atlas/types\");\n\n ActiveServerFilter activeServerF...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ActiveServerFilter.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ActiveServerFilter.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Override\n public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,\n FilterChain filterChain) throws IOException, ServletException {\n if (isFilteredURI(servletRequest)) {\n LOG.debug(\"Is a filtered URI: {}. Passing request downstr...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_161
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test\n public void testUTFValues() throws Exception {\n Referenceable hrDept = new Referenceable(\"Department\");\n Referenceable john = new Referenceable(\"Person\");\n john.set(\"name\", randomUTF());\n john.set(\"department\", hrDept);\n\n hrDept.set(\"name\", rand...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n @GraphTransaction\n public CreateUpdateEntitiesResult createEntities(ITypedReferenceableInstance... entities) throws RepositoryException,\n EntityExistsException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"adding entities={}\", entities);\n }\n\n t...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_248
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/CollectionRequestTest.java", "identifier": "CollectionRequestTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNoProperties() {\n String query = \"name:foo*\";\n Request request = new CollectionRequest(null, query);\n\n assertEquals(Request.Cardinality.COLLECTION, request.getCardinality());\n assertTrue(request.getQueryProperties().isEmpty());\n assertNu...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/CollectionRequest.java", "identifier": "CollectionRequest", "interfaces": "", "methods": [ { "class_method_signature": "CollectionRequest.CollectionRequest(Map<String, Object> queryProperties, String queryString)", "constr...
{ "body": "@Override\n public Cardinality getCardinality() {\n return Cardinality.COLLECTION;\n }", "class_method_signature": "CollectionRequest.getCardinality()", "constructor": false, "full_signature": "@Override public Cardinality getCardinality()", "identifier": "getCardinality", "invocatio...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_32
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java", "identifier": "TaxonomyServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetTaxonomyTerm() throws Exception {\n String taxonomyName = \"testTaxonomy\";\n String termName = \"testTaxonomy.termName\";\n MetadataService metadataService = createStrictMock(MetadataService.class);\n AtlasTypeDefStore typeDefStore = createStrictMo...
{ "fields": [ { "declarator": "PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\")", "modifier": "private static final", "original_string": "private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\");", "type": "Logger", "var_name": ...
{ "body": "@GET\n @Path(\"{taxonomyName}/terms/{termName}\")\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response getTaxonomyTerm(@Context HttpHeaders headers,\n @Context UriInfo ui,\n @PathParam(\"taxonomyName\") String taxonomyName,\n...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_198
{ "fields": [ { "declarator": "notificationInterface", "modifier": "@Mock\n private", "original_string": "@Mock\n private NotificationInterface notificationInterface;", "type": "NotificationInterface", "var_name": "notificationInterface" }, { "declarator": "failed...
{ "body": "@Test\n public void testFailedMessageIsNotLoggedIfNotANotificationException() throws Exception {\n List<HookNotification.HookNotificationMessage> hookNotificationMessages = new ArrayList<>();\n doThrow(new RuntimeException(\"test message\")).when(notificationInterface)\n .se...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasHook.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasHook.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "...
{ "body": "@VisibleForTesting\n static void notifyEntitiesInternal(List<HookNotification.HookNotificationMessage> messages, int maxRetries,\n NotificationInterface notificationInterface,\n boolean shouldLogFailedMessages, FailedMessagesLog...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_177
{ "fields": [ { "declarator": "service", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebResource service;", "type": "WebResource", "var_name": "service" }, { "declarator": "resourceBuilderMock", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void shouldVerifyServerIsReady() throws AtlasServiceException {\n setupRetryParams();\n\n AtlasClient atlasClient = new AtlasClient(service, configuration);\n\n WebResource.Builder builder = setupBuilder(AtlasClient.API.VERSION, service);\n ClientResponse respo...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasClient.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasClient.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "public Referenceable getEntity(String guid) throws AtlasServiceException {\n JSONObject jsonResponse = callAPIWithBodyAndParams(API.GET_ENTITY, null, guid);\n try {\n String entityInstanceDefinition = jsonResponse.getString(AtlasClient.DEFINITION);\n return InstanceSeria...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_24
{ "fields": [ { "declarator": "notificationInterface", "modifier": "@Mock\n private", "original_string": "@Mock\n private NotificationInterface notificationInterface;", "type": "NotificationInterface", "var_name": "notificationInterface" }, { "declarator": "config...
{ "body": "@Test\n public void testConsumersStartedIfHAIsDisabled() throws Exception {\n when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY, false)).thenReturn(false);\n when(configuration.getInt(NotificationHookConsumer.CONSUMER_THREADS_PROPERTY, 1)).thenReturn(1);\n Li...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(NotificationHookConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(NotificationHookConsumer.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "void startInternal(Configuration configuration, ExecutorService executorService) {\n if (consumers == null) {\n consumers = new ArrayList<>();\n }\n if (executorService != null) {\n executors = executorService;\n }\n if (!HAConfiguration.isHAEnabled(...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_120
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityStoreV1Test.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityStoreV1Test.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Test\n public void testPartialUpdateAttr() throws Exception {\n //Update optional attribute\n\n init();\n\n AtlasEntity dbEntity = new AtlasEntity(TestUtilsV2.DATABASE_TYPE);\n dbEntity.setAttribute(\"name\", RandomStringUtils.randomAlphanumeric(10));\n dbEntity.setAt...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityStoreV1.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityStoreV1.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "private EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate, boolean replaceClassifications) throws AtlasBaseException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"==> createOrUpdate()\");\n }\n\n if (entityStream == null || !entityStrea...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_209
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/notification/MessageVersionTest.java", "identifier": "MessageVersionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEquals() throws Exception {\n MessageVersion version1 = new MessageVersion(\"1.0.0\");\n MessageVersion version2 = new MessageVersion(\"1.0.0\");\n MessageVersion version3 = new MessageVersion(\"2.0.0\");\n MessageVersion version4 = new MessageVersion(...
{ "fields": [ { "declarator": "NO_VERSION = new MessageVersion(\"0\")", "modifier": "public static final", "original_string": "public static final MessageVersion NO_VERSION = new MessageVersion(\"0\");", "type": "MessageVersion", "var_name": "NO_VERSION" }, { "declarato...
{ "body": "@Override\n public boolean equals(Object that) {\n if (this == that){\n return true;\n }\n\n if (that == null || getClass() != that.getClass()) {\n return false;\n }\n\n return compareTo((MessageVersion) that) == 0;\n }", "class_method_signat...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_73
{ "fields": [ { "declarator": "EXPECTED_MESSAGE = \"Missing Required Header for CSRF Vulnerability Protection\"", "modifier": "private static final", "original_string": "private static final String EXPECTED_MESSAGE = \"Missing Required Header for CSRF Vulnerability Protection\";", "type": ...
{ "body": "@Test\n\tpublic void testMissingHeaderWithCustomHeaderConfig_badRequest() throws ServletException, IOException {\n\t\t// CSRF has not been sent\n\t\tHttpServletRequest mockReq = Mockito.mock(HttpServletRequest.class);\n\t\tMockito.when(mockReq.getHeader(X_CUSTOM_HEADER)).thenReturn(null);\n\t\tMockito.when...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasCSRFPreventionFilter.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasCSRFPreventionFilter.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n final HttpServletRequest httpRequest = (HttpServletRequest) request;\n final HttpServletResponse httpResponse = (HttpServletResponse) response;\n AtlasResp...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_291
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetResources() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<Request> re...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Override\n public Result getResources(Request request) throws InvalidQueryException, ResourceNotFoundException {\n synchronized (TaxonomyResourceProvider.class) {\n createDefaultTaxonomyIfNeeded();\n }\n return doGetResources(request);\n }", "class_method_signature"...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_157
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test(expectedExceptions = EntityNotFoundException.class)\n public void testDeleteTraitForNonExistentEntity() throws Exception {\n repositoryService.deleteTrait(UUID.randomUUID().toString(), TestUtils.PII);\n Assert.fail();\n }", "class_method_signature": "GraphBackedMetadataRepositor...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n @GraphTransaction\n public void deleteTrait(String guid, String traitNameToBeDeleted) throws TraitNotFoundException, EntityNotFoundException, RepositoryException {\n LOG.debug(\"Deleting trait={} from entity={}\", traitNameToBeDeleted, guid);\n GraphTransactionInterceptor.lo...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_229
{ "fields": [ { "declarator": "CLASSTYPE_CUSTOMER = \"Customer\"", "modifier": "private", "original_string": "private String CLASSTYPE_CUSTOMER = \"Customer\";", "type": "String", "var_name": "CLASSTYPE_CUSTOMER" }, { "declarator": "STRUCTTYPE_ADDRESS = \"Address\"", ...
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testCacheHasTypeWithNullCategory() throws Exception {\n\n cache.has(null, CLASSTYPE_CUSTOMER);\n fail(\"Null TypeCategory should be not allowed in 'has'\");\n }", "class_method_signature": "DefaultTypeCacheTest.t...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DefaultTypeCache.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DefaultTypeCache.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "@Override\n public boolean has(String typeName) throws AtlasException {\n\n return types_.containsKey(typeName);\n }", "class_method_signature": "DefaultTypeCache.has(String typeName)", "constructor": false, "full_signature": "@Override public boolean has(String typeName)", "identifier...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_53
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/service/AtlasZookeeperSecurityPropertiesTest.java", "identifier": "AtlasZookeeperSecurityPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldReturnDefaultAclIfNullOrEmpty() {\n ACL acl = AtlasZookeeperSecurityProperties.parseAcl(null, ZooDefs.Ids.OPEN_ACL_UNSAFE.get(0));\n assertEquals(acl, ZooDefs.Ids.OPEN_ACL_UNSAFE.get(0));\n }", "class_method_signature": "AtlasZookeeperSecurityPropertiesTest.s...
{ "fields": [], "file": "webapp/src/main/java/org/apache/atlas/web/service/AtlasZookeeperSecurityProperties.java", "identifier": "AtlasZookeeperSecurityProperties", "interfaces": "", "methods": [ { "class_method_signature": "AtlasZookeeperSecurityProperties.parseAcl(String aclString, ACL defaultAcl)...
{ "body": "public static ACL parseAcl(String aclString, ACL defaultAcl) {\n if (StringUtils.isEmpty(aclString)) {\n return defaultAcl;\n }\n return parseAcl(aclString);\n }", "class_method_signature": "AtlasZookeeperSecurityProperties.parseAcl(String aclString, ACL defaultAcl)", ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_100
{ "fields": [ { "declarator": "discoveryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private DiscoveryService discoveryService;", "type": "DiscoveryService", "var_name": "discoveryService" }, { "declarator": "lineageService", "mod...
{ "body": "@Test(enabled = false)\n public void testGetSchemaInvalidArguments(final String tableName, String expectedException) throws Exception {\n testInvalidArguments(expectedException, new Invoker() {\n @Override\n void run() throws AtlasException {\n lineageService....
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DataSetLineageService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DataSetLineageService.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Override\n @GraphTransaction\n public String getSchema(String datasetName) throws AtlasException {\n datasetName = ParamChecker.notEmpty(datasetName, \"table name\");\n LOG.info(\"Fetching schema for tableName={}\", datasetName);\n TypeUtils.Pair<String, String> typeIdPair = val...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_45
{ "fields": [ { "declarator": "configuration", "modifier": "@Mock\n private", "original_string": "@Mock\n private Configuration configuration;", "type": "Configuration", "var_name": "configuration" }, { "declarator": "curatorFactory", "modifier": "@Mock\n ...
{ "body": "@Test\n public void testNoActionOnStopIfHAModeIsDisabled() {\n\n when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY, false)).thenReturn(false);\n\n ActiveInstanceElectorService activeInstanceElectorService =\n new ActiveInstanceElectorService(configura...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ActiveInstanceElectorService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ActiveInstanceElectorService.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public void stop() {\n if (!HAConfiguration.isHAEnabled(configuration)) {\n LOG.info(\"HA is not enabled, no need to stop leader election service\");\n return;\n }\n try {\n leaderLatch.close();\n curatorFactory.close();\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_116
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityStoreV1Test.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityStoreV1Test.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Test(dependsOnMethods = \"testCreate\")\n public void testClassUpdate() throws Exception {\n\n init();\n //Create new db instance\n final AtlasEntity databaseInstance = TestUtilsV2.createDBEntity();\n\n EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEn...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityStoreV1.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityStoreV1.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "private EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate, boolean replaceClassifications) throws AtlasBaseException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"==> createOrUpdate()\");\n }\n\n if (entityStream == null || !entityStrea...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_287
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetResourceById() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<Request>...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Override\n public Result getResourceById(Request request) throws ResourceNotFoundException {\n synchronized (TaxonomyResourceProvider.class) {\n createDefaultTaxonomyIfNeeded();\n }\n return doGetResourceById(request);\n }", "class_method_signature": "TaxonomyResour...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_268
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TermResourceProviderTest.java", "identifier": "TermResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetResourceById() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<Request>...
{ "fields": [ { "declarator": "taxonomyResourceProvider", "modifier": "private", "original_string": "private ResourceProvider taxonomyResourceProvider;", "type": "ResourceProvider", "var_name": "taxonomyResourceProvider" }, { "declarator": "entityResourceProvider", ...
{ "body": "@Override\n public Result getResourceById(Request request) throws ResourceNotFoundException {\n //todo: shouldn't need to add this here\n request.getQueryProperties().put(\"name\", request.<TermPath>getProperty(\"termPath\").getFullyQualifiedName());\n AtlasQuery atlasQuery;\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_12
{ "fields": [ { "declarator": "intArrayType = new AtlasArrayType(new AtlasIntType())", "modifier": "private final", "original_string": "private final AtlasArrayType intArrayType = new AtlasArrayType(new AtlasIntType());", "type": "AtlasArrayType", "var_name": "intArrayType" }, ...
{ "body": "@Test\n public void testArrayTypeGetNormalizedValue() {\n assertNull(intArrayType.getNormalizedValue(null), \"value=\" + null);\n\n for (Object value : validValues) {\n if (value == null) {\n continue;\n }\n\n Collection normalizedValue = int...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasArrayType.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasArrayType.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "@Override\n public Collection<?> getNormalizedValue(Object obj) {\n if (obj == null) {\n return null;\n }\n\n if (obj instanceof String){\n obj = AtlasType.fromJson(obj.toString(), List.class);\n }\n\n if (obj instanceof List || obj instanceof Se...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_141
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test\n public void testCreateEntityWithThreeNestingLevels() throws AtlasException {\n\n List<Referenceable> toVerify = new ArrayList<>();\n\n Referenceable dept = new Referenceable(TestUtils.DEPARTMENT_TYPE);\n toVerify.add(dept);\n dept.set(TestUtils.NAME, \"test3\");\n\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n @GraphTransaction\n public CreateUpdateEntitiesResult createEntities(ITypedReferenceableInstance... entities) throws RepositoryException,\n EntityExistsException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"adding entities={}\", entities);\n }\n\n t...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_213
{ "fields": [ { "declarator": "TEST_DATE_IN_LONG = 1418265358440L", "modifier": "public static final", "original_string": "public static final long TEST_DATE_IN_LONG = 1418265358440L;", "type": "long", "var_name": "TEST_DATE_IN_LONG" }, { "declarator": "TEST_DATE_STRING...
{ "body": "@Test\n public void testGetTypeNames() throws Exception {\n getTypeSystem().defineEnumType(\"enum_test\", new EnumValue(\"0\", 0), new EnumValue(\"1\", 1), new EnumValue(\"2\", 2),\n new EnumValue(\"3\", 3));\n assertTrue(getTypeSystem().getTypeNames().contains(\"enum_test\"...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(TypeSystem.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(TypeSystem.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "public ImmutableList<String> getTypeNames() throws AtlasException {\n List<String> typeNames = new ArrayList<>(typeCache.getAllTypeNames());\n return ImmutableList.copyOf(typeNames);\n }", "class_method_signature": "TypeSystem.getTypeNames()", "constructor": false, "full_signature": ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_69
{ "fields": [ { "declarator": "ACTIVE_SERVER_ADDRESS = \"http://localhost:21000/\"", "modifier": "public static final", "original_string": "public static final String ACTIVE_SERVER_ADDRESS = \"http://localhost:21000/\";", "type": "String", "var_name": "ACTIVE_SERVER_ADDRESS" }, ...
{ "body": "@Test\n public void testShouldNotRedirectAdminAPIs() throws IOException, ServletException {\n when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE);\n when(servletRequest.getMethod()).thenReturn(HttpMethod.GET);\n when(servletRequest.getRequestURI()).\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ActiveServerFilter.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ActiveServerFilter.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Override\n public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,\n FilterChain filterChain) throws IOException, ServletException {\n if (isFilteredURI(servletRequest)) {\n LOG.debug(\"Is a filtered URI: {}. Passing request downstr...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_86
{ "fields": [ { "declarator": "curatorFactory", "modifier": "@Mock\n private", "original_string": "@Mock\n private CuratorFactory curatorFactory;", "type": "CuratorFactory", "var_name": "curatorFactory" }, { "declarator": "configuration", "modifier": "@Mock\...
{ "body": "@Test\n public void shouldDeleteSetupInProgressNodeAfterCompletion() throws Exception {\n Set<SetupStep> steps = new LinkedHashSet<>();\n SetupStep setupStep1 = mock(SetupStep.class);\n steps.add(setupStep1);\n\n when(configuration.\n getString(HAConfiguration....
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SetupSteps.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SetupSteps.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "@PostConstruct\n public void runSetup() throws SetupException {\n HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration);\n InterProcessMutex lock = curatorFactory.lockInstance(zookeeperProperties.getZkRoot());\n try {\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_3
{ "fields": [ { "declarator": "classificationType", "modifier": "private final", "original_string": "private final AtlasClassificationType classificationType;", "type": "AtlasClassificationType", "var_name": "classificationType" }, { "declarator": "validValues = ...
{ "body": "@Test\n public void testClassificationTypeIsValidValue() {\n for (Object value : validValues) {\n assertTrue(classificationType.isValidValue(value), \"value=\" + value);\n }\n\n for (Object value : invalidValues) {\n assertFalse(classificationType.isValidValue(...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasClassificationType.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasClassificationType.class);", "type": "Logger", "var_name": "LOG" },...
{ "body": "@Override\n public boolean isValidValue(Object obj) {\n if (obj != null) {\n for (AtlasClassificationType superType : superTypes) {\n if (!superType.isValidValue(obj)) {\n return false;\n }\n }\n\n return super.isVa...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_244
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityResourceProviderTest.java", "identifier": "EntityResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetResources() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<Request> re...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/EntityResourceProvider.java", "identifier": "EntityResourceProvider", "interfaces": "implements ResourceProvider", "methods": [ { "class_method_signature": "EntityResourceProvider.EntityResourceProvider(AtlasTypeSystem typeSyste...
{ "body": "@Override\n public Result getResources(Request request) throws InvalidQueryException, ResourceNotFoundException {\n AtlasQuery atlasQuery = queryFactory.createEntityQuery(request);\n return new Result(atlasQuery.execute());\n }", "class_method_signature": "EntityResourceProvider.getRe...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_301
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = ResourceNotFoundException.class)\n public void testUpdateResourceById_404() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Override\n public void updateResourceById(Request request) throws ResourceNotFoundException, InvalidPayloadException {\n resourceDefinition.validateUpdatePayload(request);\n\n AtlasQuery atlasQuery;\n try {\n atlasQuery = queryFactory.createTaxonomyQuery(request);\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_182
{ "fields": [ { "declarator": "service", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebResource service;", "type": "WebResource", "var_name": "service" }, { "declarator": "resourceBuilderMock", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void shouldRetryUntilServiceBecomesActive() {\n setupRetryParams();\n\n when(client.resource(UriBuilder.fromUri(\"http://localhost:31000\").build())).thenReturn(service);\n WebResource.Builder builder = setupBuilder(AtlasClient.API.STATUS, service);\n ClientRes...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasClient.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasClient.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "public Referenceable getEntity(String guid) throws AtlasServiceException {\n JSONObject jsonResponse = callAPIWithBodyAndParams(API.GET_ENTITY, null, guid);\n try {\n String entityInstanceDefinition = jsonResponse.getString(AtlasClient.DEFINITION);\n return InstanceSeria...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_252
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/query/AlwaysQueryExpressionTest.java", "identifier": "AlwaysQueryExpressionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAsPipe() {\n VertexWrapper v = createStrictMock(VertexWrapper.class);\n replay(v);\n QueryExpression expression = new AlwaysQueryExpression();\n assertNull(expression.asPipe());\n verify(v);\n }", "class_method_signature": "AlwaysQueryExpre...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/query/AlwaysQueryExpression.java", "identifier": "AlwaysQueryExpression", "interfaces": "", "methods": [ { "class_method_signature": "AlwaysQueryExpression.AlwaysQueryExpression()", "constructor": true, "full_signatu...
{ "body": "@Override\n public Pipe asPipe() {\n return null;\n }", "class_method_signature": "AlwaysQueryExpression.asPipe()", "constructor": false, "full_signature": "@Override public Pipe asPipe()", "identifier": "asPipe", "invocations": [], "modifiers": "@Override public", "parameters": ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_28
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java", "identifier": "TaxonomyServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetTaxonomy() throws Exception {\n String taxonomyName = \"testTaxonomy\";\n MetadataService metadataService = createStrictMock(MetadataService.class);\n AtlasTypeDefStore typeDefStore = createStrictMock(AtlasTypeDefStore.class);\n ResourceProvider tax...
{ "fields": [ { "declarator": "PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\")", "modifier": "private static final", "original_string": "private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\");", "type": "Logger", "var_name": ...
{ "body": "@GET\n @Path(\"{taxonomyName}\")\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response getTaxonomy(@Context HttpHeaders headers,\n @Context UriInfo ui,\n @PathParam(\"taxonomyName\") String taxonomyName) throws CatalogException {\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_317
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/EntityTagResourceDefinitionTest.java", "identifier": "EntityTagResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetIdPropertyName() {\n ResourceDefinition entityTagDefinition = new EntityTagResourceDefinition();\n assertEquals(entityTagDefinition.getIdPropertyName(), \"name\");\n }", "class_method_signature": "EntityTagResourceDefinitionTest.testGetIdPropertyName()", "...
{ "fields": [ { "declarator": "ENTITY_GUID_PROPERTY = \"entity-guid\"", "modifier": "public static final", "original_string": "public static final String ENTITY_GUID_PROPERTY = \"entity-guid\";", "type": "String", "var_name": "ENTITY_GUID_PROPERTY" } ], "file": "catalog/src/m...
{ "body": "@Override\n public String getIdPropertyName() {\n return \"name\";\n }", "class_method_signature": "EntityTagResourceDefinition.getIdPropertyName()", "constructor": false, "full_signature": "@Override public String getIdPropertyName()", "identifier": "getIdPropertyName", "invocations...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_194
{ "fields": [ { "declarator": "notificationInterface", "modifier": "@Mock\n private", "original_string": "@Mock\n private NotificationInterface notificationInterface;", "type": "NotificationInterface", "var_name": "notificationInterface" }, { "declarator": "failed...
{ "body": "@Test\n public void testNotifyEntitiesRetriesOnException() throws NotificationException {\n List<HookNotification.HookNotificationMessage> hookNotificationMessages =\n new ArrayList<HookNotification.HookNotificationMessage>() {{\n add(new HookNotification.EntityC...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasHook.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasHook.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "...
{ "body": "@VisibleForTesting\n static void notifyEntitiesInternal(List<HookNotification.HookNotificationMessage> messages, int maxRetries,\n NotificationInterface notificationInterface,\n boolean shouldLogFailedMessages, FailedMessagesLog...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_205
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/notification/entity/EntityNotificationImplTest.java", "identifier": "EntityNotificationImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetOperationType() throws Exception {\n Referenceable entity = getEntity(\"id\");\n\n EntityNotificationImpl entityNotification =\n new EntityNotificationImpl(entity, EntityNotification.OperationType.ENTITY_CREATE,\n Collections.<IStruct>em...
{ "fields": [ { "declarator": "entity", "modifier": "private final", "original_string": "private final Referenceable entity;", "type": "Referenceable", "var_name": "entity" }, { "declarator": "operationType", "modifier": "private final", "original_string": "...
{ "body": "@Override\n public OperationType getOperationType() {\n return operationType;\n }", "class_method_signature": "EntityNotificationImpl.getOperationType()", "constructor": false, "full_signature": "@Override public OperationType getOperationType()", "identifier": "getOperationType", "i...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_90
{ "fields": [ { "declarator": "discoveryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private DiscoveryService discoveryService;", "type": "DiscoveryService", "var_name": "discoveryService" }, { "declarator": "lineageService", "mod...
{ "body": "@Test(enabled = false)\n public void testGetInputsGraph() throws Exception {\n JSONObject results = getInputsGraph(\"sales_fact_monthly_mv\");\n assertNotNull(results);\n System.out.println(\"inputs graph = \" + results);\n\n JSONObject values = results.getJSONObject(\"values...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DataSetLineageService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DataSetLineageService.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Override\n @GraphTransaction\n public String getInputsGraph(String tableName) throws AtlasException {\n LOG.info(\"Fetching lineage inputs graph for tableName={}\", tableName);\n tableName = ParamChecker.notEmpty(tableName, \"table name\");\n TypeUtils.Pair<String, String> typeI...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_204
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/notification/entity/EntityNotificationImplTest.java", "identifier": "EntityNotificationImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetEntity() throws Exception {\n Referenceable entity = getEntity(\"id\");\n\n EntityNotificationImpl entityNotification =\n new EntityNotificationImpl(entity, EntityNotification.OperationType.ENTITY_CREATE,\n Collections.<IStruct>emptyList...
{ "fields": [ { "declarator": "entity", "modifier": "private final", "original_string": "private final Referenceable entity;", "type": "Referenceable", "var_name": "entity" }, { "declarator": "operationType", "modifier": "private final", "original_string": "...
{ "body": "@Override\n public IReferenceableInstance getEntity() {\n return entity;\n }", "class_method_signature": "EntityNotificationImpl.getEntity()", "constructor": false, "full_signature": "@Override public IReferenceableInstance getEntity()", "identifier": "getEntity", "invocations": [], ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_91
{ "fields": [ { "declarator": "discoveryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private DiscoveryService discoveryService;", "type": "DiscoveryService", "var_name": "discoveryService" }, { "declarator": "lineageService", "mod...
{ "body": "@Test(enabled = false)\n public void testCircularLineage() throws Exception{\n JSONObject results = getInputsGraph(\"table2\");\n assertNotNull(results);\n System.out.println(\"inputs graph = \" + results);\n\n JSONObject values = results.getJSONObject(\"values\");\n a...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DataSetLineageService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DataSetLineageService.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Override\n @GraphTransaction\n public String getInputsGraph(String tableName) throws AtlasException {\n LOG.info(\"Fetching lineage inputs graph for tableName={}\", tableName);\n tableName = ParamChecker.notEmpty(tableName, \"table name\");\n TypeUtils.Pair<String, String> typeI...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_195
{ "fields": [ { "declarator": "notificationInterface", "modifier": "@Mock\n private", "original_string": "@Mock\n private NotificationInterface notificationInterface;", "type": "NotificationInterface", "var_name": "notificationInterface" }, { "declarator": "failed...
{ "body": "@Test\n public void testFailedMessageIsLoggedIfRequired() throws NotificationException {\n List<HookNotification.HookNotificationMessage> hookNotificationMessages =\n new ArrayList<HookNotification.HookNotificationMessage>() {{\n add(new HookNotification.EntityCr...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasHook.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasHook.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "...
{ "body": "@VisibleForTesting\n static void notifyEntitiesInternal(List<HookNotification.HookNotificationMessage> messages, int maxRetries,\n NotificationInterface notificationInterface,\n boolean shouldLogFailedMessages, FailedMessagesLog...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_253
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/query/QueryFactoryTest.java", "identifier": "QueryFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateTaxonomyQuery() throws Exception {\n Map<String, Object> requestProps = new HashMap<>();\n requestProps.put(\"name\", \"test_taxonomy\");\n Request request = new InstanceRequest(requestProps);\n\n QueryFactory factory = new QueryFactory();\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(QueryFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(QueryFactory.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "public AtlasQuery createTaxonomyQuery(Request request) throws InvalidQueryException {\n ResourceDefinition taxonomyDefinition = new TaxonomyResourceDefinition();\n QueryExpression queryExpression = create(request, taxonomyDefinition);\n return new AtlasTaxonomyQuery(queryExpression, ta...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_29
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java", "identifier": "TaxonomyServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetTaxonomies() throws Exception {\n MetadataService metadataService = createStrictMock(MetadataService.class);\n AtlasTypeDefStore typeDefStore = createStrictMock(AtlasTypeDefStore.class);\n ResourceProvider taxonomyResourceProvider = createStrictMock(Resour...
{ "fields": [ { "declarator": "PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\")", "modifier": "private static final", "original_string": "private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\");", "type": "Logger", "var_name": ...
{ "body": "@GET\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response getTaxonomies(@Context HttpHeaders headers, @Context UriInfo ui) throws CatalogException {\n AtlasPerfTracer perf = null;\n try {\n if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {\n perf = AtlasPe...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_316
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/EntityResourceDefinitionTest.java", "identifier": "EntityResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValidate() throws Exception {\n Request request = new InstanceRequest(Collections.<String, Object>emptyMap());\n\n ResourceDefinition entityDefinition = new EntityResourceDefinition();\n entityDefinition.validateCreatePayload(request);\n }", "class_metho...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/definition/EntityResourceDefinition.java", "identifier": "EntityResourceDefinition", "interfaces": "", "methods": [ { "class_method_signature": "EntityResourceDefinition.EntityResourceDefinition()", "constructor": true, ...
{ "body": "@Override\n public void validateCreatePayload(Request request) throws InvalidPayloadException {\n // no op for entities as we don't currently create entities and\n // each entity type is different\n }", "class_method_signature": "EntityResourceDefinition.validateCreatePayload(Request ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_183
{ "fields": [ { "declarator": "service", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebResource service;", "type": "WebResource", "var_name": "service" }, { "declarator": "resourceBuilderMock", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void shouldRetryIfCannotConnectToServiceInitially() {\n setupRetryParams();\n\n when(client.resource(UriBuilder.fromUri(\"http://localhost:31000\").build())).thenReturn(service);\n WebResource.Builder builder = setupBuilder(AtlasClient.API.STATUS, service);\n C...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasClient.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasClient.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "public Referenceable getEntity(String guid) throws AtlasServiceException {\n JSONObject jsonResponse = callAPIWithBodyAndParams(API.GET_ENTITY, null, guid);\n try {\n String entityInstanceDefinition = jsonResponse.getString(AtlasClient.DEFINITION);\n return InstanceSeria...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_245
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityResourceProviderTest.java", "identifier": "EntityResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetResources_noResults() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<R...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/EntityResourceProvider.java", "identifier": "EntityResourceProvider", "interfaces": "implements ResourceProvider", "methods": [ { "class_method_signature": "EntityResourceProvider.EntityResourceProvider(AtlasTypeSystem typeSyste...
{ "body": "@Override\n public Result getResources(Request request) throws InvalidQueryException, ResourceNotFoundException {\n AtlasQuery atlasQuery = queryFactory.createEntityQuery(request);\n return new Result(atlasQuery.execute());\n }", "class_method_signature": "EntityResourceProvider.getRe...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_300
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = InvalidPayloadException.class)\n public void testUpdateResourceById_attemptNameChange() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQu...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Override\n public void updateResourceById(Request request) throws ResourceNotFoundException, InvalidPayloadException {\n resourceDefinition.validateUpdatePayload(request);\n\n AtlasQuery atlasQuery;\n try {\n atlasQuery = queryFactory.createTaxonomyQuery(request);\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_212
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/notification/AbstractNotificationTest.java", "identifier": "AbstractNotificationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSend() throws Exception {\n Configuration configuration = mock(Configuration.class);\n\n TestNotification notification = new TestNotification(configuration);\n\n TestMessage message1 = new TestMessage(HookNotification.HookNotificationType.ENTITY_CREATE, \"use...
{ "fields": [ { "declarator": "CURRENT_MESSAGE_VERSION = new MessageVersion(\"1.0.0\")", "modifier": "public static final", "original_string": "public static final MessageVersion CURRENT_MESSAGE_VERSION = new MessageVersion(\"1.0.0\");", "type": "MessageVersion", "var_name": "CURRENT...
{ "body": "@Override\n public <T> void send(NotificationType type, List<T> messages) throws NotificationException {\n String[] strMessages = new String[messages.size()];\n for (int index = 0; index < messages.size(); index++) {\n strMessages[index] = getMessageJson(messages.get(index));\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_68
{ "fields": [ { "declarator": "ACTIVE_SERVER_ADDRESS = \"http://localhost:21000/\"", "modifier": "public static final", "original_string": "public static final String ACTIVE_SERVER_ADDRESS = \"http://localhost:21000/\";", "type": "String", "var_name": "ACTIVE_SERVER_ADDRESS" }, ...
{ "body": "@Test\n public void testShouldReturnServiceUnavailableIfStateBecomingActive() throws IOException, ServletException {\n when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.BECOMING_ACTIVE);\n when(servletRequest.getRequestURI()).thenReturn(\"api/atlas/types\");\n\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ActiveServerFilter.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ActiveServerFilter.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Override\n public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,\n FilterChain filterChain) throws IOException, ServletException {\n if (isFilteredURI(servletRequest)) {\n LOG.debug(\"Is a filtered URI: {}. Passing request downstr...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_87
{ "fields": [ { "declarator": "curatorFactory", "modifier": "@Mock\n private", "original_string": "@Mock\n private CuratorFactory curatorFactory;", "type": "CuratorFactory", "var_name": "curatorFactory" }, { "declarator": "configuration", "modifier": "@Mock\...
{ "body": "@Test\n public void shouldThrowSetupExceptionAndNotDoSetupIfSetupInProgressNodeExists() throws Exception {\n Set<SetupStep> steps = new LinkedHashSet<>();\n SetupStep setupStep1 = mock(SetupStep.class);\n steps.add(setupStep1);\n\n when(configuration.\n getStri...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SetupSteps.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SetupSteps.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "@PostConstruct\n public void runSetup() throws SetupException {\n HAConfiguration.ZookeeperProperties zookeeperProperties = HAConfiguration.getZookeeperProperties(configuration);\n InterProcessMutex lock = curatorFactory.lockInstance(zookeeperProperties.getZkRoot());\n try {\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_2
{ "fields": [ { "declarator": "classificationType", "modifier": "private final", "original_string": "private final AtlasClassificationType classificationType;", "type": "AtlasClassificationType", "var_name": "classificationType" }, { "declarator": "validValues = ...
{ "body": "@Test\n public void testClassificationTypeDefaultValue() {\n AtlasClassification defValue = classificationType.createDefaultValue();\n\n assertNotNull(defValue);\n assertEquals(defValue.getTypeName(), classificationType.getTypeName());\n }", "class_method_signature": "TestAtlas...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasClassificationType.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasClassificationType.class);", "type": "Logger", "var_name": "LOG" },...
{ "body": "@Override\n public AtlasClassification createDefaultValue() {\n AtlasClassification ret = new AtlasClassification(classificationDef.getName());\n\n populateDefaultValues(ret);\n\n return ret;\n }", "class_method_signature": "AtlasClassificationType.createDefaultValue()", "con...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_140
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test\n public void testCreateEntityWithTwoNestingLevels() throws AtlasException {\n\n List<Referenceable> toVerify = new ArrayList<>();\n Referenceable dept = new Referenceable(TestUtils.DEPARTMENT_TYPE);\n toVerify.add(dept);\n dept.set(TestUtils.NAME, \"test2\");\n\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n @GraphTransaction\n public CreateUpdateEntitiesResult createEntities(ITypedReferenceableInstance... entities) throws RepositoryException,\n EntityExistsException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"adding entities={}\", entities);\n }\n\n t...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_286
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/ResourceComparatorTest.java", "identifier": "ResourceComparatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCompare() {\n Map<String, Object> map = new TreeMap<>(new ResourceComparator());\n map.put(\"a\", \"zzzzz\");\n map.put(\"name\", 1);\n map.put(\"z\", \"fdsfdsds\");\n map.put(\"d\", new ArrayList<>());\n map.put(\"id\", 1);\n map....
{ "fields": [ { "declarator": "ordering = new ArrayList<>()", "modifier": "private static", "original_string": "private static List<String> ordering = new ArrayList<>();", "type": "List<String>", "var_name": "ordering" } ], "file": "catalog/src/main/java/org/apache/atlas/cata...
{ "body": "@Override\n public int compare(String s1, String s2) {\n if (s1.equals(s2)) {\n return 0;\n }\n\n int s1Order = ordering.indexOf(s1);\n int s2Order = ordering.indexOf(s2);\n\n if (s1Order == -1 && s2Order == -1) {\n return s1.compareTo(s2);\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_269
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TermResourceProviderTest.java", "identifier": "TermResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = ResourceNotFoundException.class)\n public void testGetResourceById_404() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = cre...
{ "fields": [ { "declarator": "taxonomyResourceProvider", "modifier": "private", "original_string": "private ResourceProvider taxonomyResourceProvider;", "type": "ResourceProvider", "var_name": "taxonomyResourceProvider" }, { "declarator": "entityResourceProvider", ...
{ "body": "@Override\n public Result getResourceById(Request request) throws ResourceNotFoundException {\n //todo: shouldn't need to add this here\n request.getQueryProperties().put(\"name\", request.<TermPath>getProperty(\"termPath\").getFullyQualifiedName());\n AtlasQuery atlasQuery;\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_13
{ "fields": [ { "declarator": "intArrayType = new AtlasArrayType(new AtlasIntType())", "modifier": "private final", "original_string": "private final AtlasArrayType intArrayType = new AtlasArrayType(new AtlasIntType());", "type": "AtlasArrayType", "var_name": "intArrayType" }, ...
{ "body": "@Test\n public void testArrayTypeValidateValue() {\n List<String> messages = new ArrayList<>();\n for (Object value : validValues) {\n assertTrue(intArrayType.validateValue(value, \"testObj\", messages));\n assertEquals(messages.size(), 0, \"value=\" + value);\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasArrayType.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasArrayType.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "@Override\n public boolean validateValue(Object obj, String objName, List<String> messages) {\n boolean ret = true;\n\n if (obj != null) {\n if (obj instanceof List || obj instanceof Set) {\n Collection objList = (Collection) obj;\n\n if (!isValidEl...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_117
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityStoreV1Test.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityStoreV1Test.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Test\n public void testCheckOptionalAttrValueRetention() throws Exception {\n\n AtlasEntity dbEntity = TestUtilsV2.createDBEntity();\n\n init();\n EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(dbEntity), false);\n AtlasEntity firstEntityC...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityStoreV1.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityStoreV1.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "private EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate, boolean replaceClassifications) throws AtlasBaseException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"==> createOrUpdate()\");\n }\n\n if (entityStream == null || !entityStrea...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_44
{ "fields": [ { "declarator": "configuration", "modifier": "@Mock\n private", "original_string": "@Mock\n private Configuration configuration;", "type": "Configuration", "var_name": "configuration" }, { "declarator": "curatorFactory", "modifier": "@Mock\n ...
{ "body": "@Test\n public void testLeaderElectionIsNotStartedIfNotInHAMode() throws AtlasException {\n when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY, false)).thenReturn(false);\n\n ActiveInstanceElectorService activeInstanceElectorService =\n new ActiveInsta...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ActiveInstanceElectorService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ActiveInstanceElectorService.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public void start() throws AtlasException {\n if (!HAConfiguration.isHAEnabled(configuration)) {\n LOG.info(\"HA is not enabled, no need to start leader election service\");\n return;\n }\n cacheActiveStateChangeHandlers();\n serverId = Atlas...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_101
{ "fields": [ { "declarator": "discoveryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private DiscoveryService discoveryService;", "type": "DiscoveryService", "var_name": "discoveryService" }, { "declarator": "lineageService", "mod...
{ "body": "@Test(enabled = false)\n public void testGetSchemaForEntityInvalidArguments(final String entityId, String expectedException) throws Exception {\n testInvalidArguments(expectedException, new Invoker() {\n @Override\n void run() throws AtlasException {\n lineage...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DataSetLineageService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DataSetLineageService.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Override\n @GraphTransaction\n public String getSchemaForEntity(String guid) throws AtlasException {\n guid = ParamChecker.notEmpty(guid, \"Entity id\");\n LOG.info(\"Fetching schema for entity guid={}\", guid);\n String typeName = validateDatasetExists(guid);\n return ge...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_228
{ "fields": [ { "declarator": "CLASSTYPE_CUSTOMER = \"Customer\"", "modifier": "private", "original_string": "private String CLASSTYPE_CUSTOMER = \"Customer\";", "type": "String", "var_name": "CLASSTYPE_CUSTOMER" }, { "declarator": "STRUCTTYPE_ADDRESS = \"Address\"", ...
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testGetTypeWithInvalidCategory() throws Exception {\n\n cache.get(TypeCategory.PRIMITIVE, DataTypes.BOOLEAN_TYPE.getName());\n fail(\"TypeCategory should only be one of TypeCategory.CLASS | ENUM | STRUCT | TRAIT in 'g...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DefaultTypeCache.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DefaultTypeCache.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "@Override\n public IDataType get(String typeName) throws AtlasException {\n\n return types_.get(typeName);\n }", "class_method_signature": "DefaultTypeCache.get(String typeName)", "constructor": false, "full_signature": "@Override public IDataType get(String typeName)", "identifier": "...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_52
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/service/AtlasZookeeperSecurityPropertiesTest.java", "identifier": "AtlasZookeeperSecurityPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetAuth() {\n AuthInfo authInfo = AtlasZookeeperSecurityProperties.parseAuth(\"digest:user:password\");\n assertEquals(authInfo.getScheme(), \"digest\");\n assertEquals(authInfo.getAuth(), \"user:password\".getBytes(Charsets.UTF_8));\n }", "class_metho...
{ "fields": [], "file": "webapp/src/main/java/org/apache/atlas/web/service/AtlasZookeeperSecurityProperties.java", "identifier": "AtlasZookeeperSecurityProperties", "interfaces": "", "methods": [ { "class_method_signature": "AtlasZookeeperSecurityProperties.parseAcl(String aclString, ACL defaultAcl)...
{ "body": "public static AuthInfo parseAuth(String authString) {\n String[] authComponents = getComponents(authString, \"authString\", \"scheme:authString\");\n return new AuthInfo(authComponents[0], authComponents[1].getBytes(Charsets.UTF_8));\n }", "class_method_signature": "AtlasZookeeperSecurit...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_156
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test(dependsOnMethods = \"testAddTrait\")\n public void testDeleteTrait() throws Exception {\n final String aGUID = getGUID();\n AtlasVertex AtlasVertex = GraphHelper.getInstance().getVertexForGUID(aGUID);\n Long modificationTimestampPreUpdate = GraphHelper.getSingleValuedProperty(...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n @GraphTransaction\n public void deleteTrait(String guid, String traitNameToBeDeleted) throws TraitNotFoundException, EntityNotFoundException, RepositoryException {\n LOG.debug(\"Deleting trait={} from entity={}\", traitNameToBeDeleted, guid);\n GraphTransactionInterceptor.lo...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_290
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = ResourceNotFoundException.class)\n public void testGetResourceById_404() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = cre...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Override\n public Result getResourceById(Request request) throws ResourceNotFoundException {\n synchronized (TaxonomyResourceProvider.class) {\n createDefaultTaxonomyIfNeeded();\n }\n return doGetResourceById(request);\n }", "class_method_signature": "TaxonomyResour...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_208
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/notification/MessageVersionTest.java", "identifier": "MessageVersionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCompareTo() throws Exception {\n MessageVersion version1 = new MessageVersion(\"1.0.0\");\n MessageVersion version2 = new MessageVersion(\"1.0.0\");\n MessageVersion version3 = new MessageVersion(\"2.0.0\");\n MessageVersion version4 = new MessageVersi...
{ "fields": [ { "declarator": "NO_VERSION = new MessageVersion(\"0\")", "modifier": "public static final", "original_string": "public static final MessageVersion NO_VERSION = new MessageVersion(\"0\");", "type": "MessageVersion", "var_name": "NO_VERSION" }, { "declarato...
{ "body": "@Override\n public int compareTo(MessageVersion that) {\n if (that == null) {\n return 1;\n }\n\n Integer[] thisParts = getVersionParts();\n Integer[] thatParts = that.getVersionParts();\n\n int length = Math.max(thisParts.length, thatParts.length);\n\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_72
{ "fields": [ { "declarator": "EXPECTED_MESSAGE = \"Missing Required Header for CSRF Vulnerability Protection\"", "modifier": "private static final", "original_string": "private static final String EXPECTED_MESSAGE = \"Missing Required Header for CSRF Vulnerability Protection\";", "type": ...
{ "body": "@Test\n\tpublic void testHeaderPresentCustomHeaderConfig_goodRequest() throws ServletException, IOException {\n\t\t// CSRF HAS been sent\n\t\tHttpServletRequest mockReq = Mockito.mock(HttpServletRequest.class);\n\t\tMockito.when(mockReq.getHeader(X_CUSTOM_HEADER)).thenReturn(\"valueUnimportant\");\n\n\t\t/...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasCSRFPreventionFilter.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasCSRFPreventionFilter.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n final HttpServletRequest httpRequest = (HttpServletRequest) request;\n final HttpServletResponse httpResponse = (HttpServletResponse) response;\n AtlasResp...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_121
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityStoreV1Test.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityStoreV1Test.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Test\n public void testPartialUpdateArrayAttr() throws Exception {\n // Create a table entity, with 3 reference column entities\n init();\n final AtlasEntity dbEntity = TestUtilsV2.createDBEntity();\n EntityMutationResponse dbCreationResponse = entityStore.cre...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityStoreV1.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityStoreV1.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "private EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate, boolean replaceClassifications) throws AtlasBaseException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"==> createOrUpdate()\");\n }\n\n if (entityStream == null || !entityStrea...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_25
{ "fields": [ { "declarator": "notificationInterface", "modifier": "@Mock\n private", "original_string": "@Mock\n private NotificationInterface notificationInterface;", "type": "NotificationInterface", "var_name": "notificationInterface" }, { "declarator": "config...
{ "body": "@Test\n public void testConsumersAreNotStartedIfHAIsEnabled() throws Exception {\n when(configuration.containsKey(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(true);\n when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(true);\n when(co...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(NotificationHookConsumer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(NotificationHookConsumer.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "void startInternal(Configuration configuration, ExecutorService executorService) {\n if (consumers == null) {\n consumers = new ArrayList<>();\n }\n if (executorService != null) {\n executors = executorService;\n }\n if (!HAConfiguration.isHAEnabled(...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_199
{ "fields": [ { "declarator": "HOOK_MESSAGE_DESERIALIZER = new HookMessageDeserializer()", "modifier": "public static final", "original_string": "public static final HookMessageDeserializer HOOK_MESSAGE_DESERIALIZER = new HookMessageDeserializer();", "type": "HookMessageDeserializer", ...
{ "body": "@Test\n public void testNewMessageSerDe() throws Exception {\n Referenceable entity1 = new Referenceable(\"sometype\");\n entity1.set(\"attr\", \"value\");\n entity1.set(\"complex\", new Referenceable(\"othertype\"));\n Referenceable entity2 = new Referenceable(\"newtype\");\...
{ "fields": [], "file": "notification/src/main/java/org/apache/atlas/notification/hook/HookNotification.java", "identifier": "HookNotification", "interfaces": "implements JsonDeserializer<HookNotification.HookNotificationMessage>", "methods": [ { "class_method_signature": "HookNotification.deseriali...
{ "body": "@Override\n public HookNotificationMessage deserialize(JsonElement json, Type typeOfT,\n JsonDeserializationContext context) {\n HookNotificationType type =\n context.deserialize(((JsonObject) json).get(\"type\"), HookNotificationType.c...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_176
{ "fields": [], "file": "common/src/test/java/org/apache/atlas/ApplicationPropertiesTest.java", "identifier": "ApplicationPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetFileAsInputStream() throws Exception {\n Configuration props = ApplicationProperties.get(\"test.properties\");\n InputStream inStr = null;\n\n // configured file as class loader resource\n try {\n inStr = ApplicationProperties.getFileAsIn...
{ "fields": [ { "declarator": "ATLAS_CONFIGURATION_DIRECTORY_PROPERTY = \"atlas.conf\"", "modifier": "public static final", "original_string": "public static final String ATLAS_CONFIGURATION_DIRECTORY_PROPERTY = \"atlas.conf\";", "type": "String", "var_name": "ATLAS_CONFIGURATION_DIR...
{ "body": "public static InputStream getFileAsInputStream(Configuration configuration, String propertyName, String defaultFileName) throws AtlasException {\n File fileToLoad = null;\n String fileName = configuration.getString(propertyName);\n if (fileName == null) {\n if (defaultFileNa...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_249
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/CollectionRequestTest.java", "identifier": "CollectionRequestTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWithProperties() {\n String query = \"name:foo*\";\n Map<String, Object> properties = new HashMap<>();\n properties.put(\"foo\", \"fooValue\");\n properties.put(\"someBoolean\", true);\n Request request = new CollectionRequest(properties, query)...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/CollectionRequest.java", "identifier": "CollectionRequest", "interfaces": "", "methods": [ { "class_method_signature": "CollectionRequest.CollectionRequest(Map<String, Object> queryProperties, String queryString)", "constr...
{ "body": "@Override\n public Cardinality getCardinality() {\n return Cardinality.COLLECTION;\n }", "class_method_signature": "CollectionRequest.getCardinality()", "constructor": false, "full_signature": "@Override public Cardinality getCardinality()", "identifier": "getCardinality", "invocatio...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_33
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java", "identifier": "TaxonomyServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetTaxonomyTerms() throws Exception {\n MetadataService metadataService = createStrictMock(MetadataService.class);\n AtlasTypeDefStore typeDefStore = createStrictMock(AtlasTypeDefStore.class);\n ResourceProvider taxonomyResourceProvider = createStrictMock(Res...
{ "fields": [ { "declarator": "PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\")", "modifier": "private static final", "original_string": "private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\");", "type": "Logger", "var_name": ...
{ "body": "@GET\n @Path(\"{taxonomyName}/terms\")\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response getTaxonomyTerms(@Context HttpHeaders headers,\n @Context UriInfo ui,\n @PathParam(\"taxonomyName\") String taxonomyName) throws Ca...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_160
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test(dependsOnMethods = \"testSubmitEntity\")\n public void testFullTextSearch() throws Exception {\n //todo fix this\n //Weird: with lucene, the test passes without sleep\n //but with elasticsearch, doesn't work without sleep. why??\n long sleepInterval = 1000;\n\n T...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class);", "type": "Logger", "var_name": ...
{ "body": "public AtlasGraph getGraph() throws RepositoryException {\n return atlasGraph;\n }", "class_method_signature": "GraphBackedMetadataRepository.getGraph()", "constructor": false, "full_signature": "public AtlasGraph getGraph()", "identifier": "getGraph", "invocations": [], "modifiers": ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_64
{ "fields": [ { "declarator": "ACTIVE_SERVER_ADDRESS = \"http://localhost:21000/\"", "modifier": "public static final", "original_string": "public static final String ACTIVE_SERVER_ADDRESS = \"http://localhost:21000/\";", "type": "String", "var_name": "ACTIVE_SERVER_ADDRESS" }, ...
{ "body": "@Test\n public void testRedirectedRequestShouldContainQueryParameters() throws IOException, ServletException {\n when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE);\n when(servletRequest.getRequestURI()).thenReturn(\"api/atlas/types\");\n\n ActiveServer...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ActiveServerFilter.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ActiveServerFilter.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Override\n public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,\n FilterChain filterChain) throws IOException, ServletException {\n if (isFilteredURI(servletRequest)) {\n LOG.debug(\"Is a filtered URI: {}. Passing request downstr...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_137
{ "fields": [ { "declarator": "graphBackedSearchIndexer", "modifier": "@Inject\n private", "original_string": "@Inject\n private GraphBackedSearchIndexer graphBackedSearchIndexer;", "type": "GraphBackedSearchIndexer", "var_name": "graphBackedSearchIndexer" } ], "file": ...
{ "body": "@Test\n public void verifyTypeStoreIndexes() {\n AtlasGraph graph = TestUtils.getGraph();\n AtlasGraphManagement managementSystem = graph.getManagementSystem();\n try {\n verifySystemCompositeIndex(managementSystem, Constants.TYPENAME_PROPERTY_KEY, true);\n ver...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GraphBackedSearchIndexer.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GraphBackedSearchIndexer.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "private void rollback(AtlasGraphManagement management) throws IndexException {\n try {\n management.rollback();\n\n recomputeIndexedKeys = true;\n } catch (Exception e) {\n LOG.error(\"Index rollback failed \", e);\n throw new IndexException(\"Index...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_320
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/TermResourceDefinitionTest.java", "identifier": "TermResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetIdPropertyName() {\n ResourceDefinition termDefinition = new TermResourceDefinition();\n assertEquals(termDefinition.getIdPropertyName(), \"name\");\n }", "class_method_signature": "TermResourceDefinitionTest.testGetIdPropertyName()", "constructor": false,...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/definition/TermResourceDefinition.java", "identifier": "TermResourceDefinition", "interfaces": "", "methods": [ { "class_method_signature": "TermResourceDefinition.TermResourceDefinition()", "constructor": true, "ful...
{ "body": "@Override\n public String getIdPropertyName() {\n return \"name\";\n }", "class_method_signature": "TermResourceDefinition.getIdPropertyName()", "constructor": false, "full_signature": "@Override public String getIdPropertyName()", "identifier": "getIdPropertyName", "invocations": []...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_265
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/VertexWrapperTest.java", "identifier": "VertexWrapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetPropertyMap() {\n String testType = \"testType\";\n Set<String> propertyKeys = new HashSet<>();\n propertyKeys.add(\"Prefix.foo\");\n propertyKeys.add(\"Prefix.bar\");\n propertyKeys.add(\"foobar\");\n\n Vertex v = createMock(Vertex.cl...
{ "fields": [ { "declarator": "vertex", "modifier": "private final", "original_string": "private final Vertex vertex;", "type": "Vertex", "var_name": "vertex" }, { "declarator": "vertexType", "modifier": "private final", "original_string": "private final Str...
{ "body": "public Map<String, Object> getPropertyMap() {\n Map<String, Object> props = new TreeMap<>(resourceComparator);\n for (String p : vertex.getPropertyKeys()) {\n String cleanName = propertyMapper.toCleanName(p, vertexType);\n if (! removedProperties.contains(cleanName)) {\n...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_232
{ "fields": [ { "declarator": "CLASSTYPE_CUSTOMER = \"Customer\"", "modifier": "private", "original_string": "private String CLASSTYPE_CUSTOMER = \"Customer\";", "type": "String", "var_name": "CLASSTYPE_CUSTOMER" }, { "declarator": "STRUCTTYPE_ADDRESS = \"Address\"", ...
{ "body": "@Test(expectedExceptions = AtlasException.class)\n public void testCacheBulkInsertWithInvalidType() throws Exception {\n\n List<IDataType> allTypes = new ArrayList<>();\n allTypes.add(DataTypes.BOOLEAN_TYPE);\n\n // create a new cache instead of using the one setup for every method ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DefaultTypeCache.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DefaultTypeCache.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "@Override\n public void putAll(Collection<IDataType> types) throws AtlasException {\n\n for (IDataType type : types) {\n assertValidType(type);\n types_.put(type.getName(), type);\n }\n }", "class_method_signature": "DefaultTypeCache.putAll(Collection<IDataType> ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_48
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/service/AtlasZookeeperSecurityPropertiesTest.java", "identifier": "AtlasZookeeperSecurityPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldGetAcl() {\n ACL acl = AtlasZookeeperSecurityProperties.parseAcl(\"sasl:myclient@EXAMPLE.COM\");\n assertEquals(acl.getId().getScheme(), \"sasl\");\n assertEquals(acl.getId().getId(), \"myclient@EXAMPLE.COM\");\n assertEquals(acl.getPerms(), ZooDefs....
{ "fields": [], "file": "webapp/src/main/java/org/apache/atlas/web/service/AtlasZookeeperSecurityProperties.java", "identifier": "AtlasZookeeperSecurityProperties", "interfaces": "", "methods": [ { "class_method_signature": "AtlasZookeeperSecurityProperties.parseAcl(String aclString, ACL defaultAcl)...
{ "body": "public static ACL parseAcl(String aclString, ACL defaultAcl) {\n if (StringUtils.isEmpty(aclString)) {\n return defaultAcl;\n }\n return parseAcl(aclString);\n }", "class_method_signature": "AtlasZookeeperSecurityProperties.parseAcl(String aclString, ACL defaultAcl)", ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_224
{ "fields": [ { "declarator": "CLASSTYPE_CUSTOMER = \"Customer\"", "modifier": "private", "original_string": "private String CLASSTYPE_CUSTOMER = \"Customer\";", "type": "String", "var_name": "CLASSTYPE_CUSTOMER" }, { "declarator": "STRUCTTYPE_ADDRESS = \"Address\"", ...
{ "body": "@Test\n public void testCacheGetTypeNamesByCategory() throws Exception {\n List<String> classTypes = new ArrayList(getTypeNamesByCategory(TypeCategory.CLASS));\n final int EXPECTED_CLASSTYPE_COUNT = 1;\n assertEquals(classTypes.size(), EXPECTED_CLASSTYPE_COUNT);\n assertEqual...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DefaultTypeCache.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DefaultTypeCache.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "@Override\n public IDataType get(String typeName) throws AtlasException {\n\n return types_.get(typeName);\n }", "class_method_signature": "DefaultTypeCache.get(String typeName)", "constructor": false, "full_signature": "@Override public IDataType get(String typeName)", "identifier": "...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_273
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TermResourceProviderTest.java", "identifier": "TermResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateResource() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<ResourceD...
{ "fields": [ { "declarator": "taxonomyResourceProvider", "modifier": "private", "original_string": "private ResourceProvider taxonomyResourceProvider;", "type": "ResourceProvider", "var_name": "taxonomyResourceProvider" }, { "declarator": "entityResourceProvider", ...
{ "body": "public void createResource(Request request)\n throws InvalidPayloadException, ResourceAlreadyExistsException, ResourceNotFoundException {\n\n TermPath termPath = (TermPath) request.getQueryProperties().remove(\"termPath\");\n String qualifiedTermName = termPath.getFullyQualifiedNa...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_297
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeleteResourceById() throws Exception {\n TermResourceProvider termResourceProvider = createStrictMock(TermResourceProvider.class);\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFac...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(TaxonomyResourceProvider.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Override\n public void deleteResourceById(Request request) throws ResourceNotFoundException, InvalidPayloadException {\n String taxonomyId = getResourceId(request);\n getTermResourceProvider().deleteChildren(taxonomyId, new TermPath(request.<String>getProperty(\"name\")));\n typeSy...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_278
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityTagResourceProviderTest.java", "identifier": "EntityTagResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetResource() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<Request> req...
{ "fields": [ { "declarator": "termResourceProvider", "modifier": "private", "original_string": "private TermResourceProvider termResourceProvider;", "type": "TermResourceProvider", "var_name": "termResourceProvider" } ], "file": "catalog/src/main/java/org/apache/atlas/catalo...
{ "body": "@Override\n public Result getResourceById(Request request) throws ResourceNotFoundException {\n AtlasQuery atlasQuery;\n try {\n atlasQuery = queryFactory.createEntityTagQuery(request);\n } catch (InvalidQueryException e) {\n throw new CatalogRuntimeException(\...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_151
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test(expectedExceptions = EntityNotFoundException.class)\n public void testGetTraitNamesForBadEntity() throws Exception {\n repositoryService.getTraitNames(UUID.randomUUID().toString());\n Assert.fail();\n }", "class_method_signature": "GraphBackedMetadataRepositoryTest.testGetTraitN...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n @GraphTransaction\n public List<String> getTraitNames(String guid) throws AtlasException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Retrieving trait names for entity={}\", guid);\n }\n\n AtlasVertex instanceVertex = graphHelper.getVertexForGUID(guid);\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_55
{ "fields": [ { "declarator": "configuration", "modifier": "@Mock\n private", "original_string": "@Mock\n private Configuration configuration;", "type": "Configuration", "var_name": "configuration" } ], "file": "webapp/src/test/java/org/apache/atlas/web/service/ServiceS...
{ "body": "@Test(expectedExceptions = IllegalStateException.class)\n public void testShouldDisallowTransitionIfHAIsDisabled() {\n when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY, false)).thenReturn(false);\n\n ServiceState serviceState = new ServiceState(configuration);\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ServiceState.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ServiceState.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "public void becomingPassive() {\n LOG.warn(\"Instance becoming passive from {}\", state);\n setState(ServiceStateValue.BECOMING_PASSIVE);\n }", "class_method_signature": "ServiceState.becomingPassive()", "constructor": false, "full_signature": "public void becomingPassive()", "iden...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_106
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasTypeDefGraphStoreTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasTypeDefGraphStoreTest.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Test(dependsOnMethods = \"testGet\")\n public void testCreateWithValidAttributes(){\n AtlasTypesDef hiveTypes = TestUtilsV2.defineHiveTypes();\n try {\n AtlasTypesDef createdTypes = typeDefStore.createTypesDef(hiveTypes);\n assertEquals(hiveTypes.getEnumDefs(), creat...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasTypeDefGraphStore.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasTypeDefGraphStore.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Override\n @GraphTransaction\n public AtlasTypesDef createTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"==> AtlasTypeDefGraphStore.createTypesDef(enums={}, structs={}, classifications={}, entities={}, relationships={})\",\n...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_239
{ "fields": [], "file": "authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyParserTest.java", "identifier": "PolicyParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParsePoliciesWithOutGroupProperties() {\n List<String> policies = new ArrayList<>();\n policies.add(\"hivePolicy;;usr1:r,usr2:rw;;;;entity:*abc,operation:*xyz,type:PII\");\n // Creating group data\n Map<String, List<AtlasActionTypes>> groupMap = new Ha...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(PolicyParser.class)", "modifier": "private static", "original_string": "private static Logger LOG = LoggerFactory.getLogger(PolicyParser.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "isDebu...
{ "body": "public List<PolicyDef> parsePolicies(List<String> policies) {\n if (isDebugEnabled) {\n LOG.debug(\"==> PolicyParser parsePolicies\");\n }\n List<PolicyDef> policyDefs = new ArrayList<>();\n for (String policy : policies) {\n PolicyDef policyDef = parsePoli...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_43
{ "fields": [ { "declarator": "configuration", "modifier": "@Mock\n private", "original_string": "@Mock\n private Configuration configuration;", "type": "Configuration", "var_name": "configuration" }, { "declarator": "curatorFactory", "modifier": "@Mock\n ...
{ "body": "@Test\n public void testListenerIsAddedForActiveInstanceCallbacks() throws Exception {\n when(configuration.containsKey(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(true);\n when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(true);\n w...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ActiveInstanceElectorService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ActiveInstanceElectorService.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public void start() throws AtlasException {\n if (!HAConfiguration.isHAEnabled(configuration)) {\n LOG.info(\"HA is not enabled, no need to start leader election service\");\n return;\n }\n cacheActiveStateChangeHandlers();\n serverId = Atlas...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_110
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityStoreV1Test.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityStoreV1Test.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Test\n public void testDefaultValueForPrimitiveTypes() throws Exception {\n\n init();\n\n EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(primitiveEntity), false);\n List<AtlasEntityHeader> entitiesCreatedResponse = response.getEntitiesByOperatio...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityStoreV1.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityStoreV1.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "private EntityMutationResponse createOrUpdate(EntityStream entityStream, boolean isPartialUpdate, boolean replaceClassifications) throws AtlasBaseException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"==> createOrUpdate()\");\n }\n\n if (entityStream == null || !entityStrea...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_281
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityTagResourceProviderTest.java", "identifier": "EntityTagResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetResources_noResults() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<R...
{ "fields": [ { "declarator": "termResourceProvider", "modifier": "private", "original_string": "private TermResourceProvider termResourceProvider;", "type": "TermResourceProvider", "var_name": "termResourceProvider" } ], "file": "catalog/src/main/java/org/apache/atlas/catalo...
{ "body": "@Override\n public Result getResources(Request request) throws InvalidQueryException, ResourceNotFoundException {\n AtlasQuery atlasQuery = queryFactory.createEntityTagQuery(request);\n return new Result(atlasQuery.execute());\n }", "class_method_signature": "EntityTagResourceProvider...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_14
{ "fields": [ { "declarator": "MULTI_VAL_ATTR_NAME_MIN_MAX = \"multiValMinMax\"", "modifier": "private static final", "original_string": "private static final String MULTI_VAL_ATTR_NAME_MIN_MAX = \"multiValMinMax\";", "type": "String", "var_name": "MULTI_VAL_ATTR_NAME_MIN_MAX" },...
{ "body": "@Test\n public void testStructTypeDefaultValue() {\n AtlasStruct defValue = structType.createDefaultValue();\n\n assertNotNull(defValue);\n assertEquals(defValue.getTypeName(), structType.getTypeName());\n }", "class_method_signature": "TestAtlasStructType.testStructTypeDefault...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasStructType.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasStructType.class);", "type": "Logger", "var_name": "LOG" }, { "de...
{ "body": "@Override\n public AtlasStruct createDefaultValue() {\n AtlasStruct ret = new AtlasStruct(structDef.getName());\n\n populateDefaultValues(ret);\n\n return ret;\n }", "class_method_signature": "AtlasStructType.createDefaultValue()", "constructor": false, "full_signature": "...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_147
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test\n public void testCreateEntity() throws Exception {\n Referenceable databaseInstance = new Referenceable(TestUtils.DATABASE_TYPE);\n databaseInstance.set(\"name\", TestUtils.DATABASE_NAME);\n databaseInstance.set(\"description\", \"foo database\");\n databaseInstance.se...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GraphBackedMetadataRepository.class);", "type": "Logger", "var_name": ...
{ "body": "@Override\n @GraphTransaction\n public CreateUpdateEntitiesResult createEntities(ITypedReferenceableInstance... entities) throws RepositoryException,\n EntityExistsException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"adding entities={}\", entities);\n }\n\n t...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_215
{ "fields": [ { "declarator": "TEST_DATE_IN_LONG = 1418265358440L", "modifier": "public static final", "original_string": "public static final long TEST_DATE_IN_LONG = 1418265358440L;", "type": "long", "var_name": "TEST_DATE_IN_LONG" }, { "declarator": "TEST_DATE_STRING...
{ "body": "@Test\n public void testUTFNames() throws Exception {\n TypeSystem ts = getTypeSystem();\n\n String enumType = random();\n EnumTypeDefinition orgLevelEnum =\n new EnumTypeDefinition(enumType, new EnumValue(random(), 1), new EnumValue(random(), 2));\n\n String s...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(TypeSystem.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(TypeSystem.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "public Map<String, IDataType> defineTypes(TypesDef typesDef) throws AtlasException {\n ImmutableList<EnumTypeDefinition> enumDefs = ImmutableList.copyOf(typesDef.enumTypesAsJavaList());\n ImmutableList<StructTypeDefinition> structDefs = ImmutableList.copyOf(typesDef.structTypesAsJavaList());\...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_5
{ "fields": [ { "declarator": "classificationType", "modifier": "private final", "original_string": "private final AtlasClassificationType classificationType;", "type": "AtlasClassificationType", "var_name": "classificationType" }, { "declarator": "validValues = ...
{ "body": "@Test\n public void testClassificationTypeValidateValue() {\n List<String> messages = new ArrayList<>();\n for (Object value : validValues) {\n assertTrue(classificationType.validateValue(value, \"testObj\", messages));\n assertEquals(messages.size(), 0, \"value=\" + ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasClassificationType.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasClassificationType.class);", "type": "Logger", "var_name": "LOG" },...
{ "body": "@Override\n public boolean validateValue(Object obj, String objName, List<String> messages) {\n boolean ret = true;\n\n if (obj != null) {\n for (AtlasClassificationType superType : superTypes) {\n ret = superType.validateValue(obj, objName, messages) && ret;\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_80
{ "fields": [ { "declarator": "ACTIVE_SERVER_ADDRESS = \"http://localhost:21000/\"", "modifier": "public static final", "original_string": "public static final String ACTIVE_SERVER_ADDRESS = \"http://localhost:21000/\";", "type": "String", "var_name": "ACTIVE_SERVER_ADDRESS" }, ...
{ "body": "@Test\n public void testAuditWithExcludedOperationInIncorrectFormat() throws IOException, ServletException {\n AtlasRepositoryConfiguration.resetExcludedOperations();\n when(configuration.getStringArray(AtlasRepositoryConfiguration.AUDIT_EXCLUDED_OPERATIONS)).thenReturn(new String[]{\"Vers...
{ "fields": [ { "declarator": "AUDIT_LOG = LoggerFactory.getLogger(\"AUDIT\")", "modifier": "private static final", "original_string": "private static final Logger AUDIT_LOG = LoggerFactory.getLogger(\"AUDIT\");", "type": "Logger", "var_name": "AUDIT_LOG" }, { "declarat...
{ "body": "@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)\n throws IOException, ServletException {\n final String requestTimeISO9601 = DateTimeHelper.formatDateUTC(new Date());\n final HttpServletRequest httpRequest = (HttpServletRequest...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_242
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityResourceProviderTest.java", "identifier": "EntityResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetResource() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<Request> req...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/EntityResourceProvider.java", "identifier": "EntityResourceProvider", "interfaces": "implements ResourceProvider", "methods": [ { "class_method_signature": "EntityResourceProvider.EntityResourceProvider(AtlasTypeSystem typeSyste...
{ "body": "@Override\n public Result getResourceById(Request request) throws ResourceNotFoundException {\n AtlasQuery atlasQuery;\n try {\n atlasQuery = queryFactory.createEntityQuery(request);\n } catch (InvalidQueryException e) {\n throw new CatalogRuntimeException(\"Un...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_38
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java", "identifier": "TaxonomyServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeleteTerm() throws Exception {\n MetadataService metadataService = createStrictMock(MetadataService.class);\n AtlasTypeDefStore typeDefStore = createStrictMock(AtlasTypeDefStore.class);\n ResourceProvider taxonomyResourceProvider = createStrictMock(ResourceP...
{ "fields": [ { "declarator": "PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\")", "modifier": "private static final", "original_string": "private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\");", "type": "Logger", "var_name": ...
{ "body": "@DELETE\n @Path(\"{taxonomyName}/terms/{termName}\")\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response deleteTerm(@Context HttpHeaders headers,\n @Context UriInfo ui,\n @PathParam(\"taxonomyName\") String taxonomyName,\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_307
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/TaxonomyResourceDefinitionTest.java", "identifier": "TaxonomyResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetIdPropertyName() {\n ResourceDefinition taxonomyDefinition = new TaxonomyResourceDefinition();\n assertEquals(taxonomyDefinition.getIdPropertyName(), \"name\");\n }", "class_method_signature": "TaxonomyResourceDefinitionTest.testGetIdPropertyName()", "cons...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/definition/TaxonomyResourceDefinition.java", "identifier": "TaxonomyResourceDefinition", "interfaces": "", "methods": [ { "class_method_signature": "TaxonomyResourceDefinition.TaxonomyResourceDefinition()", "constructor": ...
{ "body": "@Override\n public String getIdPropertyName() {\n return \"name\";\n }", "class_method_signature": "TaxonomyResourceDefinition.getIdPropertyName()", "constructor": false, "full_signature": "@Override public String getIdPropertyName()", "identifier": "getIdPropertyName", "invocations"...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_184
{ "fields": [ { "declarator": "service", "modifier": "@Mock\n private", "original_string": "@Mock\n private WebResource service;", "type": "WebResource", "var_name": "service" }, { "declarator": "resourceBuilderMock", "modifier": "@Mock\n private", ...
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void shouldThrowExceptionIfActiveServerIsNotFound() {\n setupRetryParams();\n\n when(client.resource(UriBuilder.fromUri(\"http://localhost:31000\").build())).thenReturn(service);\n WebResource.Builder builder = setu...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasClient.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasClient.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "public Referenceable getEntity(String guid) throws AtlasServiceException {\n JSONObject jsonResponse = callAPIWithBodyAndParams(API.GET_ENTITY, null, guid);\n try {\n String entityInstanceDefinition = jsonResponse.getString(AtlasClient.DEFINITION);\n return InstanceSeria...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_254
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/query/QueryFactoryTest.java", "identifier": "QueryFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateTermQuery() throws Exception {\n Map<String, Object> requestProps = new HashMap<>();\n requestProps.put(\"name\", \"test_taxonomy.term1\");\n requestProps.put(\"termPath\", new TermPath(\"test_taxonomy.term1\"));\n Request request = new InstanceR...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(QueryFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(QueryFactory.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "public AtlasQuery createTermQuery(Request request) throws InvalidQueryException {\n ResourceDefinition termDefinition = new TermResourceDefinition();\n QueryExpression queryExpression = create(request, termDefinition);\n TermPath termPath = request.getProperty(\"termPath\");\n r...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_311
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/TaxonomyResourceDefinitionTest.java", "identifier": "TaxonomyResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = InvalidPayloadException.class)\n public void testValidate_missingName() throws Exception {\n Map<String, Object> properties = new HashMap<>();\n properties.put(\"description\", \"foo\");\n\n Request request = new InstanceRequest(properties);\n\n Res...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/definition/TaxonomyResourceDefinition.java", "identifier": "TaxonomyResourceDefinition", "interfaces": "", "methods": [ { "class_method_signature": "TaxonomyResourceDefinition.TaxonomyResourceDefinition()", "constructor": ...
{ "body": "@Override\n public void validateCreatePayload(Request request) throws InvalidPayloadException {\n super.validateCreatePayload(request);\n if (String.valueOf(request.getQueryProperties().get(\"name\")).contains(\".\")) {\n throw new InvalidPayloadException(\"The \\\"name\\\" prop...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_192
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/hook/AtlasTopicCreatorTest.java", "identifier": "AtlasTopicCreatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotProcessTopicCreationIfSecurityFails() {\n Configuration configuration = mock(Configuration.class);\n when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)).\n thenReturn(true);\n final ZkUtils zookeepe...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasTopicCreator.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasTopicCreator.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "public void createAtlasTopic(Configuration atlasProperties, String... topicNames) {\n if (atlasProperties.getBoolean(ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)) {\n if (!handleSecurity(atlasProperties)) {\n return;\n }\n ZkUtils zkUtils = createZkUtil...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_203
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/notification/VersionedMessageTest.java", "identifier": "VersionedMessageTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCompareVersion() throws Exception {\n MessageVersion version1 = new MessageVersion(\"1.0.0\");\n MessageVersion version2 = new MessageVersion(\"2.0.0\");\n MessageVersion version3 = new MessageVersion(\"0.5.0\");\n\n VersionedMessage<String> versionedM...
{ "fields": [ { "declarator": "version", "modifier": "private final", "original_string": "private final MessageVersion version;", "type": "MessageVersion", "var_name": "version" }, { "declarator": "message", "modifier": "private final", "original_string": "p...
{ "body": "public int compareVersion(MessageVersion compareToVersion) {\n return version.compareTo(compareToVersion);\n }", "class_method_signature": "VersionedMessage.compareVersion(MessageVersion compareToVersion)", "constructor": false, "full_signature": "public int compareVersion(MessageVersion co...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }