id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
35204049_79
{ "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 testAuditWithExcludedOperation() throws IOException, ServletException {\n AtlasRepositoryConfiguration.resetExcludedOperations();\n when(configuration.getStringArray(AtlasRepositoryConfiguration.AUDIT_EXCLUDED_OPERATIONS)).thenReturn(new String[]{\"GET:Version\", \"GET:...
{ "fields": [ { "declarator": "AUDIT_LOG = LoggerFactory.getLogger(\"AUDIT\")", "modifier": "private static final", "original_string": "private static final Logger AUDIT_LOG = LoggerFactory.getLogger(\"AUDIT\");", "type": "Logger", "var_name": "AUDIT_LOG" }, { "declarat...
{ "body": "@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)\n throws IOException, ServletException {\n final String requestTimeISO9601 = DateTimeHelper.formatDateUTC(new Date());\n final HttpServletRequest httpRequest = (HttpServletRequest...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_96
{ "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 testGetOutputsGraphForEntity() throws Exception {\n ITypedReferenceableInstance entity =\n repository.getEntityDefinition(HIVE_TABLE_TYPE, \"name\", \"sales_fact\");\n\n JSONObject results = new JSONObject(lineageService.getOutputsGraphFo...
{ "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 getOutputsGraphForEntity(String guid) throws AtlasException {\n LOG.info(\"Fetching lineage outputs graph for entity guid={}\", guid);\n guid = ParamChecker.notEmpty(guid, \"Entity id\");\n validateDatasetExists(guid);\n return...
{ "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_331
{ "fields": [ { "declarator": "storeManager", "modifier": "@Mock", "original_string": "@Mock\n HBaseStoreManager storeManager;", "type": "HBaseStoreManager", "var_name": "storeManager" }, { "declarator": "connectionMask", "modifier": "@Mock", "original_st...
{ "body": "@Test(expectedExceptions = PermanentLockingException.class)\n public void shouldThrowExceptionAfterConfiguredRetriesIfLockMediationFails() throws BackendException {\n when(storeManager.getMetaDataSchema(\"hbase\")).thenReturn(new EntryMetaData[] {EntryMetaData.TIMESTAMP});\n when(storeMana...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(HBaseKeyColumnValueStore.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(HBaseKeyColumnValueStore.class);", "type": "Logger", "var_name": "log...
{ "body": "@Override\n public void acquireLock(StaticBuffer key,\n StaticBuffer column,\n StaticBuffer expectedValue,\n StoreTransaction txh) throws BackendException {\n\n KeyColumn lockID = new KeyColumn(key, column);\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_274
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TermResourceProviderTest.java", "identifier": "TermResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = UnsupportedOperationException.class)\n public void testCreateResources() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n\n // mock expectations...
{ "fields": [ { "declarator": "taxonomyResourceProvider", "modifier": "private", "original_string": "private ResourceProvider taxonomyResourceProvider;", "type": "ResourceProvider", "var_name": "taxonomyResourceProvider" }, { "declarator": "entityResourceProvider", ...
{ "body": "@Override\n public Collection<String> createResources(Request request) throws InvalidQueryException, ResourceNotFoundException {\n throw new UnsupportedOperationException(\"Creating multiple Terms in a request is not currently supported\");\n }", "class_method_signature": "TermResourceProvid...
{ "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_223
{ "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 testCacheHasTypeByCategory() throws Exception {\n\n assertTrue(cache.has(TypeCategory.CLASS, CLASSTYPE_CUSTOMER));\n assertTrue(cache.has(TypeCategory.STRUCT, STRUCTTYPE_ADDRESS));\n assertTrue(cache.has(TypeCategory.TRAIT, TRAITTYPE_PRIVILEGED));\n assert...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DefaultTypeCache.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DefaultTypeCache.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "@Override\n public boolean has(String typeName) throws AtlasException {\n\n return types_.containsKey(typeName);\n }", "class_method_signature": "DefaultTypeCache.has(String typeName)", "constructor": false, "full_signature": "@Override public boolean has(String typeName)", "identifier...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_59
{ "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 testShouldReturnActiveServerAddress() throws Exception {\n when(curatorFactory.clientInstance()).thenReturn(curatorFramework);\n when(configuration.getString(\n HAConfiguration.ATLAS_SERVER_HA_ZK_ROOT_KEY, HAConfiguration.ATLAS_SERVER_ZK_ROOT_DEFAULT)).\n...
{ "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_235
{ "fields": [], "file": "authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyUtilTest.java", "identifier": "PolicyUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreatePermissionMap() {\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_327
{ "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_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/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_262
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/VertexWrapperTest.java", "identifier": "VertexWrapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetVertex() {\n Vertex v = createStrictMock(Vertex.class);\n ResourceDefinition resourceDefinition = createStrictMock(ResourceDefinition.class);\n\n // just return null for these because they aren't used in this test\n expect(resourceDefinition.getProp...
{ "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 Vertex getVertex() {\n return vertex;\n }", "class_method_signature": "VertexWrapper.getVertex()", "constructor": false, "full_signature": "public Vertex getVertex()", "identifier": "getVertex", "invocations": [], "modifiers": "public", "parameters": "()", "return": "Vertex...
{ "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_18
{ "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 testEntityTypeDefaultValue() {\n AtlasEntity defValue = entityType.createDefaultValue();\n\n assertNotNull(defValue);\n assertEquals(defValue.getTypeName(), entityType.getTypeName());\n }", "class_method_signature": "TestAtlasEntityType.testEntityTypeDefault...
{ "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 AtlasEntity createDefaultValue() {\n AtlasEntity ret = new AtlasEntity(entityDef.getName());\n\n populateDefaultValues(ret);\n\n return ret;\n }", "class_method_signature": "AtlasEntityType.createDefaultValue()", "constructor": false, "full_signature": "@...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_130
{ "fields": [], "file": "repository/src/test/java/org/apache/atlas/repository/impexp/ImportTransformerTest.java", "identifier": "ImportTransformerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void createWithCorrectParameters() throws AtlasBaseException, IllegalAccessException {\n String param1 = \"@cl1\";\n String param2 = \"@cl2\";\n\n ImportTransformer e = ImportTransformer.getTransformer(String.format(\"%s:%s:%s\", \"replace\", param1, param2));\n\n ...
{ "fields": [ { "declarator": "TRANSFORMER_PARAMETER_SEPARATOR = \"\\\\:\"", "modifier": "private static final", "original_string": "private static final String TRANSFORMER_PARAMETER_SEPARATOR = \"\\\\:\";", "type": "String", "var_name": "TRANSFORMER_PARAMETER_SEPARATOR" }, {...
{ "body": "public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException {\n String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR);\n String key = (params == null || params.length < 1) ? transformerSpec : params[0];\n\n final...
{ "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_219
{ "fields": [], "file": "typesystem/src/test/java/org/apache/atlas/typesystem/types/HierarchicalTypeDependencySorterTest.java", "identifier": "HierarchicalTypeDependencySorterTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressWarnings(\"rawtypes\")\n @Test\n public void testLargerModel() throws Exception {\n TypeSystem ts = TypeSystem.getInstance();\n HierarchicalType testObjectType = new ClassType(ts, \"TestObject\", null, ImmutableSet.<String>of(), 0);\n HierarchicalType testDataSetType = n...
{ "fields": [], "file": "typesystem/src/main/java/org/apache/atlas/typesystem/types/HierarchicalTypeDependencySorter.java", "identifier": "HierarchicalTypeDependencySorter", "interfaces": "", "methods": [ { "class_method_signature": "HierarchicalTypeDependencySorter.sortTypes(List<T> types)", ...
{ "body": "public static <T extends HierarchicalType> List<T> sortTypes(List<T> types) {\n Map<String, T> typesByName = new HashMap<>();\n for (T type : types) {\n typesByName.put(type.name, type);\n }\n List<T> result = new ArrayList<>(types.size());\n Set<T> processed =...
{ "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_63
{ "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 testShouldRedirectRequestToActiveServerAddress() throws IOException, ServletException {\n when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE);\n when(servletRequest.getRequestURI()).thenReturn(\"api/atlas/types\");\n\n ActiveServerFil...
{ "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_9
{ "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 testMapTypeValidateValue() {\n List<String> messages = new ArrayList<>();\n for (Object value : validValues) {\n assertTrue(intIntMapType.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 Map) {\n Map<Object, Objects> map = (Map<Object, Objects>) obj;\n\n for (Map.Entry e : ma...
{ "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_188
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/hook/AtlasTopicCreatorTest.java", "identifier": "AtlasTopicCreatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotFailIfExceptionOccursDuringCreatingTopic() {\n Configuration configuration = mock(Configuration.class);\n when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)).\n thenReturn(true);\n when(configuratio...
{ "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_167
{ "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 testIsHAEnabledByLegacyConfiguration() {\n when(configuration.containsKey(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(true);\n when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(Boolean.TRUE);\n\n boolean isHAEnabl...
{ "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_34
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java", "identifier": "TaxonomyServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetSubTerms_instance() throws Exception {\n MetadataService metadataService = createStrictMock(MetadataService.class);\n AtlasTypeDefStore typeDefStore = createStrictMock(AtlasTypeDefStore.class);\n ResourceProvider taxonomyResourceProvider = createStrictMock...
{ "fields": [ { "declarator": "PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\")", "modifier": "private static final", "original_string": "private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\");", "type": "Logger", "var_name": ...
{ "body": "@GET\n @Path(\"{taxonomyName}/terms/{rootTerm}/{remainder:.*}\")\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response getSubTerms(@Context HttpHeaders headers,\n @Context UriInfo ui,\n @PathParam(\"taxonomyName\") String taxonomyName,\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_171
{ "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 testShouldGetZookeeperAcl() {\n when(configuration.getString(HAConfiguration.HA_ZOOKEEPER_ACL)).thenReturn(\"sasl:myclient@EXAMPLE.COM\");\n\n HAConfiguration.ZookeeperProperties zookeeperProperties =\n HAConfiguration.getZookeeperProperties(configuration...
{ "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_258
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/query/QueryFactoryTest.java", "identifier": "QueryFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCollectionQuery_PrefixQuery() throws Exception {\n String queryString = \"name:t*\";\n Request request = new CollectionRequest(Collections.<String, Object>emptyMap(), queryString);\n\n QueryFactory factory = new QueryFactory();\n AtlasTaxonomyQuery que...
{ "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_22
{ "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 testValidConstraints() {\n AtlasTypeRegistry typeRegistry = new AtlasTypeRegistry();\n AtlasTransientTypeRegistry ttr = null;\n boolean commit = false;\n List<AtlasEntityDef> entityDefs = new ArrayList<>()...
{ "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 AtlasAttribute getAttribute(String attributeName) {\n return allAttributes.get(attributeName);\n }", "class_method_signature": "AtlasEntityType.getAttribute(String attributeName)", "constructor": false, "full_signature": "@Override public AtlasAttribute getAttribute(St...
{ "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_126
{ "fields": [], "file": "repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java", "identifier": "ZipSourceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void improperInit_ReturnsNullCreationOrder() throws IOException, AtlasBaseException {\n byte bytes[] = new byte[10];\n ByteArrayInputStream bais = new ByteArrayInputStream(bytes);\n ZipSource zs = new ZipSource(bais);\n List<String> s = zs.getCreationOrder();\n...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ZipSource.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ZipSource.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "...
{ "body": "public List<String> getCreationOrder() throws AtlasBaseException {\n return this.creationOrder;\n }", "class_method_signature": "ZipSource.getCreationOrder()", "constructor": false, "full_signature": "public List<String> getCreationOrder()", "identifier": "getCreationOrder", "invocation...
{ "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_75
{ "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 testMissingHeaderMultipleIgnoreMethodsConfig_badRequest()\n\t\t\tthrows ServletException, IOException {\n\t\t// CSRF has not been sent\n\t\tHttpServletRequest mockReq = Mockito.mock(HttpServletRequest.class);\n\t\tMockito.when(mockReq.getHeader(AtlasCSRFPreventionFilter.HEADER_DEFAULT)...
{ "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_74
{ "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 testMissingHeaderIgnoreGETMethodConfig_goodRequest()\n\t\t\tthrows ServletException, IOException {\n\t\t// CSRF has not been sent\n\t\tHttpServletRequest mockReq = Mockito.mock(HttpServletRequest.class);\n\t\tMockito.when(mockReq.getHeader(AtlasCSRFPreventionFilter.HEADER_DEFAULT)).the...
{ "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_127
{ "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 transformEntityWith2Transforms() throws AtlasBaseException {\n AtlasEntity entity = getHiveTableAtlasEntity();\n String attrValue = (String) entity.getAttribute(qualifiedName);\n\n transform.apply(entity);\n\n assertEquals(entity.getAttribute(quali...
{ "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_259
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/query/QueryFactoryTest.java", "identifier": "QueryFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCollectionQuery_TermRangeQuery() throws Exception {\n String queryString = \"creation_time:[2013-01-01:07:29:00 TO 2017-01-02]\";\n Request request = new CollectionRequest(Collections.<String, Object>emptyMap(), queryString);\n\n QueryFactory factory = new Qu...
{ "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_23
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/notification/NotificationEntityChangeListenerTest.java", "identifier": "NotificationEntityChangeListenerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAllTraitsSuperTraits() throws Exception {\n\n TypeSystem typeSystem = mock(TypeSystem.class);\n\n String traitName = \"MyTrait\";\n IStruct myTrait = new Struct(traitName);\n\n String superTraitName = \"MySuperTrait\";\n\n TraitType traitDef ...
{ "fields": [ { "declarator": "notificationInterface", "modifier": "private final", "original_string": "private final NotificationInterface notificationInterface;", "type": "NotificationInterface", "var_name": "notificationInterface" }, { "declarator": "typeSystem", ...
{ "body": "@VisibleForTesting\n public static List<IStruct> getAllTraits(IReferenceableInstance entityDefinition,\n TypeSystem typeSystem) throws AtlasException {\n List<IStruct> traitInfo = new LinkedList<>();\n for (String traitName : entityDefinition.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_170
{ "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 testShouldReturnListOfAddressesInConfig() {\n when(configuration.getStringArray(HAConfiguration.ATLAS_SERVER_IDS)).thenReturn(TEST_ATLAS_SERVER_IDS_HA);\n when(configuration.getString(HAConfiguration.ATLAS_SERVER_ADDRESS_PREFIX +\"id1\")).thenReturn(\"127.0.0.1:21000\")...
{ "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 List<String> getServerInstances(Configuration configuration) {\n String[] serverIds = configuration.getStringArray(ATLAS_SERVER_IDS);\n List<String> serverInstances = new ArrayList<>(serverIds.length);\n for (String serverId : serverIds) {\n serverInstances.add...
{ "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_35
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java", "identifier": "TaxonomyServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetSubTerms_collection() throws Exception {\n MetadataService metadataService = createStrictMock(MetadataService.class);\n AtlasTypeDefStore typeDefStore = createStrictMock(AtlasTypeDefStore.class);\n ResourceProvider taxonomyResourceProvider = createStrictMo...
{ "fields": [ { "declarator": "PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\")", "modifier": "private static final", "original_string": "private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\");", "type": "Logger", "var_name": ...
{ "body": "@GET\n @Path(\"{taxonomyName}/terms/{rootTerm}/{remainder:.*}\")\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response getSubTerms(@Context HttpHeaders headers,\n @Context UriInfo ui,\n @PathParam(\"taxonomyName\") String taxonomyName,\n ...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_189
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/hook/AtlasTopicCreatorTest.java", "identifier": "AtlasTopicCreatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCreateMultipleTopics() {\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.aut...
{ "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_166
{ "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(dependsOnMethods = \"testStore\")\n public void testRestore() throws Exception {\n TypesDef types = typeStore.restore();\n\n //validate enum\n List<EnumTypeDefinition> enumTypes = types.enumTypesAsJavaList();\n Assert.assertEquals(1, enumTypes.size());\n EnumType...
{ "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 TypesDef restore() throws AtlasException {\n //Get all vertices for type system\n Iterator vertices =\n graph.query().has(Constants.VERTEX_TYPE_PROPERTY_KEY, VERTEX_TYPE).vertices().iterator();\n\n return getTypesFromVertices(...
{ "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_218
{ "fields": [], "file": "typesystem/src/test/java/org/apache/atlas/typesystem/types/HierarchicalTypeDependencySorterTest.java", "identifier": "HierarchicalTypeDependencySorterTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressWarnings(\"rawtypes\")\n @Test\n public void testSimpleModel() throws AtlasException {\n TypeSystem ts = TypeSystem.getInstance();\n HierarchicalType a = new ClassType(ts, \"a\", null, ImmutableSet.<String>of(), 0);\n HierarchicalType b = new ClassType(ts, \"B\", null, I...
{ "fields": [], "file": "typesystem/src/main/java/org/apache/atlas/typesystem/types/HierarchicalTypeDependencySorter.java", "identifier": "HierarchicalTypeDependencySorter", "interfaces": "", "methods": [ { "class_method_signature": "HierarchicalTypeDependencySorter.sortTypes(List<T> types)", ...
{ "body": "public static <T extends HierarchicalType> List<T> sortTypes(List<T> types) {\n Map<String, T> typesByName = new HashMap<>();\n for (T type : types) {\n typesByName.put(type.name, type);\n }\n List<T> result = new ArrayList<>(types.size());\n Set<T> processed =...
{ "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_62
{ "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 testShouldFailIfCannotRetrieveActiveServerAddress() throws IOException, ServletException {\n when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.PASSIVE);\n when(servletRequest.getRequestURI()).thenReturn(\"api/atlas/types\");\n\n ActiveServer...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ActiveServerFilter.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ActiveServerFilter.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Override\n public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,\n FilterChain filterChain) throws IOException, ServletException {\n if (isFilteredURI(servletRequest)) {\n LOG.debug(\"Is a filtered URI: {}. Passing request downstr...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_8
{ "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 testMapTypeGetNormalizedValue() {\n assertNull(intIntMapType.getNormalizedValue(null), \"value=\" + null);\n\n for (Object value : validValues) {\n if (value == null) {\n continue;\n }\n\n Map<Object, Object> normalizedVal...
{ "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> getNormalizedValue(Object obj) {\n if (obj == null) {\n return null;\n }\n\n if (obj instanceof String) {\n obj = AtlasType.fromJson(obj.toString(), Map.class);\n }\n\n if (obj instanceof Map) {\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_131
{ "fields": [], "file": "repository/src/test/java/org/apache/atlas/repository/impexp/ImportTransformerTest.java", "identifier": "ImportTransformerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void createSeveralWithCorrectParameters() throws AtlasBaseException, IllegalAccessException {\n String param1 = \"@cl1\";\n String param2 = \"@cl2\";\n\n ImportTransformer e1 = ImportTransformer.getTransformer(String.format(\"%s:%s:%s\", \"replace\", param1, param2));...
{ "fields": [ { "declarator": "TRANSFORMER_PARAMETER_SEPARATOR = \"\\\\:\"", "modifier": "private static final", "original_string": "private static final String TRANSFORMER_PARAMETER_SEPARATOR = \"\\\\:\";", "type": "String", "var_name": "TRANSFORMER_PARAMETER_SEPARATOR" }, {...
{ "body": "public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException {\n String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR);\n String key = (params == null || params.length < 1) ? transformerSpec : params[0];\n\n final...
{ "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_326
{ "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_missingName() throws Exception {\n Map<String, Object> properties = new HashMap<>();\n properties.put(\"description\", \"foo\");\n\n Request request = new InstanceRequest(properties);\n\n Res...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/definition/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_263
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/VertexWrapperTest.java", "identifier": "VertexWrapperTest", "interfaces": "", "superclass": "" }
{ "body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testGetProperty() {\n String testType = \"testType\";\n String propName = \"propName\";\n String qualifiedPropName = \"Prefix.propName\";\n String propValue = \"val\";\n String formattedValue = \"value\";\n ...
{ "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 <T> T getProperty(String name) {\n T val;\n if (removedProperties.contains(name)) {\n val = null;\n } else {\n val = vertex.getProperty(propertyMapper.toFullyQualifiedName(name, vertexType));\n if (propertyValueFormatters.containsKey(name)) {\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_19
{ "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 testEntityTypeIsValidValue() {\n for (Object value : validValues) {\n assertTrue(entityType.isValidValue(value), \"value=\" + value);\n }\n\n for (Object value : invalidValues) {\n assertFalse(entityType.isValidValue(value), \"value=\" + val...
{ "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 isValidValue(Object obj) {\n if (obj != null) {\n for (AtlasEntityType superType : superTypes) {\n if (!superType.isValidValue(obj)) {\n return false;\n }\n }\n return super.isValidValue(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_234
{ "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 testCacheRemoveByInvalidCategory() throws Exception {\n\n cache.remove(TypeCategory.PRIMITIVE, DataTypes.BOOLEAN_TYPE.getName());\n fail(\"TypeCategory should only be one of TypeCategory.CLASS | ENUM | STRUCT | TRAIT ...
{ "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 remove(String typeName) throws AtlasException {\n\n types_.remove(typeName);\n }", "class_method_signature": "DefaultTypeCache.remove(String typeName)", "constructor": false, "full_signature": "@Override public void remove(String typeName)", "identifier": "remov...
{ "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_222
{ "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 testCacheHasType() throws Exception {\n\n assertTrue(cache.has(CLASSTYPE_CUSTOMER));\n assertTrue(cache.has(STRUCTTYPE_ADDRESS));\n assertTrue(cache.has(TRAITTYPE_PRIVILEGED));\n assertTrue(cache.has(ENUMTYPE_SHIPPING));\n\n assertFalse(cache.has(UN...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DefaultTypeCache.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DefaultTypeCache.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "@Override\n public boolean has(String typeName) throws AtlasException {\n\n return types_.containsKey(typeName);\n }", "class_method_signature": "DefaultTypeCache.has(String typeName)", "constructor": false, "full_signature": "@Override public boolean has(String typeName)", "identifier...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_58
{ "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 testDataIsUpdatedWithAtlasServerAddress() throws Exception {\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, HAConf...
{ "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_330
{ "fields": [ { "declarator": "storeManager", "modifier": "@Mock", "original_string": "@Mock\n HBaseStoreManager storeManager;", "type": "HBaseStoreManager", "var_name": "storeManager" }, { "declarator": "connectionMask", "modifier": "@Mock", "original_st...
{ "body": "@Test\n public void shouldRetryRightNumberOfTimesIfLockMediationFails() throws BackendException {\n when(storeManager.getMetaDataSchema(\"hbase\")).thenReturn(new EntryMetaData[] {EntryMetaData.TIMESTAMP});\n when(storeManager.getStorageConfig()).thenReturn(storageConfig);\n when(st...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(HBaseKeyColumnValueStore.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(HBaseKeyColumnValueStore.class);", "type": "Logger", "var_name": "log...
{ "body": "@Override\n public void acquireLock(StaticBuffer key,\n StaticBuffer column,\n StaticBuffer expectedValue,\n StoreTransaction txh) throws BackendException {\n\n KeyColumn lockID = new KeyColumn(key, column);\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_275
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TermResourceProviderTest.java", "identifier": "TermResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeleteResourceById() throws Exception {\n ResourceProvider taxonomyResourceProvider = createStrictMock(ResourceProvider.class);\n ResourceProvider entityResourceProvider = createStrictMock(ResourceProvider.class);\n ResourceProvider entityTagResourceProvider ...
{ "fields": [ { "declarator": "taxonomyResourceProvider", "modifier": "private", "original_string": "private ResourceProvider taxonomyResourceProvider;", "type": "ResourceProvider", "var_name": "taxonomyResourceProvider" }, { "declarator": "entityResourceProvider", ...
{ "body": "@Override\n public void deleteResourceById(Request request) throws ResourceNotFoundException, InvalidPayloadException {\n // will result in expected ResourceNotFoundException if term doesn't exist\n getResourceById(request);\n\n TermPath termPath = (TermPath) request.getQueryPropert...
{ "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_202
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/notification/VersionedMessageTest.java", "identifier": "VersionedMessageTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetMessage() throws Exception {\n String message = \"a\";\n MessageVersion version = new MessageVersion(\"1.0.0\");\n VersionedMessage<String> versionedMessage = new VersionedMessage<>(version, message);\n assertEquals(versionedMessage.getMessage(), me...
{ "fields": [ { "declarator": "version", "modifier": "private final", "original_string": "private final MessageVersion version;", "type": "MessageVersion", "var_name": "version" }, { "declarator": "message", "modifier": "private final", "original_string": "p...
{ "body": "public T getMessage() {\n return message;\n }", "class_method_signature": "VersionedMessage.getMessage()", "constructor": false, "full_signature": "public T getMessage()", "identifier": "getMessage", "invocations": [], "modifiers": "public", "parameters": "()", "return": "T", "s...
{ "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_78
{ "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 testAudit() throws IOException, ServletException {\n AtlasRepositoryConfiguration.resetExcludedOperations();\n when(servletRequest.getRequestURL()).thenReturn(new StringBuffer(\"api/atlas/types\"));\n when(servletRequest.getMethod()).thenReturn(\"GET\");\n ...
{ "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": "public static void audit(String who, String fromAddress, String whatRequest, String fromHost, String whatURL, String whatAddrs,\n String whenISO9601) {\n AUDIT_LOG.info(\"Audit: {}/{}-{} performed request {} {} ({}) at time {}\", who, fromAddress, fromHost, whatRequest, whatURL,\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_97
{ "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 testGetSchema(String tableName, String expected) throws Exception {\n JSONObject results = getSchema(tableName);\n assertNotNull(results);\n System.out.println(\"columns = \" + results);\n\n JSONArray rows = results.getJSONArray(\"rows\");...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(DataSetLineageService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(DataSetLineageService.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Override\n @GraphTransaction\n public String getSchema(String datasetName) throws AtlasException {\n datasetName = ParamChecker.notEmpty(datasetName, \"table name\");\n LOG.info(\"Fetching schema for tableName={}\", datasetName);\n TypeUtils.Pair<String, String> typeIdPair = val...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_193
{ "fields": [ { "declarator": "notificationInterface", "modifier": "@Mock\n private", "original_string": "@Mock\n private NotificationInterface notificationInterface;", "type": "NotificationInterface", "var_name": "notificationInterface" }, { "declarator": "failed...
{ "body": "@Test (timeOut = 10000)\n public void testNotifyEntitiesDoesNotHangOnException() throws Exception {\n List<HookNotification.HookNotificationMessage> hookNotificationMessages = new ArrayList<>();\n doThrow(new NotificationException(new Exception())).when(notificationInterface)\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_255
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/query/QueryFactoryTest.java", "identifier": "QueryFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateEntityQuery() throws Exception {\n Map<String, Object> requestProps = new HashMap<>();\n requestProps.put(\"id\", \"foo\");\n Request request = new InstanceRequest(requestProps);\n\n QueryFactory factory = new QueryFactory();\n AtlasEntity...
{ "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 createEntityQuery(Request request) throws InvalidQueryException {\n ResourceDefinition entityDefinition = new EntityResourceDefinition();\n QueryExpression queryExpression = create(request, entityDefinition);\n return new AtlasEntityQuery(queryExpression, entityDefini...
{ "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_310
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/TaxonomyResourceDefinitionTest.java", "identifier": "TaxonomyResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValidate() throws Exception {\n Map<String, Object> properties = new HashMap<>();\n properties.put(\"name\", \"taxonomyName\");\n properties.put(\"description\", \"foo\");\n\n Request request = new InstanceRequest(properties);\n\n ResourceDefini...
{ "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_185
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/hook/AtlasTopicCreatorTest.java", "identifier": "AtlasTopicCreatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotCreateAtlasTopicIfNotConfiguredToDoSo() {\n\n Configuration configuration = mock(Configuration.class);\n when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)).\n thenReturn(false);\n when(configuratio...
{ "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_243
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityResourceProviderTest.java", "identifier": "EntityResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = ResourceNotFoundException.class)\n public void testGetResource_404() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createS...
{ "fields": [], "file": "catalog/src/main/java/org/apache/atlas/catalog/EntityResourceProvider.java", "identifier": "EntityResourceProvider", "interfaces": "implements ResourceProvider", "methods": [ { "class_method_signature": "EntityResourceProvider.EntityResourceProvider(AtlasTypeSystem typeSyste...
{ "body": "@Override\n public Result getResourceById(Request request) throws ResourceNotFoundException {\n AtlasQuery atlasQuery;\n try {\n atlasQuery = queryFactory.createEntityQuery(request);\n } catch (InvalidQueryException e) {\n throw new CatalogRuntimeException(\"Un...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_39
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java", "identifier": "TaxonomyServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeleteSubTerm() throws Exception {\n MetadataService metadataService = createStrictMock(MetadataService.class);\n AtlasTypeDefStore typeDefStore = createStrictMock(AtlasTypeDefStore.class);\n ResourceProvider taxonomyResourceProvider = createStrictMock(Resour...
{ "fields": [ { "declarator": "PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\")", "modifier": "private static final", "original_string": "private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger(\"rest.TaxonomyService\");", "type": "Logger", "var_name": ...
{ "body": "@DELETE\n @Path(\"{taxonomyName}/terms/{termName}/{remainder:.*}\")\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response deleteSubTerm(@Context HttpHeaders headers,\n @Context UriInfo ui,\n @PathParam(\"taxonomyName\") String tax...
{ "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_306
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/DefaultPropertyMapperTest.java", "identifier": "DefaultPropertyMapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToQualifiedName_specifiedMappings() 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_214
{ "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 testIsRegistered() throws Exception {\n getTypeSystem().defineEnumType(\"enum_test\", new EnumValue(\"0\", 0), new EnumValue(\"1\", 1), new EnumValue(\"2\", 2),\n new EnumValue(\"3\", 3));\n assertTrue(getTypeSystem().isRegistered(\"enum_test\"));\n }"...
{ "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 boolean isRegistered(String typeName) throws AtlasException {\n return isCoreType(typeName) || typeCache.has(typeName);\n }", "class_method_signature": "TypeSystem.isRegistered(String typeName)", "constructor": false, "full_signature": "public boolean isRegistered(String typeName)", ...
{ "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_4
{ "fields": [ { "declarator": "classificationType", "modifier": "private final", "original_string": "private final AtlasClassificationType classificationType;", "type": "AtlasClassificationType", "var_name": "classificationType" }, { "declarator": "validValues = ...
{ "body": "@Test\n public void testClassificationTypeGetNormalizedValue() {\n assertNull(classificationType.getNormalizedValue(null), \"value=\" + null);\n\n for (Object value : validValues) {\n if (value == null) {\n continue;\n }\n\n Object normalized...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(AtlasClassificationType.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(AtlasClassificationType.class);", "type": "Logger", "var_name": "LOG" },...
{ "body": "@Override\n public Object getNormalizedValue(Object obj) {\n Object ret = null;\n\n if (obj != null) {\n if (isValidValue(obj)) {\n if (obj instanceof AtlasClassification) {\n normalizeAttributeValues((AtlasClassification) obj);\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_81
{ "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 testNullConfig() {\n AtlasRepositoryConfiguration.resetExcludedOperations();\n AuditFilter auditFilter = new AuditFilter();\n assertFalse(auditFilter.isOperationExcludedFromAudit(\"GET\", \"Version\", null));\n }", "class_method_signature": "AuditFilterTest....
{ "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_146
{ "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 testGetTraitLabel() throws Exception {\n Assert.assertEquals(\n repositoryService.getTraitLabel(typeSystem.getDataType(ClassType.class, TestUtils.TABLE_TYPE),\n TestUtils.CLASSIFICATION), TestUtils....
{ "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 public String getTraitLabel(IDataType<?> dataType, String traitName) {\n return GraphHelper.getTraitLabel(dataType.getName(), traitName);\n }", "class_method_signature": "GraphBackedMetadataRepository.getTraitLabel(IDataType<?> dataType, String traitName)", "constructor": false...
{ "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_280
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityTagResourceProviderTest.java", "identifier": "EntityTagResourceProviderTest", "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": "termResourceProvider", "modifier": "private", "original_string": "private TermResourceProvider termResourceProvider;", "type": "TermResourceProvider", "var_name": "termResourceProvider" } ], "file": "catalog/src/main/java/org/apache/atlas/catalo...
{ "body": "@Override\n public Result getResources(Request request) throws InvalidQueryException, ResourceNotFoundException {\n AtlasQuery atlasQuery = queryFactory.createEntityTagQuery(request);\n return new Result(atlasQuery.execute());\n }", "class_method_signature": "EntityTagResourceProvider...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_15
{ "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 testStructTypeIsValidValue() {\n for (Object value : validValues) {\n assertTrue(structType.isValidValue(value), \"value=\" + value);\n }\n\n for (Object value : invalidValues) {\n assertFalse(structType.isValidValue(value), \"value=\" + val...
{ "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 isValidValue(Object obj) {\n if (obj != null) {\n if (obj instanceof AtlasStruct) {\n AtlasStruct structObj = (AtlasStruct) obj;\n\n for (AtlasAttributeDef attributeDef : structDef.getAttributeDefs()) {\n if (!...
{ "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_111
{ "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 testCreate() throws Exception {\n init();\n EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(deptEntity), false);\n\n validateMutationResponse(response, EntityOperation.CREATE, 5);\n AtlasEntityHeader dept1 = response.getF...
{ "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_238
{ "fields": [], "file": "authorization/src/test/java/org/apache/atlas/authorize/simple/PolicyParserTest.java", "identifier": "PolicyParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testParsePoliciesWithOutUserProperties() {\n List<String> policies = new ArrayList<>();\n policies.add(\"hivePolicy;;;;grp1:rwu,grp2:u;;entity:*abc,operation:*xyz,type:PII\");\n // Creating group data\n Map<String, List<AtlasActionTypes>> groupMap = new Ha...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(PolicyParser.class)", "modifier": "private static", "original_string": "private static Logger LOG = LoggerFactory.getLogger(PolicyParser.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "isDebu...
{ "body": "public List<PolicyDef> parsePolicies(List<String> policies) {\n if (isDebugEnabled) {\n LOG.debug(\"==> PolicyParser parsePolicies\");\n }\n List<PolicyDef> policyDefs = new ArrayList<>();\n for (String policy : policies) {\n PolicyDef policyDef = parsePoli...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_42
{ "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 testLeaderElectionIsJoinedOnStart() throws Exception {\n when(configuration.containsKey(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(true);\n when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY)).thenReturn(true);\n when(configur...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ActiveInstanceElectorService.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ActiveInstanceElectorService.class);", "type": "Logger", "var_name": "L...
{ "body": "@Override\n public void start() throws AtlasException {\n if (!HAConfiguration.isHAEnabled(configuration)) {\n LOG.info(\"HA is not enabled, no need to start leader election service\");\n return;\n }\n cacheActiveStateChangeHandlers();\n serverId = Atlas...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_107
{ "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 testCreateWithValidSuperTypes(){\n // Test Classification with supertype\n List<AtlasClassificationDef> classificationDefs = TestUtilsV2.getClassificationWithValidSuperType();\n\n AtlasTypesDef toCreate = new AtlasTypesDef(Collecti...
{ "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_54
{ "fields": [ { "declarator": "configuration", "modifier": "@Mock\n private", "original_string": "@Mock\n private Configuration configuration;", "type": "Configuration", "var_name": "configuration" } ], "file": "webapp/src/test/java/org/apache/atlas/web/service/ServiceS...
{ "body": "@Test\n public void testShouldBeActiveIfHAIsDisabled() {\n when(configuration.getBoolean(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY, false)).thenReturn(false);\n\n ServiceState serviceState = new ServiceState(configuration);\n assertEquals(ServiceState.ServiceStateValue.ACTIVE, ser...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ServiceState.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ServiceState.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "public ServiceStateValue getState() {\n return state;\n }", "class_method_signature": "ServiceState.getState()", "constructor": false, "full_signature": "public ServiceStateValue getState()", "identifier": "getState", "invocations": [], "modifiers": "public", "parameters": "()", "...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_150
{ "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 testGetTraitNamesForEmptyTraits() throws Exception {\n final List<String> traitNames = repositoryService.getTraitNames(guid);\n Assert.assertEquals(traitNames.size(), 0);\n }", "class_method_signature": "GraphBackedMetadataRepositoryTest.testGetTraitNamesForEmptyTr...
{ "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_296
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = UnsupportedOperationException.class)\n public void testCreateResources() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n\n // mock expectations...
{ "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 Collection<String> createResources(Request request) throws InvalidQueryException, ResourceNotFoundException {\n throw new UnsupportedOperationException(\n \"Creating multiple Taxonomies in a request is not currently supported\");\n }", "class_method_signatur...
{ "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_279
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityTagResourceProviderTest.java", "identifier": "EntityTagResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = ResourceNotFoundException.class)\n public void testGetResource_404() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createS...
{ "fields": [ { "declarator": "termResourceProvider", "modifier": "private", "original_string": "private TermResourceProvider termResourceProvider;", "type": "TermResourceProvider", "var_name": "termResourceProvider" } ], "file": "catalog/src/main/java/org/apache/atlas/catalo...
{ "body": "@Override\n public Result getResourceById(Request request) throws ResourceNotFoundException {\n AtlasQuery atlasQuery;\n try {\n atlasQuery = queryFactory.createEntityTagQuery(request);\n } catch (InvalidQueryException e) {\n throw new CatalogRuntimeException(\...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_128
{ "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 transformEntityWithExtInfo() throws AtlasBaseException {\n addColumnTransform(transform);\n\n AtlasEntityWithExtInfo entityWithExtInfo = getAtlasEntityWithExtInfo();\n AtlasEntity entity = entityWithExtInfo.getEntity();\n String ...
{ "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_94
{ "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 testGetOutputsGraphForEntityInvalidArguments(final String tableId, String expectedException)\n throws Exception {\n testInvalidArguments(expectedException, new Invoker() {\n @Override\n void run() throws AtlasException {\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 getOutputsGraphForEntity(String guid) throws AtlasException {\n LOG.info(\"Fetching lineage outputs graph for entity guid={}\", guid);\n guid = ParamChecker.notEmpty(guid, \"Entity id\");\n validateDatasetExists(guid);\n return...
{ "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_201
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/notification/VersionedMessageTest.java", "identifier": "VersionedMessageTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetVersion() throws Exception {\n MessageVersion version = new MessageVersion(\"1.0.0\");\n VersionedMessage<String> versionedMessage = new VersionedMessage<>(version, \"a\");\n assertEquals(versionedMessage.getVersion(), version);\n }", "class_method_si...
{ "fields": [ { "declarator": "version", "modifier": "private final", "original_string": "private final MessageVersion version;", "type": "MessageVersion", "var_name": "version" }, { "declarator": "message", "modifier": "private final", "original_string": "p...
{ "body": "public MessageVersion getVersion() {\n return version;\n }", "class_method_signature": "VersionedMessage.getVersion()", "constructor": false, "full_signature": "public MessageVersion getVersion()", "identifier": "getVersion", "invocations": [], "modifiers": "public", "parameters": "...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_190
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/hook/AtlasTopicCreatorTest.java", "identifier": "AtlasTopicCreatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldCreateTopicEvenIfEarlierOneFails() {\n Configuration configuration = mock(Configuration.class);\n when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)).\n thenReturn(true);\n when(configuration.getString...
{ "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_313
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/EntityResourceDefinitionTest.java", "identifier": "EntityResourceDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetIdPropertyName() {\n ResourceDefinition entityDefinition = new EntityResourceDefinition();\n assertEquals(entityDefinition.getIdPropertyName(), \"id\");\n }", "class_method_signature": "EntityResourceDefinitionTest.testGetIdPropertyName()", "constructor": ...
{ "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 getIdPropertyName() {\n return \"id\";\n }", "class_method_signature": "EntityResourceDefinition.getIdPropertyName()", "constructor": false, "full_signature": "@Override public String getIdPropertyName()", "identifier": "getIdPropertyName", "invocations": []...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_256
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/query/QueryFactoryTest.java", "identifier": "QueryFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateEntityTagQuery() throws Exception {\n Map<String, Object> requestProps = new HashMap<>();\n requestProps.put(\"id\", \"entity_id\");\n requestProps.put(\"name\", \"test_taxonomy.term1\");\n Request request = new InstanceRequest(requestProps);\n\n...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(QueryFactory.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(QueryFactory.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "public AtlasQuery createEntityTagQuery(Request request) throws InvalidQueryException {\n ResourceDefinition entityTagDefinition = new EntityTagResourceDefinition();\n QueryExpression queryExpression = create(request, entityTagDefinition);\n String guid = request.getProperty(\"id\");\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_169
{ "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 testShouldReturnHTTPSBoundAddress() {\n when(configuration.getString(HAConfiguration.ATLAS_SERVER_ADDRESS_PREFIX +\"id1\")).thenReturn(\"127.0.0.1:21443\");\n when(configuration.getBoolean(SecurityProperties.TLS_ENABLED)).thenReturn(true);\n\n String address = HA...
{ "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 String getBoundAddressForId(Configuration configuration, String serverId) {\n String hostPort = configuration.getString(ATLAS_SERVER_ADDRESS_PREFIX +serverId);\n boolean isSecure = configuration.getBoolean(SecurityProperties.TLS_ENABLED);\n String protocol = (isSecure) ? ...
{ "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_186
{ "fields": [], "file": "notification/src/test/java/org/apache/atlas/hook/AtlasTopicCreatorTest.java", "identifier": "AtlasTopicCreatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotCreateTopicIfItAlreadyExists() {\n Configuration configuration = mock(Configuration.class);\n when(configuration.getBoolean(AtlasTopicCreator.ATLAS_NOTIFICATION_CREATE_TOPICS_KEY, true)).\n thenReturn(true);\n when(configuration.getString(...
{ "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_305
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/DefaultPropertyMapperTest.java", "identifier": "DefaultPropertyMapperTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToCleanName_specifiedMappings() {\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(\"...
{ "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_240
{ "fields": [], "file": "authorization/src/test/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtilsTest.java", "identifier": "AtlasAuthorizationUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetApi() {\n String contextPath = \"/api/atlas/entities\";\n assertEquals(AtlasAuthorizationUtils.getApi(contextPath), \"entities\");\n\n contextPath = \"/api/atlas/entities/111/traits\";\n assertEquals(AtlasAuthorizationUtils.getApi(contextPath), \"en...
{ "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 String getApi(String contextPath) {\n if (isDebugEnabled) {\n LOG.debug(\"==> getApi({})\", contextPath);\n }\n\n if(contextPath == null){\n contextPath = \"\";\n }\n\n if (contextPath.startsWith(BASE_URL)) {\n 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_82
{ "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 shouldRunRegisteredSetupSteps() 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_7
{ "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 testMapTypeIsValidValue() {\n for (Object value : validValues) {\n assertTrue(intIntMapType.isValidValue(value), \"value=\" + value);\n }\n\n for (Object value : invalidValues) {\n assertFalse(intIntMapType.isValidValue(value), \"value=\" + ...
{ "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 isValidValue(Object obj) {\n if (obj != null) {\n if (obj instanceof Map) {\n Map<Object, Objects> map = (Map<Object, Objects>) obj;\n\n for (Map.Entry e : map.entrySet()) {\n if (!keyType.isValidValue(e.getKey...
{ "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_217
{ "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 testDuplicateNewTypenames() throws Exception {\n TypeSystem typeSystem = getTypeSystem();\n HierarchicalTypeDefinition<TraitType> trait1 = TypesUtil\n .createTraitTypeDef(random(), \"description\", ImmutableSet.<String>of(),\n Types...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(TypeSystem.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(TypeSystem.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "public Map<String, IDataType> defineTypes(TypesDef typesDef) throws AtlasException {\n ImmutableList<EnumTypeDefinition> enumDefs = ImmutableList.copyOf(typesDef.enumTypesAsJavaList());\n ImmutableList<StructTypeDefinition> structDefs = ImmutableList.copyOf(typesDef.structTypesAsJavaList());\...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_145
{ "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 testGetTypeAttributeName() throws Exception {\n Assert.assertEquals(repositoryService.getTypeAttributeName(), Constants.ENTITY_TYPE_PROPERTY_KEY);\n }", "class_method_signature": "GraphBackedMetadataRepositoryTest.testGetTypeAttributeName()", "constructor": false, "fu...
{ "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 public String getTypeAttributeName() {\n return Constants.ENTITY_TYPE_PROPERTY_KEY;\n }", "class_method_signature": "GraphBackedMetadataRepository.getTypeAttributeName()", "constructor": false, "full_signature": "@Override public String getTypeAttributeName()", "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_16
{ "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 testStructTypeGetNormalizedValue() {\n assertNull(structType.getNormalizedValue(null), \"value=\" + null);\n\n for (Object value : validValues) {\n if (value == null) {\n continue;\n }\n\n Object normalizedValue = structTy...
{ "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 Object getNormalizedValue(Object obj) {\n Object ret = null;\n\n if (obj != null) {\n if (isValidValue(obj)) {\n if (obj instanceof AtlasStruct) {\n normalizeAttributeValues((AtlasStruct) obj);\n ret = obj;\...
{ "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_329
{ "fields": [ { "declarator": "storeManager", "modifier": "@Mock", "original_string": "@Mock\n HBaseStoreManager storeManager;", "type": "HBaseStoreManager", "var_name": "storeManager" }, { "declarator": "connectionMask", "modifier": "@Mock", "original_st...
{ "body": "@Test\n public void shouldSucceedInLockingIfLockMediatorSucceeds() throws BackendException {\n\n when(storeManager.getMetaDataSchema(\"hbase\")).thenReturn(new EntryMetaData[] {EntryMetaData.TIMESTAMP});\n when(storeManager.getStorageConfig()).thenReturn(storageConfig);\n when(stora...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(HBaseKeyColumnValueStore.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(HBaseKeyColumnValueStore.class);", "type": "Logger", "var_name": "log...
{ "body": "@Override\n public void acquireLock(StaticBuffer key,\n StaticBuffer column,\n StaticBuffer expectedValue,\n StoreTransaction txh) throws BackendException {\n\n KeyColumn lockID = new KeyColumn(key, column);\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_283
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/EntityTagResourceProviderTest.java", "identifier": "EntityTagResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateResource() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n ResourceProvider ...
{ "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_112
{ "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 testArrayOfEntityUpdate() throws Exception {\n AtlasEntity tableEntity = new AtlasEntity(tblEntity.getEntity());\n List<AtlasObjectId> columns = new ArrayList<>();\n AtlasEntitiesWithExtInfo entitiesInfo ...
{ "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_41
{ "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 shouldAddAclProviderWithRightACL() {\n when(zookeeperProperties.hasAcl()).thenReturn(true);\n when(zookeeperProperties.getAcl()).thenReturn(\"sasl:myclient@EXAMPLE.COM\");\n when(zookeeperProperties.hasAuth()).thenReturn(false);\n CuratorFactory curatorFac...
{ "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_104
{ "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(enabled = false, dependsOnMethods = {\"testCreateDept\"})\n public void testUpdateWithMandatoryFields(){\n AtlasTypesDef atlasTypesDef = TestUtilsV2.defineInvalidUpdatedDeptEmployeeTypes();\n List<AtlasEnumDef> enumDefsToUpdate = atlasTypesDef.getEnumDefs();\n List<AtlasClassi...
{ "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 updateTypesDef(AtlasTypesDef typesDef) throws AtlasBaseException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"==> AtlasTypeDefGraphStore.updateTypesDef(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_57
{ "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 testSharedPathIsCreatedWithRightACLIfNotExists() throws Exception {\n\n when(configuration.getString(HAConfiguration.ATLAS_SERVER_ADDRESS_PREFIX +\"id1\")).thenReturn(HOST_PORT);\n when(configuration.getString(HAConfiguration.HA_ZOOKEEPER_ACL)).thenReturn(\"sasl:myclien...
{ "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_153
{ "fields": [ { "declarator": "repositoryService", "modifier": "@Inject\n private", "original_string": "@Inject\n private MetadataRepository repositoryService;", "type": "MetadataRepository", "var_name": "repositoryService" }, { "declarator": "discoveryService", ...
{ "body": "@Test(dependsOnMethods = \"testGetTraitNames\")\n public void testAddTrait() throws Exception {\n final String aGUID = getGUID();\n AtlasVertex AtlasVertex = GraphHelper.getInstance().getVertexForGUID(aGUID);\n Long modificationTimestampPreUpdate = GraphHelper.getSingleValuedPropert...
{ "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_295
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/TaxonomyResourceProviderTest.java", "identifier": "TaxonomyResourceProviderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateResource() throws Exception {\n AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class);\n QueryFactory queryFactory = createStrictMock(QueryFactory.class);\n AtlasQuery query = createStrictMock(AtlasQuery.class);\n Capture<ResourceD...
{ "fields": [ { "declarator": "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_98
{ "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 testGetSchemaForEntity(String tableName, String expected) throws Exception {\n ITypedReferenceableInstance entity =\n repository.getEntityDefinition(HIVE_TABLE_TYPE, \"name\", tableName);\n\n JSONObject results = new JSONObject(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 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_77
{ "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 testVerifyNotExcludedOperations() {\n AtlasRepositoryConfiguration.resetExcludedOperations();\n when(configuration.getStringArray(AtlasRepositoryConfiguration.AUDIT_EXCLUDED_OPERATIONS)).thenReturn(new String[]{\"Version\", \"Ping\"});\n AuditFilter auditFilter =...
{ "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_124
{ "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 exportType_Succeeds() throws AtlasBaseException, FileNotFoundException {\n String requestingIP = \"1.0.0.0\";\n String hostName = \"root\";\n\n AtlasExportRequest request = getRequestForFullFetch();\n ByteArrayOutputStream baos = new ByteArrayOutputStream(...
{ "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_20
{ "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 testEntityTypeGetNormalizedValue() {\n assertNull(entityType.getNormalizedValue(null), \"value=\" + null);\n\n for (Object value : validValues) {\n if (value == null) {\n continue;\n }\n\n Object normalizedValue = entityTy...
{ "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 Object getNormalizedValue(Object obj) {\n Object ret = null;\n\n if (obj != null) {\n if (isValidValue(obj)) {\n if (obj instanceof AtlasEntity) {\n normalizeAttributeValues((AtlasEntity) obj);\n ret = obj;\...
{ "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_173
{ "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 testGetAppConfigurationEntryStringForKafkaClient() {\n AppConfigurationEntry[] entries =\n Configuration.getConfiguration().getAppConfigurationEntry(\"KafkaClient\");\n Assert.assertNotNull(entries);\n Assert.assertEquals(1, entries....
{ "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_309
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/definition/TaxonomyResourceDefinitionTest.java", "identifier": "TaxonomyResourceDefinitionTest", "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 taxonomyDefinition = new TaxonomyResourceDefinition();\n String h...
{ "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 resolveHref(Map<String, Object> properties) {\n return String.format(\"v1/taxonomies/%s\", properties.get(\"name\"));\n }", "class_method_signature": "TaxonomyResourceDefinition.resolveHref(Map<String, Object> properties)", "constructor": false, "full_signature"...
{ "created": null, "fork": null, "fork_count": 109, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 35204049, "size": 34267, "stargazer_count": 95, "stars": null, "updates": null, "url": "https://github.com/apache/incubator-atlas" }
35204049_36
{ "fields": [], "file": "webapp/src/test/java/org/apache/atlas/web/resources/TaxonomyServiceTest.java", "identifier": "TaxonomyServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateTerm() throws Exception {\n String taxonomyName = \"testTaxonomy\";\n String termName = \"testTerm\";\n MetadataService metadataService = createStrictMock(MetadataService.class);\n AtlasTypeDefStore typeDefStore = createStrictMock(AtlasTypeDefSto...
{ "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}\")\n @Produces(Servlets.JSON_MEDIA_TYPE)\n public Response createTerm(String body,\n @Context HttpHeaders headers,\n @Context UriInfo ui,\n @PathParam(\"taxonom...
{ "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_165
{ "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(dependsOnMethods = \"testStore\")\n public void testRestoreType() throws Exception {\n TypesDef typesDef = typeStore.restoreType(\"Manager\");\n verifyRestoredClassType(typesDef, \"Manager\");\n }", "class_method_signature": "GraphBackedTypeStoreTest.testRestoreType()", "const...
{ "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 TypesDef restoreType(String typeName) throws AtlasException {\n // Get AtlasVertex for the specified type name.\n Iterator vertices =\n graph.query().has(Constants.VERTEX_TYPE_PROPERTY_KEY, VERTEX_TYPE).has(Constants.TYPENAME_PROPERTY_KE...
{ "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_61
{ "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 testShouldPassThroughRequestsIfActive() throws IOException, ServletException {\n when(serviceState.getState()).thenReturn(ServiceState.ServiceStateValue.ACTIVE);\n when(servletRequest.getRequestURI()).thenReturn(\"api/atlas/types\");\n\n ActiveServerFilter active...
{ "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_132
{ "fields": [], "file": "repository/src/test/java/org/apache/atlas/repository/impexp/ImportTransformerTest.java", "identifier": "ImportTransformerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void createWithDefaultParameters() throws AtlasBaseException {\n ImportTransformer e1 = ImportTransformer.getTransformer(\"replace:@cl1\");\n ImportTransformer e2 = ImportTransformer.getTransformer(\"replace\");\n\n assertTrue(e1 instanceof ImportTransformer.Replace);...
{ "fields": [ { "declarator": "TRANSFORMER_PARAMETER_SEPARATOR = \"\\\\:\"", "modifier": "private static final", "original_string": "private static final String TRANSFORMER_PARAMETER_SEPARATOR = \"\\\\:\";", "type": "String", "var_name": "TRANSFORMER_PARAMETER_SEPARATOR" }, {...
{ "body": "public static ImportTransformer getTransformer(String transformerSpec) throws AtlasBaseException {\n String[] params = StringUtils.split(transformerSpec, TRANSFORMER_PARAMETER_SEPARATOR);\n String key = (params == null || params.length < 1) ? transformerSpec : params[0];\n\n final...
{ "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_260
{ "fields": [], "file": "catalog/src/test/java/org/apache/atlas/catalog/query/QueryFactoryTest.java", "identifier": "QueryFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCollectionQuery_WildcardQuery() throws Exception {\n String queryString = \"name:ta?onomy\";\n Request request = new CollectionRequest(Collections.<String, Object>emptyMap(), queryString);\n\n QueryFactory factory = new QueryFactory();\n AtlasTaxonomyQ...
{ "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" }