id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
35204049_325
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/TermResourceDefinitionTest.java", "identifier": "TermResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = InvalidPayloadException.class)\n public void testValidate_invalidTermName() throws Exception {\n Map<String, Object> properties = new HashMap<>();\n properties.put(\"name\", \"NotQualifiedTermName\");\n properties.put(\"description\", \"foo\");\n pr...
{ "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 void validateCreatePayload(Request request) throws InvalidPayloadException {\n super.validateCreatePayload(request);\n\n String name = request.getProperty(\"name\");\n // name will be in the fully qualified form: taxonomyName.termName\n if (! name.contains(...
{ "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_149
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test(dependsOnMethods = \"testCreateEntity\")\n public void testGetTraitNames() throws Exception {\n final List<String> traitNames = repositoryService.getTraitNames(getGUID());\n Assert.assertEquals(traitNames.size(), 1);\n Assert.assertEquals(traitNames, Arrays.asList(new String[]...
{ "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_237
{ "fields": [], "file": "authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyParserTest.java", "identifier": "PolicyParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParsePoliciesWithAllProperties() {\n List<String> policies = new ArrayList<>();\n policies.add(\"hivePolicy;;usr1:r,usr2:rw;;grp1:rwu,grp2:u;;entity:*abc,operation:*xyz,type:PII\");\n /* Creating group data */\n Map<String, List<AtlasActionTypes>> grou...
{ "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_221
{ "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 testCacheGetTypeByCategory() throws Exception {\n\n IDataType custType = cache.get(TypeCategory.CLASS, CLASSTYPE_CUSTOMER);\n verifyType(custType, CLASSTYPE_CUSTOMER, ClassType.class);\n\n IDataType addrType = cache.get(TypeCategory.STRUCT, STRUCTTYPE_ADDRESS);\n...
{ "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_108
{ "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 testCreateWithInvalidSuperTypes(){\n AtlasTypesDef typesDef;\n\n // Test Classification with supertype\n AtlasClassificationDef classificationDef = TestUtilsV2.getClassificationWithInvalidSuperType();\n typesDef = new AtlasT...
{ "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_276
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TermResourceProviderTest.java", "identifier": "TermResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUpdateResourceById() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<Reque...
{ "fields": [ { "declarator": "taxonomyResourceProvider", "modifier": "private", "original_string": "private ResourceProvider taxonomyResourceProvider;", "type": "ResourceProvider", "var_name": "taxonomyResourceProvider" }, { "declarator": "entityResourceProvider", ...
{ "body": "@Override\n public void updateResourceById(Request request) throws ResourceNotFoundException, InvalidPayloadException {\n resourceDefinition.validateUpdatePayload(request);\n String termName = request.<TermPath>getProperty(\"termPath\").getFullyQualifiedName();\n request.getQueryPro...
{ "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_299
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUpdateResourceById() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<Reque...
{ "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_277
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/InstanceRequestTest.java", "identifier": "InstanceRequestTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRequestProperties() {\n Map<String, Object> properties = new HashMap<>();\n properties.put(\"foo\", \"fooValue\");\n properties.put(\"someBoolean\", true);\n Request request = new InstanceRequest(properties);\n\n assertEquals(Request.Cardinality...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/InstanceRequest.java", "identifier": "InstanceRequest", "interfaces": "", "methods": [ { "class_method_signature": "InstanceRequest.InstanceRequest(Map<String, Object> queryProperties)", "constructor": true, "full_si...
{ "body": "@Override\n public Cardinality getCardinality() {\n return Cardinality.INSTANCE;\n }", "class_method_signature": "InstanceRequest.getCardinality()", "constructor": false, "full_signature": "@Override public Cardinality getCardinality()", "identifier": "getCardinality", "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_332
{ "fields": [ { "declarator": "LOCK_NAMESPACE = \"test\"", "modifier": "private static final", "original_string": "private static final String LOCK_NAMESPACE = \"test\";", "type": "String", "var_name": "LOCK_NAMESPACE" }, { "declarator": "LOCK_ROW = StaticArrayBuffer.of...
{ "body": "@Test\n public void testLock() throws InterruptedException {\n TimestampProvider times = Timestamps.MICRO;\n LocalLockMediator<HBaseTransaction> llm =\n new LocalLockMediator<>(LOCK_NAMESPACE, times);\n\n //Expire immediately\n Assert.assertTrue(llm.lock(kc, mo...
{ "fields": [ { "declarator": "log = LoggerFactory\n .getLogger(LocalLockMediator.class)", "modifier": "private static final", "original_string": "private static final Logger log = LoggerFactory\n .getLogger(LocalLockMediator.class);", "type": "Logger", "var_name": "log...
{ "body": "public boolean lock(KeyColumn kc, T requestor, Timepoint expires) {\n assert null != kc;\n assert null != requestor;\n\n AuditRecord<T> audit = new AuditRecord<>(requestor, expires);\n AuditRecord<T> inmap = locks.putIfAbsent(kc, audit);\n\n boolean success = false;\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_298
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = ResourceNotFoundException.class)\n public void testDeleteResourceById_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 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_109
{ "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 testSearchFunctionality() {\n SearchFilter searchFilter = new SearchFilter();\n searchFilter.setParam(SearchFilter.PARAM_SUPERTYPE, \"Person\");\n\n try {\n AtlasTypesDef typesDef = typeDefStore.searchTypesDef(searchFilt...
{ "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 public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException {\n final AtlasTypesDef typesDef = new AtlasTypesDef();\n Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter);\n\n for(AtlasEnumType enumType : typeReg...
{ "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_220
{ "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 testCacheGetType() throws Exception {\n\n IDataType custType = cache.get(CLASSTYPE_CUSTOMER);\n verifyType(custType, CLASSTYPE_CUSTOMER, ClassType.class);\n\n IDataType addrType = cache.get(STRUCTTYPE_ADDRESS);\n verifyType(addrType, STRUCTTYPE_ADDRESS, St...
{ "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_236
{ "fields": [], "file": "authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyUtilTest.java", "identifier": "PolicyUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMergeCreatePermissionMap() {\n\n HashMap<AtlasResourceTypes, List<String>> resourceMap = new HashMap<>();\n List<String> resource1List = new ArrayList<>();\n resource1List.add(\"*abc\");\n resourceMap.put(AtlasResourceTypes.ENTITY, resource1List);\n\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(PolicyUtil.class)", "modifier": "private static", "original_string": "private static Logger LOG = LoggerFactory.getLogger(PolicyUtil.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "isDebugEna...
{ "body": "public static Map<String, Map<AtlasResourceTypes, List<String>>> createPermissionMap(List<PolicyDef> policyDefList,\n AtlasActionTypes permissionType, SimpleAtlasAuthorizer.AtlasAccessorTypes principalType) {\n if (isDebugEnabled) {\n LOG.debug(\"==> PolicyUtil createPermissionMap\...
{ "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_148
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test(dependsOnMethods = \"testCreateEntity\")\n public void testGetEntityDefinition() throws Exception {\n String guid = getGUID();\n\n ITypedReferenceableInstance table = repositoryService.getEntityDefinition(guid);\n Assert.assertEquals(table.getDate(\"created\"), new Date(TestUt...
{ "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 ITypedReferenceableInstance getEntityDefinition(String guid) throws RepositoryException, EntityNotFoundException {\n return getEntityDefinitions(guid).get(0);\n }", "class_method_signature": "GraphBackedMetadataRepository.getEntityDefinition(String g...
{ "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_261
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/query/QueryFactoryTest.java", "identifier": "QueryFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCollectionQuery_BooleanQuery() throws Exception {\n String queryString = \"name:foo OR name:bar\";\n Request request = new CollectionRequest(Collections.<String, Object>emptyMap(), queryString);\n\n QueryFactory factory = new QueryFactory();\n AtlasTax...
{ "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_324
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/TermResourceDefinitionTest.java", "identifier": "TermResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValidate_nameOnly() throws Exception {\n Map<String, Object> properties = new HashMap<>();\n properties.put(\"name\", \"taxonomy1.termName\");\n\n Request request = new InstanceRequest(properties);\n\n ResourceDefinition termDefinition = new TermResour...
{ "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 void validateCreatePayload(Request request) throws InvalidPayloadException {\n super.validateCreatePayload(request);\n\n String name = request.getProperty(\"name\");\n // name will be in the fully qualified form: taxonomyName.termName\n if (! name.contains(...
{ "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_133
{ "fields": [ { "declarator": "metadataService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataService metadataService;", "type": "MetadataService", "var_name": "metadataService" }, { "declarator": "repositoryService", "modif...
{ "body": "@Test\n public void testGetOutgoingEdgesByLabel() throws Exception {\n AtlasGraph graph = TestUtils.getGraph();\n AtlasVertex v1 = graph.addVertex();\n AtlasVertex v2 = graph.addVertex();\n graph.addEdge(v1, v2, \"l1\");\n graph.addEdge(v1, v2, \"l2\");\n\n Iter...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(GraphHelper.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(GraphHelper.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "public Iterator<AtlasEdge> getOutGoingEdgesByLabel(AtlasVertex instanceVertex, String edgeLabel) {\n return getAdjacentEdgesByLabel(instanceVertex, AtlasEdgeDirection.OUT, edgeLabel);\n }", "class_method_signature": "GraphHelper.getOutGoingEdgesByLabel(AtlasVertex instanceVertex, String edgeLab...
{ "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_60
{ "fields": [ { "declarator": "HOST_PORT = \"127.0.0.1:21000\"", "modifier": "private static final", "original_string": "private static final String HOST_PORT = \"127.0.0.1:21000\";", "type": "String", "var_name": "HOST_PORT" }, { "declarator": "SERVER_ADDRESS = \"http:...
{ "body": "@Test\n public void testShouldHandleExceptionsInFetchingServerAddress() throws Exception {\n when(curatorFactory.clientInstance()).thenReturn(curatorFramework);\n when(configuration.getString(\n HAConfiguration.ATLAS_SERVER_HA_ZK_ROOT_KEY, HAConfiguration.ATLAS_SERVER_ZK_ROO...
{ "fields": [ { "declarator": "configuration", "modifier": "private final", "original_string": "private final Configuration configuration;", "type": "Configuration", "var_name": "configuration" }, { "declarator": "curatorFactory", "modifier": "private final", ...
{ "body": "public String getActiveServerAddress() {\n CuratorFramework client = curatorFactory.clientInstance();\n String serverAddress = null;\n try {\n HAConfiguration.ZookeeperProperties zookeeperProperties =\n HAConfiguration.getZookeeperProperties(configuration)...
{ "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_164
{ "fields": [ { "declarator": "DESCRIPTION = \"_description\"", "modifier": "private static final", "original_string": "private static final String DESCRIPTION = \"_description\";", "type": "String", "var_name": "DESCRIPTION" }, { "declarator": "typeStore", "modif...
{ "body": "@Test\n public void testStore() throws AtlasException {\n ImmutableList<String> typeNames = ts.getTypeNames();\n typeStore.store(ts, typeNames);\n dumpGraph();\n }", "class_method_signature": "GraphBackedTypeStoreTest.testStore()", "constructor": false, "full_signature": "@...
{ "fields": [ { "declarator": "VERTEX_TYPE = \"typeSystem\"", "modifier": "public static final", "original_string": "public static final String VERTEX_TYPE = \"typeSystem\";", "type": "String", "var_name": "VERTEX_TYPE" }, { "declarator": "PROPERTY_PREFIX = Constants.IN...
{ "body": "@Override\n @GraphTransaction\n public void store(TypeSystem typeSystem, ImmutableList<String> typeNames) throws AtlasException {\n\n //Pre-create the vertices that are needed for the types. This allows us to execute\n //one query to determine all of the vertices that already exist.\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_308
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/TaxonomyResourceDefinitionTest.java", "identifier": "TaxonomyResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetTypeName() {\n ResourceDefinition taxonomyDefinition = new TaxonomyResourceDefinition();\n assertEquals(taxonomyDefinition.getTypeName(), \"Taxonomy\");\n }", "class_method_signature": "TaxonomyResourceDefinitionTest.testGetTypeName()", "constructor": fals...
{ "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 getTypeName() {\n return \"Taxonomy\";\n }", "class_method_signature": "TaxonomyResourceDefinition.getTypeName()", "constructor": false, "full_signature": "@Override public String getTypeName()", "identifier": "getTypeName", "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_37
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java", "identifier": "TaxonomyServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateSubTerm() throws Exception {\n String taxonomyName = \"testTaxonomy\";\n String termName = \"testTerm\";\n MetadataService metadataService = createStrictMock(MetadataService.class);\n AtlasTypeDefStore typeDefStore = createStrictMock(AtlasTypeDef...
{ "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": "@POST\n @Path(\"{taxonomyName}/terms/{termName}/{remainder:.*}\")\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response createSubTerm(String body,\n @Context HttpHeaders headers,\n @Context UriInfo ui,\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_172
{ "fields": [ { "declarator": "TEST_ATLAS_SERVER_IDS_HA = new String[] { \"id1\", \"id2\" }", "modifier": "private static final", "original_string": "private static final String[] TEST_ATLAS_SERVER_IDS_HA = new String[] { \"id1\", \"id2\" };", "type": "String[]", "var_name": "TEST_AT...
{ "body": "@Test\n public void testShouldGetZookeeperAuth() {\n when(configuration.getString(HAConfiguration.HA_ZOOKEEPER_AUTH)).thenReturn(\"sasl:myclient@EXAMPLE.COM\");\n\n HAConfiguration.ZookeeperProperties zookeeperProperties =\n HAConfiguration.getZookeeperProperties(configurati...
{ "fields": [ { "declarator": "ATLAS_SERVER_ZK_ROOT_DEFAULT = \"/apache_atlas\"", "modifier": "public static final", "original_string": "public static final String ATLAS_SERVER_ZK_ROOT_DEFAULT = \"/apache_atlas\";", "type": "String", "var_name": "ATLAS_SERVER_ZK_ROOT_DEFAULT" }, ...
{ "body": "public static ZookeeperProperties getZookeeperProperties(Configuration configuration) {\n String zookeeperConnectString = configuration.getString(\"atlas.kafka.\" + ZOOKEEPER_PREFIX + \"connect\");\n if (configuration.containsKey(HA_ZOOKEEPER_CONNECT)) {\n zookeeperConnectString = ...
{ "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_21
{ "fields": [ { "declarator": "TYPE_TABLE = \"my_table\"", "modifier": "private static final", "original_string": "private static final String TYPE_TABLE = \"my_table\";", "type": "String", "var_name": "TYPE_TABLE" }, { "declarator": "TYPE_COLUMN = \"my_column\"", ...
{ "body": "@Test\n public void testEntityTypeValidateValue() {\n List<String> messages = new ArrayList<>();\n for (Object value : validValues) {\n assertTrue(entityType.validateValue(value, \"testObj\", messages));\n assertEquals(messages.size(), 0, \"value=\" + value);\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityType.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityType.class);", "type": "Logger", "var_name": "LOG" }, { "de...
{ "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 AtlasEntity || obj instanceof Map) {\n for (AtlasEntityType superType : superTypes) {\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_125
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ExportServiceTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ExportServiceTest.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Test\n public void requestingEntityNotFound_NoData() throws AtlasBaseException, IOException {\n String requestingIP = \"1.0.0.0\";\n String hostName = \"root\";\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n ZipSink zipSink = new ZipSink(baos);\n Atla...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ExportService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ExportService.class);", "type": "Logger", "var_name": "LOG" }, { "declar...
{ "body": "public AtlasExportResult run(ZipSink exportSink, AtlasExportRequest request, String userName, String hostName,\n String requestingIP) throws AtlasBaseException {\n long startTime = System.currentTimeMillis();\n AtlasExportResult result = new Atl...
{ "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_99
{ "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 testGetSchemaForDBEntity() throws Exception {\n String dbId = getEntityId(DATASET_SUBTYPE, \"name\", \"dataSetSubTypeInst1\");\n JSONObject results = new JSONObject(lineageService.getSchemaForEntity(dbId));\n }", "class_method_signature": "DataSetL...
{ "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_76
{ "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 testVerifyExcludedOperations() {\n AtlasRepositoryConfiguration.resetExcludedOperations();\n when(configuration.getStringArray(AtlasRepositoryConfiguration.AUDIT_EXCLUDED_OPERATIONS)).thenReturn(new String[]{\"GET:Version\", \"GET:Ping\"});\n AuditFilter auditFil...
{ "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": "boolean isOperationExcludedFromAudit(String requestHttpMethod, String requestOperation, Configuration config) {\n try {\n return AtlasRepositoryConfiguration.isExcludedFromAudit(config, requestHttpMethod, requestOperation);\n } catch (AtlasException e) {\n return false;\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_294
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = ResourceAlreadyExistsException.class)\n public void testCreateResource_invalidRequest__alreadyExists() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n...
{ "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 createResource(Request request)\n throws InvalidPayloadException, ResourceAlreadyExistsException {\n\n // not checking for default taxonomy in create per requirements\n resourceDefinition.validateCreatePayload(request);\n synchronized (TaxonomyReso...
{ "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_152
{ "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 testMultipleTypesWithSameUniqueAttribute() throws Exception {\n //Two entities of different types(with same supertype that has the unique attribute) with same qualified name should succeed\n HierarchicalTypeDefinition<ClassType> supertype =\n createClassT...
{ "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 ITypedReferenceableInstance getEntityDefinition(String guid) throws RepositoryException, EntityNotFoundException {\n return getEntityDefinitions(guid).get(0);\n }", "class_method_signature": "GraphBackedMetadataRepository.getEntityDefinition(String g...
{ "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_56
{ "fields": [ { "declarator": "HOST_PORT = \"127.0.0.1:21000\"", "modifier": "private static final", "original_string": "private static final String HOST_PORT = \"127.0.0.1:21000\";", "type": "String", "var_name": "HOST_PORT" }, { "declarator": "SERVER_ADDRESS = \"http:...
{ "body": "@Test\n public void testSharedPathIsCreatedIfNotExists() throws Exception {\n\n when(configuration.getString(HAConfiguration.ATLAS_SERVER_ADDRESS_PREFIX +\"id1\")).thenReturn(HOST_PORT);\n when(configuration.getString(\n HAConfiguration.ATLAS_SERVER_HA_ZK_ROOT_KEY, HAConfigu...
{ "fields": [ { "declarator": "configuration", "modifier": "private final", "original_string": "private final Configuration configuration;", "type": "Configuration", "var_name": "configuration" }, { "declarator": "curatorFactory", "modifier": "private final", ...
{ "body": "public void update(String serverId) throws AtlasBaseException {\n try {\n CuratorFramework client = curatorFactory.clientInstance();\n HAConfiguration.ZookeeperProperties zookeeperProperties =\n HAConfiguration.getZookeeperProperties(configuration);\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_105
{ "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 = {\"testUpdate\"}, dataProvider = \"allCreatedTypes\")\n public void testDelete(AtlasTypesDef atlasTypesDef){\n try {\n typeDefStore.deleteTypesDef(atlasTypesDef);\n } catch (AtlasBaseException e) {\n fail(\"Deletion should've succeeded\");\n ...
{ "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 void deleteTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"==> AtlasTypeDefGraphStore.deleteTypesDef(enums={}, structs={}, classfications={}, 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_40
{ "fields": [ { "declarator": "configuration", "modifier": "@Mock\n private", "original_string": "@Mock\n private Configuration configuration;", "type": "Configuration", "var_name": "configuration" }, { "declarator": "zookeeperProperties", "modifier": "@Mock...
{ "body": "@Test\n public void shouldAddAuthorization() {\n when(zookeeperProperties.hasAcl()).thenReturn(true);\n when(zookeeperProperties.getAcl()).thenReturn(\"sasl:myclient@EXAMPLE.COM\");\n when(zookeeperProperties.hasAuth()).thenReturn(true);\n when(zookeeperProperties.getAuth())....
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(CuratorFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(CuratorFactory.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "@VisibleForTesting\n void enhanceBuilderWithSecurityParameters(HAConfiguration.ZookeeperProperties zookeeperProperties,\n CuratorFrameworkFactory.Builder builder) {\n\n ACLProvider aclProvider = getAclProvider(zookeeperProperties);\n\n AuthInfo ...
{ "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_113
{ "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 testMapOfPrimitivesUpdate() throws Exception {\n AtlasEntity tableEntity = new AtlasEntity(tblEntity.getEntity());\n AtlasEntitiesWithExtInfo entitiesInfo = new AtlasEntitiesWithExtInfo(tableEntity);\n\n entitiesIn...
{ "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_17
{ "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 testStructTypeValidateValue() {\n List<String> messages = new ArrayList<>();\n for (Object value : validValues) {\n assertTrue(structType.validateValue(value, \"testObj\", messages));\n assertEquals(messages.size(), 0, \"value=\" + value);\n ...
{ "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 boolean validateValue(Object obj, String objName, List<String> messages) {\n boolean ret = true;\n\n if (obj != null) {\n if (obj instanceof AtlasStruct) {\n AtlasStruct structObj = (AtlasStruct) obj;\n\n for (AtlasAttributeDef at...
{ "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_328
{ "fields": [ { "declarator": "EXPECTED_JSON =\n \"[\\n\" +\n \" {\\n\" +\n \" \\\"href\\\": \\\"http://test.com:8080/v1/testResources/foo\\\",\\n\" +\n \" \\\"booleanProp\\\": true,\\n\" +\n \" \\\"numberProp\\\": 100,\\n\" +\n ...
{ "body": "@Test\n public void testSerialize() throws Exception {\n UriInfo uriInfo = createStrictMock(UriInfo.class);\n URI uri = new URI(\"http://test.com:8080/\");\n expect(uriInfo.getBaseUri()).andReturn(uri);\n\n replay(uriInfo);\n\n Collection<Map<String, Object>> resultMap...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/JsonSerializer.java", "identifier": "JsonSerializer", "interfaces": "", "methods": [ { "class_method_signature": "JsonSerializer.serialize(Result result, UriInfo ui)", "constructor": false, "full_signature": "public ...
{ "body": "public String serialize(Result result, UriInfo ui) {\n Writer json = new StringWriter();\n JsonWriter writer = new JsonWriter(json);\n writer.setIndent(\" \");\n\n try {\n writeValue(writer, result.getPropertyMaps(), ui.getBaseUri().toASCIIString());\n } cat...
{ "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_282
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityTagResourceProviderTest.java", "identifier": "EntityTagResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = InvalidPayloadException.class)\n public void testCreateResource_invalidRequest__noName() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQ...
{ "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 void createResource(Request request)\n throws InvalidPayloadException, ResourceAlreadyExistsException, ResourceNotFoundException {\n\n String entityId = String.valueOf(request.getQueryProperties().remove(\"id\"));\n resourceDefinition.validateCreatePayload(req...
{ "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_144
{ "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 testGetEntityList() throws Exception {\n List<String> entityList = repositoryService.getEntityList(TestUtils.DEPARTMENT_TYPE);\n System.out.println(\"entityList = \" + entityList);\n Assert.assertNotNull(entityList);\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 List<String> getEntityList(String entityType) throws RepositoryException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Retrieving entity list for type={}\", entityType);\n }\n\n AtlasGraphQuery query = getGraph().query().has(Const...
{ "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_83
{ "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 shouldRunSetupStepsUnderLock() throws Exception {\n Set<SetupStep> steps = new LinkedHashSet<>();\n SetupStep setupStep1 = mock(SetupStep.class);\n SetupStep setupStep2 = mock(SetupStep.class);\n steps.add(setupStep1);\n steps.add(setupStep2);\n\n ...
{ "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_6
{ "fields": [ { "declarator": "intIntMapType = new AtlasMapType(new AtlasIntType(), new AtlasIntType())", "modifier": "private final", "original_string": "private final AtlasMapType intIntMapType = new AtlasMapType(new AtlasIntType(), new AtlasIntType());", "type": "AtlasMapType", "v...
{ "body": "@Test\n public void testMapTypeDefaultValue() {\n Map<Object, Object> defValue = intIntMapType.createDefaultValue();\n\n assertEquals(defValue.size(), 1);\n }", "class_method_signature": "TestAtlasMapType.testMapTypeDefaultValue()", "constructor": false, "full_signature": "@Test p...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasEntityType.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityType.class);", "type": "Logger", "var_name": "LOG" }, { "de...
{ "body": "@Override\n public Map<Object, Object> createDefaultValue() {\n Map<Object, Object> ret = new HashMap<>();\n\n Object key = keyType.createDefaultValue();\n\n if ( key != null) {\n ret.put(key, valueType.createDefaultValue());\n }\n\n return 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_216
{ "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 testRedefineExistingType() throws Exception {\n TypeSystem typeSystem = getTypeSystem();\n HierarchicalTypeDefinition<TraitType> trait = TypesUtil\n .createTraitTypeDef(random(), \"description\", ImmutableSet.<String>of(),\n TypesUt...
{ "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 TraitType defineTraitType(HierarchicalTypeDefinition<TraitType> traitDef) throws AtlasException {\n defineTypes(ImmutableList.<EnumTypeDefinition>of(), ImmutableList.<StructTypeDefinition>of(),\n ImmutableList.of(traitDef), ImmutableList.<HierarchicalTypeDefinition<ClassType>>o...
{ "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_304
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/DefaultPropertyMapperTest.java", "identifier": "DefaultPropertyMapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToQualifiedName_defaultMappings() throws Exception {\n String typeName = \"testType\";\n HierarchicalType dataType = createNiceMock(HierarchicalType.class);\n\n // currently only use key in map\n Map<String, AttributeInfo> fields = new HashMap<>();\n ...
{ "fields": [ { "declarator": "typeInstances = new HashMap<>()", "modifier": "private", "original_string": "private Map<String, HierarchicalType> typeInstances = new HashMap<>();", "type": "Map<String, HierarchicalType>", "var_name": "typeInstances" }, { "declarator": "...
{ "body": "@Override\n public String toFullyQualifiedName(String propName, String type) {\n HierarchicalType dataType = getDataType(type);\n String replacement = m_cleanToQualifiedMap.get(propName);\n if (replacement == null && dataType != null) {\n FieldMapping fieldMap = dataType....
{ "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_241
{ "fields": [], "file": "authorization/src/test/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtilsTest.java", "identifier": "AtlasAuthorizationUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAtlasResourceType() throws Exception {\n String contextPath = \"/api/atlas/types\";\n Set<AtlasResourceTypes> resourceTypes = AtlasAuthorizationUtils.getAtlasResourceType(contextPath);\n assertEquals(resourceTypes.size(), 1);\n assertTrue(resourceTy...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasAuthorizationUtils.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasAuthorizationUtils.class);", "type": "Logger", "var_name": "LOG" },...
{ "body": "public static Set<AtlasResourceTypes> getAtlasResourceType(String contextPath) {\n Set<AtlasResourceTypes> resourceTypes = new HashSet<>();\n if (isDebugEnabled) {\n LOG.debug(\"==> getAtlasResourceType for {}\", contextPath);\n }\n String api = getApi(contextPath);\...
{ "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_168
{ "fields": [ { "declarator": "TEST_ATLAS_SERVER_IDS_HA = new String[] { \"id1\", \"id2\" }", "modifier": "private static final", "original_string": "private static final String[] TEST_ATLAS_SERVER_IDS_HA = new String[] { \"id1\", \"id2\" };", "type": "String[]", "var_name": "TEST_AT...
{ "body": "@Test\n public void testIsHAEnabledByIds() {\n when(configuration.containsKey(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(false);\n when(configuration.getStringArray(HAConfiguration.ATLAS_SERVER_IDS)).thenReturn(TEST_ATLAS_SERVER_IDS_HA);\n boolean isHAEnabled = HAConfi...
{ "fields": [ { "declarator": "ATLAS_SERVER_ZK_ROOT_DEFAULT = \"/apache_atlas\"", "modifier": "public static final", "original_string": "public static final String ATLAS_SERVER_ZK_ROOT_DEFAULT = \"/apache_atlas\";", "type": "String", "var_name": "ATLAS_SERVER_ZK_ROOT_DEFAULT" }, ...
{ "body": "public static boolean isHAEnabled(Configuration configuration) {\n boolean ret = false;\n\n if (configuration.containsKey(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)) {\n ret = configuration.getBoolean(ATLAS_SERVER_HA_ENABLED_KEY);\n } else {\n String[] ids = 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_187
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/hook/AtlasTopicCreatorTest.java", "identifier": "AtlasTopicCreatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCreateTopicIfItDoesNotExist() {\n Configuration configuration = mock(Configuration.class);\n when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)).\n thenReturn(true);\n when(configuration.getString(\"at...
{ "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_312
{ "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_invalidProperty() throws Exception {\n Map<String, Object> properties = new HashMap<>();\n properties.put(\"name\", \"foo\");\n properties.put(\"unknownProperty\", \"value\");\n\n Request req...
{ "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_257
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/query/QueryFactoryTest.java", "identifier": "QueryFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCollectionQuery_TermQuery() throws Exception {\n String queryString = \"name:test_taxonomy\";\n Request request = new CollectionRequest(Collections.<String, Object>emptyMap(), queryString);\n\n QueryFactory factory = new QueryFactory();\n AtlasTaxonomy...
{ "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_191
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/hook/AtlasTopicCreatorTest.java", "identifier": "AtlasTopicCreatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCloseResources() {\n Configuration configuration = mock(Configuration.class);\n when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)).\n thenReturn(true);\n when(configuration.getString(\"atlas.authentic...
{ "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_95
{ "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 testGetOutputsGraph() throws Exception {\n JSONObject results = getOutputsGraph(\"sales_fact\");\n assertNotNull(results);\n System.out.println(\"outputs graph = \" + results);\n\n JSONObject values = results.getJSONObject(\"values\");\n ...
{ "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 getOutputsGraph(String datasetName) throws AtlasException {\n LOG.info(\"Fetching lineage outputs graph for datasetName={}\", datasetName);\n datasetName = ParamChecker.notEmpty(datasetName, \"dataset name\");\n TypeUtils.Pair<String,...
{ "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_200
{ "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 testBackwardCompatibility() throws Exception {\n //Code to generate the json, use it for hard-coded json used later in this test\n Referenceable entity = new Referenceable(\"sometype\");\n entity.set(\"attr\", \"value\");\n HookNotification.EntityCreateReq...
{ "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_129
{ "fields": [ { "declarator": "qualifiedName = \"qualifiedName\"", "modifier": "private final", "original_string": "private final String qualifiedName = \"qualifiedName\";", "type": "String", "var_name": "qualifiedName" }, { "declarator": "lowerCaseCL1 = \"@cl1\"", ...
{ "body": "@Test\n public void transformEntityWithExtInfoNullCheck() throws AtlasBaseException {\n addColumnTransform(transform);\n\n AtlasEntityWithExtInfo entityWithExtInfo = getAtlasEntityWithExtInfo();\n\n entityWithExtInfo.setReferredEntities(null);\n\n AtlasEntityWithExtInfo trans...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ImportTransforms.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ImportTransforms.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public AtlasEntity.AtlasEntityWithExtInfo apply(AtlasEntity.AtlasEntityWithExtInfo entityWithExtInfo) throws AtlasBaseException {\n if (entityWithExtInfo != null) {\n apply(entityWithExtInfo.getEntity());\n\n if(MapUtils.isNotEmpty(entityWithExtInfo.getReferredEntities())) {\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_71
{ "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 testHeaderPresentDefaultConfig_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(AtlasCSRFPreventionFilter.HEADER_DEFAULT)).thenReturn(\"valueUnim...
{ "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_122
{ "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 testSetObjectIdAttrToNull() throws Exception {\n final AtlasEntity dbEntity = TestUtilsV2.createDBEntity();\n final AtlasEntity db2Entity = TestUtilsV2.createDBEntity();\n\n entityStore.createOrUpdate(new AtlasEntityStream(dbEntity), false);\n entityStore...
{ "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_319
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/EntityTagResourceDefinitionTest.java", "identifier": "EntityTagResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testResolveHref() {\n Map<String, Object> resourceProps = new HashMap<>();\n resourceProps.put(\"name\", \"taxonomy1.term1.term11\");\n resourceProps.put(EntityTagResourceDefinition.ENTITY_GUID_PROPERTY, \"11-22-33\");\n\n ResourceDefinition entityTagDefin...
{ "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 resolveHref(Map<String, Object> properties) {\n return String.format(\"v1/entities/%s/tags/%s\", properties.get(ENTITY_GUID_PROPERTY), properties.get(\"name\"));\n }", "class_method_signature": "EntityTagResourceDefinition.resolveHref(Map<String, Object> properties)...
{ "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_26
{ "fields": [ { "declarator": "serviceState", "modifier": "@Mock\n private", "original_string": "@Mock\n private ServiceState serviceState;", "type": "ServiceState", "var_name": "serviceState" } ], "file": "webapp/src/test/java/org/apache/atlas/web/resources/AdminResour...
{ "body": "@Test\n public void testStatusOfActiveServerIsReturned() throws JSONException {\n\n when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.ACTIVE);\n\n AdminResource adminResource = new AdminResource(serviceState, null, null, null, null);\n Response response = admin...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AdminResource.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AdminResource.class);", "type": "Logger", "var_name": "LOG" }, { "declar...
{ "body": "@GET\n @Path(\"status\")\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response getStatus() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"==> AdminResource.getStatus()\");\n }\n\n Response response;\n\n try {\n JSONObject responseData = new JSONOb...
{ "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_175
{ "fields": [ { "declarator": "ATLAS_JAAS_PROP_FILE = \"atlas-jaas.properties\"", "modifier": "private static final", "original_string": "private static final String ATLAS_JAAS_PROP_FILE = \"atlas-jaas.properties\";", "type": "String", "var_name": "ATLAS_JAAS_PROP_FILE" } ], ...
{ "body": "@Test(enabled=false)\n public void testGetAppConfigurationEntryStringForUnknownClient() {\n AppConfigurationEntry[] entries =\n Configuration.getConfiguration().getAppConfigurationEntry(\"UnknownClient\");\n Assert.assertNull(entries);\n }", "class_method_signature": "I...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(InMemoryJAASConfiguration.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(InMemoryJAASConfiguration.class);", "type": "Logger", "var_name": "LOG" ...
{ "body": "@Override\n public AppConfigurationEntry[] getAppConfigurationEntry(String name) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"==> InMemoryJAASConfiguration.getAppConfigurationEntry({})\", name);\n }\n\n AppConfigurationEntry[] ret = null;\n List<AppConfigurationEn...
{ "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_30
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java", "identifier": "TaxonomyServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateTaxonomy() throws Exception {\n MetadataService metadataService = createStrictMock(MetadataService.class);\n AtlasTypeDefStore typeDefStore = createStrictMock(AtlasTypeDefStore.class);\n ResourceProvider taxonomyResourceProvider = createStrictMock(Resou...
{ "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": "@POST\n @Path(\"{taxonomyName}\")\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response createTaxonomy(String body,\n @Context HttpHeaders headers,\n @Context UriInfo ui,\n @PathParam(\"taxonomy...
{ "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_163
{ "fields": [ { "declarator": "typeStore", "modifier": "@Inject\n private", "original_string": "@Inject\n private ITypeStore typeStore;", "type": "ITypeStore", "var_name": "typeStore" }, { "declarator": "typeCache", "modifier": "@Inject\n private", ...
{ "body": "@Test\n public void testGetTraitType() throws Exception {\n ImmutableList<String> traitNames = ts.getTypeNamesByCategory(TypeCategory.TRAIT);\n for (String traitTypeName : traitNames) {\n // Not cached yet\n Assert.assertFalse(typeCache.isCachedInMemory(traitTypeName)...
{ "fields": [ { "declarator": "typeStore", "modifier": "private", "original_string": "private ITypeStore typeStore;", "type": "ITypeStore", "var_name": "typeStore" }, { "declarator": "coreTypes", "modifier": "private", "original_string": "private ImmutableLi...
{ "body": "public boolean isCachedInMemory(String typeName) throws AtlasException {\n return super.has(typeName);\n }", "class_method_signature": "StoreBackedTypeCache.isCachedInMemory(String typeName)", "constructor": false, "full_signature": "public boolean isCachedInMemory(String typeName)", "ide...
{ "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_88
{ "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 testGetInputsGraphInvalidArguments(final String tableName, String expectedException) throws Exception {\n testInvalidArguments(expectedException, new Invoker() {\n @Override\n void run() throws AtlasException {\n lineageSer...
{ "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_67
{ "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 testShouldRedirectDELETERequest() throws IOException, ServletException {\n when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE);\n when(servletRequest.getRequestURI()).thenReturn(\"api/atlas/types\");\n\n ActiveServerFilter activeServe...
{ "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_134
{ "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 verifySystemMixedIndexes() {\n AtlasGraph graph = TestUtils.getGraph();\n AtlasGraphManagement managementSystem = graph.getManagementSystem();\n try {\n AtlasGraphIndex vertexIndex = managementSystem.getGraphIndex(Constants.VERTEX_INDEX);\n ...
{ "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_266
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/VertexWrapperTest.java", "identifier": "VertexWrapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsPropertyRemoved() {\n String testType = \"testType\";\n Vertex v = createMock(Vertex.class);\n expect(v.<String>getProperty(Constants.ENTITY_TYPE_PROPERTY_KEY)).andReturn(testType);\n replay(v);\n\n VertexWrapper vWrapper = new VertexWrapper(v...
{ "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 boolean isPropertyRemoved(String name) {\n return removedProperties.contains(name);\n }", "class_method_signature": "VertexWrapper.isPropertyRemoved(String name)", "constructor": false, "full_signature": "public boolean isPropertyRemoved(String name)", "identifier": "isPropertyRemo...
{ "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_289
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetResourceById_notInitialized_taxonomyAlreadyExists() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(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 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_323
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/TermResourceDefinitionTest.java", "identifier": "TermResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValidate() throws Exception {\n Map<String, Object> properties = new HashMap<>();\n properties.put(\"name\", \"taxonomy1.termName\");\n properties.put(\"description\", \"foo\");\n properties.put(\"available_as_tag\", true);\n properties.put(\"ac...
{ "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 void validateCreatePayload(Request request) throws InvalidPayloadException {\n super.validateCreatePayload(request);\n\n String name = request.getProperty(\"name\");\n // name will be in the fully qualified form: taxonomyName.termName\n if (! name.contains(...
{ "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_231
{ "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 testCacheBulkInsertWithNullType() throws Exception {\n\n List<IDataType> allTypes = new ArrayList<>();\n allTypes.add(null);\n\n // create a new cache instead of using the one setup for every method call\n cache =...
{ "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_118
{ "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(enabled = false)\n //Titan doesn't allow some reserved chars in property keys. Verify that atlas encodes these\n //See GraphHelper.encodePropertyKey()\n //TODO : Failing in typedef creation\n public void testSpecialCharacters() throws Exception {\n //Verify that type can be created...
{ "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_227
{ "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 testGetTypeWithNullCategory() throws Exception {\n\n cache.get(null, CLASSTYPE_CUSTOMER);\n fail(\"Null TypeCategory should be not allowed in 'get'\");\n }", "class_method_signature": "DefaultTypeCacheTest.testGe...
{ "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_270
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TermResourceProviderTest.java", "identifier": "TermResourceProviderTest", "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": "taxonomyResourceProvider", "modifier": "private", "original_string": "private ResourceProvider taxonomyResourceProvider;", "type": "ResourceProvider", "var_name": "taxonomyResourceProvider" }, { "declarator": "entityResourceProvider", ...
{ "body": "public Result getResources(Request request)\n throws InvalidQueryException, ResourceNotFoundException {\n\n TermPath termPath = request.getProperty(\"termPath\");\n String queryString = doQueryStringConversions(termPath, request.getQueryString());\n Request queryRequest = 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_159
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test(dependsOnMethods = \"testCreateEntity\")\n public void testBug37860() throws Exception {\n String dslQuery = \"hive_table as t where name = 'bar' \"\n + \"database where name = 'foo' and description = 'foo database' select t\";\n\n TestUtils.dumpGraph(TestUtils.getGraph())...
{ "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_92
{ "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 testGetInputsGraphForEntity() throws Exception {\n ITypedReferenceableInstance entity =\n repository.getEntityDefinition(HIVE_TABLE_TYPE, \"name\", \"sales_fact_monthly_mv\");\n\n JSONObject results = new JSONObject(lineageService.getInpu...
{ "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 getInputsGraphForEntity(String guid) throws AtlasException {\n LOG.info(\"Fetching lineage inputs graph for entity={}\", guid);\n guid = ParamChecker.notEmpty(guid, \"Entity id\");\n validateDatasetExists(guid);\n return getInp...
{ "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_207
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/notification/entity/EntityNotificationImplTest.java", "identifier": "EntityNotificationImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEquals() throws Exception {\n Referenceable entity = getEntity(\"id\");\n\n EntityNotificationImpl entityNotification2 =\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 boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n EntityNotificationImpl that = (EntityNotificationImpl) o;\n return Objects.equals(entity, that.entity) &&\n operationType ...
{ "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_179
{ "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 shouldGetAdminStatus() throws AtlasServiceException {\n setupRetryParams();\n\n AtlasClient atlasClient = new AtlasClient(service, configuration);\n\n WebResource.Builder builder = setupBuilder(AtlasClient.API.STATUS, service);\n ClientResponse response = ...
{ "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_196
{ "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 testFailedMessageIsNotLoggedIfNotRequired() throws NotificationException {\n List<HookNotification.HookNotificationMessage> hookNotificationMessages = new ArrayList<>();\n doThrow(new NotificationException(new Exception(), Arrays.asList(\"test message\")))\n ...
{ "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_315
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/EntityResourceDefinitionTest.java", "identifier": "EntityResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testResolveHref() {\n Map<String, Object> resourceProps = new HashMap<>();\n resourceProps.put(\"id\", \"111-222-333\");\n resourceProps.put(\"name\", \"foo\");\n\n ResourceDefinition entityDefinition = new EntityResourceDefinition();\n String href ...
{ "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 String resolveHref(Map<String, Object> properties) {\n Object id = properties.get(\"id\");\n return id == null ? null : String.format(\"v1/entities/%s\", id);\n }", "class_method_signature": "EntityResourceDefinition.resolveHref(Map<String, Object> properties)", "...
{ "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_250
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/query/AlwaysQueryExpressionTest.java", "identifier": "AlwaysQueryExpressionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEvaluate() {\n VertexWrapper v = createStrictMock(VertexWrapper.class);\n replay(v);\n QueryExpression expression = new AlwaysQueryExpression();\n // always returns true\n assertTrue(expression.evaluate(v));\n verify(v);\n }", "class...
{ "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 boolean evaluate(VertexWrapper vWrapper) {\n return ! negate;\n }", "class_method_signature": "AlwaysQueryExpression.evaluate(VertexWrapper vWrapper)", "constructor": false, "full_signature": "@Override public boolean evaluate(VertexWrapper vWrapper)", "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_180
{ "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 shouldReturnStatusAsUnknownIfJSONIsInvalid() throws AtlasServiceException {\n setupRetryParams();\n AtlasClient atlasClient = new AtlasClient(service, configuration);\n\n WebResource.Builder builder = setupBuilder(AtlasClient.API.STATUS, service);\n Client...
{ "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_303
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/DefaultPropertyMapperTest.java", "identifier": "DefaultPropertyMapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToCleanName_defaultMappings() {\n String typeName = \"testType\";\n HierarchicalType dataType = createNiceMock(HierarchicalType.class);\n\n // currently only use key in map\n Map<String, AttributeInfo> fields = new HashMap<>();\n fields.put(\"fo...
{ "fields": [ { "declarator": "typeInstances = new HashMap<>()", "modifier": "private", "original_string": "private Map<String, HierarchicalType> typeInstances = new HashMap<>();", "type": "Map<String, HierarchicalType>", "var_name": "typeInstances" }, { "declarator": "...
{ "body": "@Override\n public String toCleanName(String propName, String type) {\n HierarchicalType dataType = getDataType(type);\n String replacement = m_qualifiedToCleanMap.get(propName);\n if (replacement == null && dataType != null) {\n FieldMapping fieldMap = dataType.fieldMapp...
{ "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_246
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityResourceProviderTest.java", "identifier": "EntityResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = UnsupportedOperationException.class)\n public void testCreateResource() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = crea...
{ "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 void createResource(Request request)\n throws InvalidPayloadException, ResourceAlreadyExistsException, ResourceNotFoundException {\n\n // creation of entities is currently unsupported\n throw new UnsupportedOperationException(\"Creation of entities is not curr...
{ "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_138
{ "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 testSubmitEntity() throws Exception {\n ITypedReferenceableInstance hrDept = TestUtils.createDeptEg1(typeSystem);\n\n List<String> guids = repositoryService.createEntities(hrDept).getCreatedEntities();\n Assert.assertNotNull(guids);\n Assert.assertEquals(g...
{ "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_1
{ "fields": [ { "declarator": "typeRegistry = new AtlasTypeRegistry()", "modifier": "private", "original_string": "private AtlasTypeRegistry typeRegistry = new AtlasTypeRegistry();", "type": "AtlasTypeRegistry", "var_name": "typeRegistry" }, { "declarator": "EMPLOYEE_TY...
{ "body": "@Test\n public void testvalidateAtlasRelationshipDef() throws AtlasBaseException {\n AtlasRelationshipEndDef ep_single = new AtlasRelationshipEndDef(\"typeA\", \"attr1\", AtlasStructDef.AtlasAttributeDef.Cardinality.SINGLE);\n AtlasRelationshipEndDef ep_single_container = new AtlasRelation...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasRelationshipType.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasRelationshipType.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "public static void validateAtlasRelationshipDef(AtlasRelationshipDef relationshipDef) throws AtlasBaseException {\n\n AtlasRelationshipEndDef endDef1 = relationshipDef.getEndDef1();\n AtlasRelationshipEndDef endDef2 = relationshipDef.getEndDef2();\n Relationsh...
{ "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_84
{ "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 shouldReleaseLockOnException() 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.ATLAS_SERVER_HA_ZK...
{ "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_211
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/notification/MessageVersionTest.java", "identifier": "MessageVersionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetVersionParts() throws Exception {\n\n MessageVersion version = new MessageVersion(\"1.0.0\");\n assertTrue(Arrays.equals(new Integer[]{1}, version.getVersionParts()));\n\n version = new MessageVersion(\"1.0\");\n assertTrue(Arrays.equals(new Integer...
{ "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": "protected Integer[] getVersionParts() {\n\n String[] sParts = version.split(\"\\\\.\");\n ArrayList<Integer> iParts = new ArrayList<>();\n int trailingZeros = 0;\n\n for (String sPart : sParts) {\n Integer iPart = new Integer(sPart);\n\n if (iPart == 0) {\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_143
{ "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 testGetEntityDefinitionNonExistent() throws Exception {\n repositoryService.getEntityDefinition(\"blah\");\n Assert.fail();\n }", "class_method_signature": "GraphBackedMetadataRepositoryTest.testGetEntityDefinitio...
{ "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 ITypedReferenceableInstance getEntityDefinition(String guid) throws RepositoryException, EntityNotFoundException {\n return getEntityDefinitions(guid).get(0);\n }", "class_method_signature": "GraphBackedMetadataRepository.getEntityDefinition(String g...
{ "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_10
{ "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 testArrayTypeDefaultValue() {\n Collection defValue = intArrayType.createDefaultValue();\n\n assertEquals(defValue.size(), 1);\n }", "class_method_signature": "TestAtlasArrayType.testArrayTypeDefaultValue()", "constructor": false, "full_signature": "@Test publi...
{ "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<?> createDefaultValue() {\n Collection<Object> ret = new ArrayList<>();\n\n ret.add(elementType.createDefaultValue());\n\n if (minCount != COUNT_NOT_SET) {\n for (int i = 1; i < minCount; i++) {\n ret.add(elementType.createDefa...
{ "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_285
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityTagResourceProviderTest.java", "identifier": "EntityTagResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeleteResourceById() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n\n // mock expectations\n typeSystem.deleteTag(\"1\", \"taxonomyName.termName\");\n replay(typeSystem);\n\n Map<String, Object> requ...
{ "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 void deleteResourceById(Request request) throws ResourceNotFoundException, InvalidPayloadException {\n typeSystem.deleteTag(request.<String>getProperty(\"id\"), request.<String>getProperty(\"name\"));\n }", "class_method_signature": "EntityTagResourceProvider.deleteResourc...
{ "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_114
{ "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 testArrayOfStructs() throws Exception {\n //Modify array of structs\n AtlasEntity tableEntity = new AtlasEntity(tblEntity.getEntity());\n AtlasEntitiesWithExtInfo entitiesInfo = new AtlasEntitiesWithExtInfo(tableEn...
{ "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_47
{ "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 testPassiveStateSetOnLoosingLeadership() {\n ActiveInstanceElectorService activeInstanceElectorService =\n new ActiveInstanceElectorService(configuration, new HashSet<ActiveStateChangeHandler>(),\n curatorFactory, activeInstanceState, serv...
{ "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 notLeader() {\n LOG.warn(\"Server instance with server id {} is removed as leader\", serverId);\n serviceState.becomingPassive();\n for (ActiveStateChangeHandler handler: activeStateChangeHandlers) {\n try {\n handler.instanceIsPassi...
{ "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_102
{ "fields": [ { "declarator": "mockConfig = mock(Configuration.class)", "modifier": "private", "original_string": "private Configuration mockConfig = mock(Configuration.class);", "type": "Configuration", "var_name": "mockConfig" }, { "declarator": "mockTypeRegistry = mo...
{ "body": "@Test\n public void testGetMetrics() throws InterruptedException, AtlasBaseException {\n assertNotNull(metricsService);\n AtlasMetrics metrics = metricsService.getMetrics(false);\n assertNotNull(metrics);\n Number aCount = metrics.getMetric(\"entity\", \"a\");\n assert...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(MetricsService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(MetricsService.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "@SuppressWarnings(\"unchecked\")\n public AtlasMetrics getMetrics(boolean ignoreCache) {\n if (ignoreCache || !isCacheValid()) {\n AtlasMetrics metrics = new AtlasMetrics();\n\n for (MetricQuery metricQuery : MetricQuery.values()) {\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_51
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/service/AtlasZookeeperSecurityPropertiesTest.java", "identifier": "AtlasZookeeperSecurityPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void idsWithColonsAreValid() {\n ACL acl = AtlasZookeeperSecurityProperties.parseAcl(\"auth:user:password\");\n assertEquals(acl.getId().getScheme(), \"auth\");\n assertEquals(acl.getId().getId(), \"user:password\");\n }", "class_method_signature": "AtlasZookeepe...
{ "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_155
{ "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\", expectedExceptions = RepositoryException.class)\n public void testAddTraitForBadEntity() throws Exception {\n TraitType traitType = typeSystem.getDataType(TraitType.class, TestUtils.PII);\n ITypedStruct traitInstance = traitType.createInstance();\...
{ "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 addTrait(List<String> entityGuids, ITypedStruct traitInstance) throws RepositoryException {\n Preconditions.checkNotNull(entityGuids, \"entityGuids list cannot be null\");\n Preconditions.checkNotNull(traitInstance, \"Trait instance cannot be ...
{ "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_293
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = InvalidPayloadException.class)\n public void testCreateResource_invalidRequest__noName() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQ...
{ "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 createResource(Request request)\n throws InvalidPayloadException, ResourceAlreadyExistsException {\n\n // not checking for default taxonomy in create per requirements\n resourceDefinition.validateCreatePayload(request);\n synchronized (TaxonomyReso...
{ "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_292
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "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": "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_154
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test(expectedExceptions = NullPointerException.class)\n public void testAddTraitWithNullInstance() throws Exception {\n repositoryService.addTrait(getGUID(), null);\n Assert.fail();\n }", "class_method_signature": "GraphBackedMetadataRepositoryTest.testAddTraitWithNullInstance()", ...
{ "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 addTrait(List<String> entityGuids, ITypedStruct traitInstance) throws RepositoryException {\n Preconditions.checkNotNull(entityGuids, \"entityGuids list cannot be null\");\n Preconditions.checkNotNull(traitInstance, \"Trait instance cannot be ...
{ "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_50
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/service/AtlasZookeeperSecurityPropertiesTest.java", "identifier": "AtlasZookeeperSecurityPropertiesTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void shouldThrowExceptionForInvalidAclString() {\n ACL acl = AtlasZookeeperSecurityProperties.parseAcl(\"randomAcl\");\n fail(\"Should have thrown exception for null ACL string\");\n }", "class_method_signature": "Atl...
{ "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_103
{ "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(priority = 1)\n public void testGet() {\n try {\n AtlasTypesDef typesDef = typeDefStore.searchTypesDef(new SearchFilter());\n assertNotNull(typesDef.getEnumDefs());\n assertEquals(typesDef.getStructDefs().size(), 0);\n assertNotNull(typesDef.getSt...
{ "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 public AtlasTypesDef searchTypesDef(SearchFilter searchFilter) throws AtlasBaseException {\n final AtlasTypesDef typesDef = new AtlasTypesDef();\n Predicate searchPredicates = FilterUtil.getPredicateFromSearchFilter(searchFilter);\n\n for(AtlasEnumType enumType : typeReg...
{ "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_46
{ "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 testActiveStateSetOnBecomingLeader() {\n ActiveInstanceElectorService activeInstanceElectorService =\n new ActiveInstanceElectorService(configuration, new HashSet<ActiveStateChangeHandler>(),\n curatorFactory, activeInstanceState, serviceS...
{ "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 isLeader() {\n LOG.warn(\"Server instance with server id {} is elected as leader\", serverId);\n serviceState.becomingActive();\n try {\n for (ActiveStateChangeHandler handler : activeStateChangeHandlers) {\n handler.instanceIsActive...
{ "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_115
{ "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 testStructs() throws Exception {\n AtlasEntity databaseEntity = dbEntity.getEntity();\n AtlasEntity tableEntity = new AtlasEntity(tblEntity.getEntity());\n AtlasEntitiesWithExtInfo entitiesInfo = n...
{ "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_11
{ "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 testArrayTypeIsValidValue() {\n for (Object value : validValues) {\n assertTrue(intArrayType.isValidValue(value), \"value=\" + value);\n }\n\n for (Object value : invalidValues) {\n assertFalse(intArrayType.isValidValue(value), \"value=\" + ...
{ "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 isValidValue(Object obj) {\n if (obj != null) {\n if (obj instanceof List || obj instanceof Set) {\n Collection objList = (Collection) obj;\n\n if (!isValidElementCount(objList.size())) {\n return false;\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_284
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityTagResourceProviderTest.java", "identifier": "EntityTagResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateResources() throws Exception {\n AtlasTypeSystem typeSystem = createMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery entityQuery = createMock(AtlasQuery.class);\n ResourceProvider termR...
{ "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 Collection<String> createResources(Request request)\n throws InvalidQueryException, ResourceNotFoundException, ResourceAlreadyExistsException {\n\n Collection<String> relativeUrls = new ArrayList<>();\n AtlasQuery atlasQuery = queryFactory.createEntityQuery(re...
{ "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_142
{ "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 testGetEntityDefinitionForDepartment() throws Exception {\n ITypedReferenceableInstance entity = repositoryService.getEntityDefinition(guid);\n Assert.assertNotNull(entity);\n\n //entity state should be active by default\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 ITypedReferenceableInstance getEntityDefinition(String guid) throws RepositoryException, EntityNotFoundException {\n return getEntityDefinitions(guid).get(0);\n }", "class_method_signature": "GraphBackedMetadataRepository.getEntityDefinition(String g...
{ "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_0
{ "fields": [ { "declarator": "TEST_DB_NAME = \"default\"", "modifier": "private static final", "original_string": "private static final String TEST_DB_NAME = \"default\";", "type": "String", "var_name": "TEST_DB_NAME" }, { "declarator": "CLUSTER_NAME = \"primary\"", ...
{ "body": "@Test\n public void testImportThatUpdatesRegisteredDatabase() throws Exception {\n // setup database\n when(hiveClient.getAllDatabases()).thenReturn(Arrays.asList(new String[]{TEST_DB_NAME}));\n String description = \"This is a default database\";\n when(hiveClient.getDatabas...
{ "fields": [ { "declarator": "DEFAULT_DGI_URL = \"http://localhost:21000/\"", "modifier": "private static final", "original_string": "private static final String DEFAULT_DGI_URL = \"http://localhost:21000/\";", "type": "String", "var_name": "DEFAULT_DGI_URL" }, { "decl...
{ "body": "void importHiveMetadata(boolean failOnError) throws Exception {\n LOG.info(\"Importing hive metadata\");\n importDatabases(failOnError);\n }", "class_method_signature": "HiveMetaStoreBridge.importHiveMetadata(boolean failOnError)", "constructor": false, "full_signature": " void impor...
{ "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_85
{ "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 shouldCreateSetupInProgressNode() 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.ATLAS_SERVER_HA...
{ "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" }