atlas git commit: ATLAS-2663: Glossary UI updates for related term association
Repository: atlas Updated Branches: refs/heads/master 570f24231 -> a8fab3e77 ATLAS-2663: Glossary UI updates for related term association Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/a8fab3e7 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/a8fab3e7 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/a8fab3e7 Branch: refs/heads/master Commit: a8fab3e77fd9374595b08f72d21a06b6543ba28d Parents: 570f242 Author: kevalbhatt <kbh...@apache.org> Authored: Wed May 9 18:05:28 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Wed May 9 07:29:00 2018 -0700 -- dashboardv2/public/js/collection/VSearchList.js | 2 +- dashboardv2/public/js/modules/Helpers.js| 10 ++ dashboardv2/public/js/router/Router.js | 2 +- .../public/js/templates/common/Modal.html | 3 +- .../glossary/GlossaryDetailLayoutView_tmpl.html | 6 +- .../TermRelationAttributeLayoutView_tmpl.html | 8 +- .../TermRelationAttributeTable_tmpl.html| 32 ++-- .../public/js/utils/CommonViewFunction.js | 4 +- dashboardv2/public/js/utils/Overrides.js| 26 ++- dashboardv2/public/js/utils/Utils.js| 28 ++- .../views/detail_page/DetailPageLayoutView.js | 2 +- .../views/glossary/GlossaryDetailLayoutView.js | 3 + .../js/views/glossary/GlossaryLayoutView.js | 21 ++- .../glossary/TermRelationAttributeLayoutView.js | 172 +++ .../public/js/views/search/SearchLayoutView.js | 2 +- .../js/views/search/SearchResultLayoutView.js | 6 +- 16 files changed, 254 insertions(+), 73 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/a8fab3e7/dashboardv2/public/js/collection/VSearchList.js -- diff --git a/dashboardv2/public/js/collection/VSearchList.js b/dashboardv2/public/js/collection/VSearchList.js index db380f6..7417efc 100644 --- a/dashboardv2/public/js/collection/VSearchList.js +++ b/dashboardv2/public/js/collection/VSearchList.js @@ -57,7 +57,7 @@ define(['require', this.dynamicTable = false; return resp.entities ? resp.entities : []; } else { -return resp ? resp : []; +return []; } }, getBasicRearchResult: function(options) { http://git-wip-us.apache.org/repos/asf/atlas/blob/a8fab3e7/dashboardv2/public/js/modules/Helpers.js -- diff --git a/dashboardv2/public/js/modules/Helpers.js b/dashboardv2/public/js/modules/Helpers.js index 4a92932..258a40e 100644 --- a/dashboardv2/public/js/modules/Helpers.js +++ b/dashboardv2/public/js/modules/Helpers.js @@ -100,5 +100,15 @@ define(['require', return (obj[field] ? obj[field] : (defaulValue ? defaulValue : "")); }); +Handlebars.registerHelper('eachlookup', function(obj, field, options) { +return Handlebars.helpers.each((obj[field] ? obj[field] : null), options); +}); + +Handlebars.registerHelper('callmyfunction', function(functionObj, param, options) { +var argumentObj = _.extend([], arguments); +argumentObj.shift(); +return functionObj.apply(this, argumentObj); +}); + return HHelpers; }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/a8fab3e7/dashboardv2/public/js/router/Router.js -- diff --git a/dashboardv2/public/js/router/Router.js b/dashboardv2/public/js/router/Router.js index 9899a96..1f1bd40 100644 --- a/dashboardv2/public/js/router/Router.js +++ b/dashboardv2/public/js/router/Router.js @@ -225,7 +225,7 @@ define([ if (Utils.getUrlState.isTagTab()) { App.rSideNav.currentView.RTagLayoutView.currentView.manualRender(); } else if (Utils.getUrlState.isGlossaryTab()) { - App.rSideNav.currentView.RGlossaryLayoutView.currentView.manualRender(_.extend({ isTrigger: true }, paramObj)); + App.rSideNav.currentView.RGlossaryLayoutView.currentView.manualRender(_.extend({ "isTrigger": true }, { "value": paramObj })); } } http://git-wip-us.apache.org/repos/asf/atlas/blob/a8fab3e7/dashboardv2/public/js/templates/common/Modal.html -- diff --git a/dashboardv2/public/js/templates/common/Modal.html b/dashboardv2/public/js/templates/common/Modal.html index e000fa8..2179a7d 100644 --- a/dashboardv2/publ
atlas git commit: ATLAS-2620: updated entity-lookup REST API to use basic-search implementation
Repository: atlas Updated Branches: refs/heads/branch-0.8 77a94d2e6 -> 9a8d31b8e ATLAS-2620: updated entity-lookup REST API to use basic-search implementation (cherry picked from commit 3f7c5811faa9c9c9b61f9e6760904aeafb221224) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/9a8d31b8 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/9a8d31b8 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/9a8d31b8 Branch: refs/heads/branch-0.8 Commit: 9a8d31b8ef0b7c1b71dcb9b69aef249b55aedcd8 Parents: 77a94d2 Author: Madhan Neethiraj <mad...@apache.org> Authored: Thu Apr 26 16:19:47 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu Apr 26 18:24:56 2018 -0700 -- .../apache/atlas/web/rest/DiscoveryREST.java| 51 ++-- 1 file changed, 46 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/9a8d31b8/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java -- diff --git a/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java b/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java index ee68d63..1989230 100644 --- a/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java +++ b/webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java @@ -17,14 +17,19 @@ */ package org.apache.atlas.web.rest; +import org.apache.atlas.AtlasClient; import org.apache.atlas.AtlasErrorCode; import org.apache.atlas.SortOrder; import org.apache.atlas.discovery.AtlasDiscoveryService; import org.apache.atlas.exception.AtlasBaseException; import org.apache.atlas.model.discovery.AtlasSearchResult; import org.apache.atlas.model.discovery.SearchParameters; +import org.apache.atlas.model.discovery.SearchParameters.FilterCriteria; import org.apache.atlas.model.profile.AtlasUserSavedSearch; import org.apache.atlas.repository.Constants; +import org.apache.atlas.type.AtlasEntityType; +import org.apache.atlas.type.AtlasStructType; +import org.apache.atlas.type.AtlasTypeRegistry; import org.apache.atlas.utils.AtlasPerfTracer; import org.apache.atlas.web.util.Servlets; import org.apache.commons.collections.CollectionUtils; @@ -63,13 +68,15 @@ public class DiscoveryREST { private final intmaxFullTextQueryLength; private final intmaxDslQueryLength; +private final AtlasTypeRegistry typeRegistry; private final AtlasDiscoveryService atlasDiscoveryService; @Inject -public DiscoveryREST(AtlasDiscoveryService atlasDiscoveryService, Configuration configuration) { -this.atlasDiscoveryService = atlasDiscoveryService; -maxFullTextQueryLength = configuration.getInt(Constants.MAX_FULLTEXT_QUERY_STR_LENGTH, 4096); -maxDslQueryLength = configuration.getInt(Constants.MAX_DSL_QUERY_STR_LENGTH, 4096); +public DiscoveryREST(AtlasTypeRegistry typeRegistry, AtlasDiscoveryService atlasDiscoveryService, Configuration configuration) { +this.typeRegistry = typeRegistry; +this.atlasDiscoveryService = atlasDiscoveryService; +this.maxFullTextQueryLength = configuration.getInt(Constants.MAX_FULLTEXT_QUERY_STR_LENGTH, 4096); +this.maxDslQueryLength = configuration.getInt(Constants.MAX_DSL_QUERY_STR_LENGTH, 4096); } /** @@ -251,7 +258,41 @@ public class DiscoveryREST { String.format("attrName : %s, attrValue: %s for attribute search.", attrName, attrValuePrefix)); } -return atlasDiscoveryService.searchUsingBasicQuery(null, typeName, null, attrName, attrValuePrefix, true, limit, offset); +if (StringUtils.isEmpty(attrName)) { +AtlasEntityType entityType = typeRegistry.getEntityTypeByName(typeName); + +if (entityType != null) { +String[] defaultAttrNames = new String[] { AtlasClient.QUALIFIED_NAME, AtlasClient.NAME }; + +for (String defaultAttrName : defaultAttrNames) { +AtlasStructType.AtlasAttribute attribute = entityType.getAttribute(defaultAttrName); + +if (attribute != null) { +attrName = defaultAttrName; + +break; +} +} +} + +if (StringUtils.isEmpty(attrName)) { +attrName = AtlasClient.QUALIFIED_NAME; +} +} + +SearchParameters searchParams = new SearchParameters(); +FilterCriteria attrFilter = new FilterCriteria(); + +attrFilter.setAttributeName(Str
atlas git commit: ATLAS-2669 : Glossary UI : Attribute UI improved while associating term to the related term.
Repository: atlas Updated Branches: refs/heads/master 479b9ab1c -> f85ff28e0 ATLAS-2669 : Glossary UI : Attribute UI improved while associating term to the related term. Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/f85ff28e Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/f85ff28e Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/f85ff28e Branch: refs/heads/master Commit: f85ff28e05f92e75be3d663dd1a8c1c75f6130dd Parents: 479b9ab Author: kevalbhatt <kbh...@apache.org> Authored: Thu May 10 20:13:03 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu May 10 09:16:28 2018 -0700 -- dashboardv2/gruntfile.js| 5 +- dashboardv2/package.json| 3 +- dashboardv2/public/css/scss/style.scss | 1 + dashboardv2/public/css/scss/wizard.scss | 341 +++ dashboardv2/public/js/main.js | 6 +- .../glossary/AssignTermLayoutView_tmpl.html | 33 +- .../TermRelationAttributeLayoutView_tmpl.html | 13 - .../js/views/glossary/AssignTermLayoutView.js | 44 ++- .../views/glossary/GlossaryDetailLayoutView.js | 31 +- .../js/views/glossary/GlossaryLayoutView.js | 10 +- .../js/views/search/SearchResultLayoutView.js | 3 + 11 files changed, 453 insertions(+), 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/f85ff28e/dashboardv2/gruntfile.js -- diff --git a/dashboardv2/gruntfile.js b/dashboardv2/gruntfile.js index 2bcecfe..1d54a81 100644 --- a/dashboardv2/gruntfile.js +++ b/dashboardv2/gruntfile.js @@ -106,7 +106,8 @@ module.exports = function(grunt) { 'nv.d3.min.js': { 'nvd3/build': 'nvd3' }, 'jquery.sparkline.min.js': { 'jquery-sparkline': 'sparkline' }, 'table-dragger.js': { 'table-dragger/dist': 'table-dragger' }, -'jstree.min.js': { 'jstree/dist': 'jstree' } +'jstree.min.js': { 'jstree/dist': 'jstree' }, +'jquery.steps.min.js': { 'jquery-steps/build': 'jquery-steps' } } }, @@ -143,7 +144,7 @@ module.exports = function(grunt) { }], 'query-builder.default.min.css': { 'jQuery-QueryBuilder/dist/css': 'jQueryQueryBuilder/css' }, 'daterangepicker.css': { 'bootstrap-daterangepicker': 'bootstrap-daterangepicker/css' }, -'nv.d3.min.css': { 'nvd3/build': 'nvd3/css' }, +'nv.d3.min.css': { 'nvd3/build': 'nvd3/css' } } }, http://git-wip-us.apache.org/repos/asf/atlas/blob/f85ff28e/dashboardv2/package.json -- diff --git a/dashboardv2/package.json b/dashboardv2/package.json index e543468..7fbd1bf 100644 --- a/dashboardv2/package.json +++ b/dashboardv2/package.json @@ -37,7 +37,8 @@ "jquery-asBreadcrumbs": "0.2.2", "jquery-placeholder": "2.3.1", "jquery-sparkline": "2.4.0", -"jstree": "^3.3.5", +"jquery-steps": "1.1.0", +"jstree": "3.3.5", "moment": "2.21.0", "moment-timezone": "0.5.14", "npm": "^5.8.0", http://git-wip-us.apache.org/repos/asf/atlas/blob/f85ff28e/dashboardv2/public/css/scss/style.scss -- diff --git a/dashboardv2/public/css/scss/style.scss b/dashboardv2/public/css/scss/style.scss index 2b226cd..cd1781b 100644 --- a/dashboardv2/public/css/scss/style.scss +++ b/dashboardv2/public/css/scss/style.scss @@ -32,4 +32,5 @@ @import "search.scss"; @import "profile-table.scss"; @import "glossary.scss"; +@import "wizard.scss"; @import "override.scss"; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/f85ff28e/dashboardv2/public/css/scss/wizard.scss -- diff --git a/dashboardv2/public/css/scss/wizard.scss b/dashboardv2/public/css/scss/wizard.scss new file mode 100644 index 000..6b3ceb4 --- /dev/null +++ b/dashboardv2/public/css/scss/wizard.scss @@ -0,0 +1,341 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this fil
atlas git commit: ATLAS-2646: Glossary UI update for term-to-term association
Repository: atlas Updated Branches: refs/heads/master f29a2b7bb -> 1617b6716 ATLAS-2646: Glossary UI update for term-to-term association Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/1617b671 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/1617b671 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/1617b671 Branch: refs/heads/master Commit: 1617b6716d66f0876b8c013fddb43abc2c2a91d5 Parents: f29a2b7 Author: kevalbhatt <kbh...@apache.org> Authored: Sat May 5 22:19:01 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Sat May 5 11:23:34 2018 -0700 -- dashboardv2/public/js/models/VGlossary.js | 6 + dashboardv2/public/js/modules/Helpers.js| 14 +- .../glossary/AssignTermLayoutView_tmpl.html | 15 +- .../glossary/GlossaryDetailLayoutView_tmpl.html | 8 ++ .../TermRelationAttributeLayoutView_tmpl.html | 32 + .../TermRelationAttributeTable_tmpl.html| 60 dashboardv2/public/js/utils/Enums.js| 23 .../js/views/glossary/AssignTermLayoutView.js | 38 +++-- .../views/glossary/GlossaryDetailLayoutView.js | 55 ++-- .../js/views/glossary/GlossaryLayoutView.js | 37 +++-- .../glossary/TermRelationAttributeLayoutView.js | 137 +++ 11 files changed, 390 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/1617b671/dashboardv2/public/js/models/VGlossary.js -- diff --git a/dashboardv2/public/js/models/VGlossary.js b/dashboardv2/public/js/models/VGlossary.js index 63eb9d2..f33ef0f 100644 --- a/dashboardv2/public/js/models/VGlossary.js +++ b/dashboardv2/public/js/models/VGlossary.js @@ -94,6 +94,12 @@ define(['require', assignCategoryToTerm: function(options) { return this.createEditTerm(options); }, +assignTermToAttributes: function(options) { +return this.createEditTerm(options); +}, +removeTermFromAttributes: function(options) { +return this.createEditTerm(options); +}, removeTermFromEntity: function(guid, options) { var url = UrlLinks.termToEntityApiUrl(guid); options = _.extend({ http://git-wip-us.apache.org/repos/asf/atlas/blob/1617b671/dashboardv2/public/js/modules/Helpers.js -- diff --git a/dashboardv2/public/js/modules/Helpers.js b/dashboardv2/public/js/modules/Helpers.js index 7393a79..4a92932 100644 --- a/dashboardv2/public/js/modules/Helpers.js +++ b/dashboardv2/public/js/modules/Helpers.js @@ -67,12 +67,16 @@ define(['require', case '==': return (v1 == v2) ? options.fn(this) : options.inverse(this); break; -case '!==': -return (v1 !== v2) ? options.fn(this) : options.inverse(this); -break; + case '===': return (v1 === v2) ? options.fn(this) : options.inverse(this); break; +case '!=': +return (v1 !== v2) ? options.fn(this) : options.inverse(this); +break; +case '!==': +return (v1 !== v2) ? options.fn(this) : options.inverse(this); +break; case '<': return (v1 < v2) ? options.fn(this) : options.inverse(this); break; @@ -92,5 +96,9 @@ define(['require', //return options.inverse(this); }); +Handlebars.registerHelper('lookup', function(obj, field, defaulValue) { +return (obj[field] ? obj[field] : (defaulValue ? defaulValue : "")); +}); + return HHelpers; }); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/1617b671/dashboardv2/public/js/templates/glossary/AssignTermLayoutView_tmpl.html -- diff --git a/dashboardv2/public/js/templates/glossary/AssignTermLayoutView_tmpl.html b/dashboardv2/public/js/templates/glossary/AssignTermLayoutView_tmpl.html index 1590a29..9abe8c3 100644 --- a/dashboardv2/public/js/templates/glossary/AssignTermLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/glossary/AssignTermLayoutView_tmpl.html @@ -14,4 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. --> - \ No newline at end of file + + +{{#if isAttributeRelationView}} + + {{#each selectedTermAttributeList}} + +{{@key}} + + + + +{{/each}} + +{{/if}} \ No newline at end of file http://gi
atlas git commit: ATLAS-2647: updated documentation on notification, hooks and basic-search
Repository: atlas Updated Branches: refs/heads/master 1fc88ce30 -> 880ea4b69 ATLAS-2647: updated documentation on notification, hooks and basic-search Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/880ea4b6 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/880ea4b6 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/880ea4b6 Branch: refs/heads/master Commit: 880ea4b693d79be6072da5e64153e4c97f21ea02 Parents: 1fc88ce Author: Madhan Neethiraj <mad...@apache.org> Authored: Sat May 5 17:07:02 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Mon May 7 10:02:13 2018 -0700 -- docs/src/site/resources/images/add.gif | Bin 397 -> 0 bytes .../resources/images/apache-incubator-logo.png | Bin 4234 -> 0 bytes .../resources/images/apache-maven-project-2.png | Bin 33442 -> 0 bytes docs/src/site/resources/images/fix.gif | Bin 366 -> 0 bytes .../site/resources/images/icon_error_sml.gif| Bin 633 -> 0 bytes .../src/site/resources/images/icon_help_sml.gif | Bin 1072 -> 0 bytes .../src/site/resources/images/icon_info_sml.gif | Bin 638 -> 0 bytes .../site/resources/images/icon_success_sml.gif | Bin 604 -> 0 bytes .../site/resources/images/icon_warning_sml.gif | Bin 625 -> 0 bytes .../images/logos/build-by-maven-black.png | Bin 2294 -> 0 bytes .../images/logos/build-by-maven-white.png | Bin 2260 -> 0 bytes .../resources/images/profiles/pre-release.png | Bin 32607 -> 0 bytes .../site/resources/images/profiles/retired.png | Bin 22003 -> 0 bytes .../site/resources/images/profiles/sandbox.png | Bin 33010 -> 0 bytes docs/src/site/resources/images/remove.gif | Bin 607 -> 0 bytes docs/src/site/resources/images/rss.png | Bin 474 -> 0 bytes .../twiki/search-basic-hive_column-PII.png | Bin 0 -> 502513 bytes ...h-basic-hive_table-customers-or-provider.png | Bin 0 -> 373583 bytes ...basic-hive_table-customers-owner_is_hive.png | Bin 0 -> 366589 bytes .../twiki/search-basic-hive_table-customers.png | Bin 0 -> 305538 bytes docs/src/site/resources/images/update.gif | Bin 1090 -> 0 bytes docs/src/site/twiki/Architecture.twiki | 10 +- docs/src/site/twiki/Bridge-Falcon.twiki | 52 --- docs/src/site/twiki/Bridge-HBase.twiki | 62 docs/src/site/twiki/Bridge-Hive.twiki | 116 --- docs/src/site/twiki/Bridge-Kafka.twiki | 49 --- docs/src/site/twiki/Bridge-Sqoop.twiki | 42 -- docs/src/site/twiki/Hook-Falcon.twiki | 52 +++ docs/src/site/twiki/Hook-HBase.twiki| 70 + docs/src/site/twiki/Hook-Hive.twiki | 132 + docs/src/site/twiki/Hook-Sqoop.twiki| 60 docs/src/site/twiki/Hook-Storm.twiki| 114 +++ docs/src/site/twiki/Notification-Entity.twiki | 33 - docs/src/site/twiki/Notifications.twiki | 73 ++ docs/src/site/twiki/Search-Basic.twiki | 142 +-- docs/src/site/twiki/StormAtlasHook.twiki| 114 --- docs/src/site/twiki/index.twiki | 20 +-- 37 files changed, 611 insertions(+), 530 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/880ea4b6/docs/src/site/resources/images/add.gif -- diff --git a/docs/src/site/resources/images/add.gif b/docs/src/site/resources/images/add.gif deleted file mode 100755 index 1cb3dbf..000 Binary files a/docs/src/site/resources/images/add.gif and /dev/null differ http://git-wip-us.apache.org/repos/asf/atlas/blob/880ea4b6/docs/src/site/resources/images/apache-incubator-logo.png -- diff --git a/docs/src/site/resources/images/apache-incubator-logo.png b/docs/src/site/resources/images/apache-incubator-logo.png deleted file mode 100755 index 81fb31e..000 Binary files a/docs/src/site/resources/images/apache-incubator-logo.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/atlas/blob/880ea4b6/docs/src/site/resources/images/apache-maven-project-2.png -- diff --git a/docs/src/site/resources/images/apache-maven-project-2.png b/docs/src/site/resources/images/apache-maven-project-2.png deleted file mode 100755 index 6c096ec..000 Binary files a/docs/src/site/resources/images/apache-maven-project-2.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/atlas/blob/880ea4b6/docs/src/site/resources/images/fix.gif -- diff --
atlas git commit: ATLAS-2463: documentation of Atlas authorization model
Repository: atlas Updated Branches: refs/heads/master fccfe919d -> f756e9b36 ATLAS-2463: documentation of Atlas authorization model Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/f756e9b3 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/f756e9b3 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/f756e9b3 Branch: refs/heads/master Commit: f756e9b36fa27ce6a01e081636884106990e936a Parents: fccfe91 Author: nixonrodrigues <ni...@apache.org> Authored: Tue May 15 06:52:00 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Tue May 15 08:05:08 2018 -0700 -- docs/src/site/twiki/Atlas-Authentication.twiki | 113 + .../site/twiki/Atlas-Authorization-Model.twiki | 110 .../Atlas-Authorization-Simple-Authorizer.twiki | 141 .../twiki/Authentication-Authorization.twiki| 166 --- docs/src/site/twiki/index.twiki | 4 +- 5 files changed, 367 insertions(+), 167 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/f756e9b3/docs/src/site/twiki/Atlas-Authentication.twiki -- diff --git a/docs/src/site/twiki/Atlas-Authentication.twiki b/docs/src/site/twiki/Atlas-Authentication.twiki new file mode 100644 index 000..ddaa7fe --- /dev/null +++ b/docs/src/site/twiki/Atlas-Authentication.twiki @@ -0,0 +1,113 @@ +---++ Authentication in Apache Atlas. + +---+++ Authentication + +Atlas supports following authentication methods + + * *File* + * *Kerberos* + * *LDAP* + + +Following properties should be set true to enable the authentication of that type in =atlas-application.properties= file. + + + +atlas.authentication.method.kerberos=true|false +atlas.authentication.method.ldap=true|false +atlas.authentication.method.file=true|false + + +If two or more authentication methods are set to true, then the authentication falls back to the latter method if the earlier one fails. +For example if Kerberos authentication is set to true and ldap authentication is also set to true then, if for a request without kerberos principal and keytab LDAP authentication will be used as a fallback scenario. + +---FILE method. + +File authentication requires users' login details in users credentials file in the format specified below and +the file path should set to property =atlas.authentication.method.file.filename= in =atlas-application.properties=. + + +atlas.authentication.method.file=true +atlas.authentication.method.file.filename=${sys:atlas.home}/conf/users-credentials.properties + + +The users credentials file should have below format + +username=group::sha256-password + + +For e.g. + +admin=ADMIN::e7cf3ef4f17c3999a94f2c6f612e8a888e5b1026878e4e19398b23bd38ec221a + + +Users group can be either *ADMIN*, *DATA_STEWARD* OR *DATA_SCIENTIST* + +*Note*:-password is encoded with sha256 encoding method and can be generated using unix tool. + +For e.g. + +echo -n "Password" | sha256sum +e7cf3ef4f17c3999a94f2c6f612e8a888e5b1026878e4e19398b23bd38ec221a - + + +--- Kerberos Method. + +To enable the authentication in Kerberos mode in Atlas, set the property =atlas.authentication.method.kerberos= to true in =atlas-application.properties= + + +atlas.authentication.method.kerberos = true + + +Also following properties should be set. + + +atlas.authentication.method.kerberos.principal=/@EXAMPLE.COM +atlas.authentication.method.kerberos.keytab = /.keytab +atlas.authentication.method.kerberos.name.rules = RULE:[2:$1@$0](at...@example.com)s/.*/atlas/ +atlas.authentication.method.kerberos.token.validity = 3600 [ in Seconds (optional)] + + + +--- LDAP Method. + +To enable the authentication in LDAP mode in Atlas, set the property =atlas.authentication.method.ldap= to true and also set Ldap type to property =atlas.authentication.method.ldap.type= to LDAP or AD in =atlas-application.properties=. +Use AD if connecting to Active Directory. + + +atlas.authentication.method.ldap=true +atlas.authentication.method.ldap.type=ldap|ad + + + +For LDAP or AD the following configuration needs to be set in atlas application properties. + +*Active Directory* + + +atlas.authentication.method.ldap.ad.domain= example.com +atlas.authentication.method.ldap.ad.url=ldap://:389 +atlas.authentication.method.ldap.ad.base.dn=DC=example,DC=com +atlas.authentication.method.ldap.ad.bind.dn=CN=Administrator,CN=Users,DC=example,DC=com +atlas.authentication.method.ldap.ad.bind.password= +atlas.authentication.method.ldap.ad.referral=ignore +atlas.authentication.method.ldap.ad.user.searchfilter=(sAMAccountName={0}) +atlas.authentication.method.ldap.ad.default.role
atlas git commit: ATLAS-2676 : UI fix to address basic-search handling of term input in IE
Repository: atlas Updated Branches: refs/heads/master f756e9b36 -> fa712590e ATLAS-2676 : UI fix to address basic-search handling of term input in IE Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/fa712590 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/fa712590 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/fa712590 Branch: refs/heads/master Commit: fa712590e929d0c8c3ee7c048687bd1fe4ddd59e Parents: f756e9b Author: kevalbhatt <kbh...@apache.org> Authored: Tue May 15 17:47:02 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Tue May 15 08:09:47 2018 -0700 -- dashboardv2/public/css/scss/glossary.scss | 2 +- dashboardv2/public/js/modules/atlasLogin.js | 7 ++- .../public/js/templates/glossary/GlossaryLayoutView_tmpl.html | 4 ++-- dashboardv2/public/js/utils/CommonViewFunction.js | 1 - dashboardv2/public/js/utils/Overrides.js | 7 +++ .../public/js/views/detail_page/DetailPageLayoutView.js | 2 +- dashboardv2/public/js/views/glossary/GlossaryLayoutView.js| 4 ++-- dashboardv2/public/js/views/search/SearchLayoutView.js| 5 +++-- dashboardv2/public/js/views/search/SearchResultLayoutView.js | 2 +- 9 files changed, 23 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/fa712590/dashboardv2/public/css/scss/glossary.scss -- diff --git a/dashboardv2/public/css/scss/glossary.scss b/dashboardv2/public/css/scss/glossary.scss index 98c977d..760711f 100644 --- a/dashboardv2/public/css/scss/glossary.scss +++ b/dashboardv2/public/css/scss/glossary.scss @@ -27,7 +27,7 @@ overflow: hidden; text-overflow: ellipsis; } -.jstree-children { +.jstree-children.jstree-children>li>a { max-width: 500px; } .jstree-clicked, http://git-wip-us.apache.org/repos/asf/atlas/blob/fa712590/dashboardv2/public/js/modules/atlasLogin.js -- diff --git a/dashboardv2/public/js/modules/atlasLogin.js b/dashboardv2/public/js/modules/atlasLogin.js index 0aa59e0..5206288 100644 --- a/dashboardv2/public/js/modules/atlasLogin.js +++ b/dashboardv2/public/js/modules/atlasLogin.js @@ -18,7 +18,7 @@ //Define indexOf for IE -if (!Array.indexOf) { +if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(obj, start) { for (var i = (start || 0); i < this.length; i++) { if (this[i] == obj) { @@ -29,6 +29,11 @@ if (!Array.indexOf) { }; } +if (!String.prototype.startsWith) { +String.prototype.startsWith = function(str, matchStr) { +return str.lastIndexOf(matchStr, 0) === 0 +} +} function doLogin() { http://git-wip-us.apache.org/repos/asf/atlas/blob/fa712590/dashboardv2/public/js/templates/glossary/GlossaryLayoutView_tmpl.html -- diff --git a/dashboardv2/public/js/templates/glossary/GlossaryLayoutView_tmpl.html b/dashboardv2/public/js/templates/glossary/GlossaryLayoutView_tmpl.html index b870e6b..1fa1e35 100644 --- a/dashboardv2/public/js/templates/glossary/GlossaryLayoutView_tmpl.html +++ b/dashboardv2/public/js/templates/glossary/GlossaryLayoutView_tmpl.html @@ -38,14 +38,14 @@ - + - + http://git-wip-us.apache.org/repos/asf/atlas/blob/fa712590/dashboardv2/public/js/utils/CommonViewFunction.js -- diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js index 3ee7609..bcff5e4 100644 --- a/dashboardv2/public/js/utils/CommonViewFunction.js +++ b/dashboardv2/public/js/utils/CommonViewFunction.js @@ -763,7 +763,6 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum } } CommonViewFunction.addRestCsrfCustomHeader = function(xhr, settings) { -//if (settings.url == null || !settings.url.startsWith('/webhdfs/')) { if (settings.url == null) { return; } http://git-wip-us.apache.org/repos/asf/atlas/blob/fa712590/dashboardv2/public/js/utils/Overrides.js -- diff --git a/dashboardv2/public/js/utils/Overrides.js b/dashboardv2/public/js/utils/Overrides.js index efd5e40..a96fc2c 100644 --- a/dashboardv2/publ
atlas git commit: ATLAS-2687: Create twiki documentation about classification propagation
Repository: atlas Updated Branches: refs/heads/branch-1.0 05d503596 -> 1daef085a ATLAS-2687: Create twiki documentation about classification propagation (cherry picked from commit 024484407290ad664141c1a8c52012c3e7708c3c) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/1daef085 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/1daef085 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/1daef085 Branch: refs/heads/branch-1.0 Commit: 1daef085a8ad2c408da9c56e9be2d3cc4a6140a4 Parents: 05d5035 Author: Sarath Subramanian <ssubraman...@hortonworks.com> Authored: Tue May 15 16:29:04 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Tue May 15 23:07:27 2018 -0700 -- .../twiki/classification-propagation-1.png | Bin 0 -> 98689 bytes .../twiki/classification-propagation-2.png | Bin 0 -> 128774 bytes .../twiki/classification-propagation-3.png | Bin 0 -> 128278 bytes .../twiki/classification-propagation-4.png | Bin 0 -> 106518 bytes .../twiki/classification-propagation-5.png | Bin 0 -> 78040 bytes .../twiki/classification-propagation-6.png | Bin 0 -> 69127 bytes .../twiki/classification-propagation-7.png | Bin 0 -> 72418 bytes .../twiki/classification-propagation-8.png | Bin 0 -> 140839 bytes .../site/twiki/ClassificationPropagation.twiki | 86 +++ docs/src/site/twiki/index.twiki | 1 + 10 files changed, 87 insertions(+) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/1daef085/docs/src/site/resources/images/twiki/classification-propagation-1.png -- diff --git a/docs/src/site/resources/images/twiki/classification-propagation-1.png b/docs/src/site/resources/images/twiki/classification-propagation-1.png new file mode 100644 index 000..2e27424 Binary files /dev/null and b/docs/src/site/resources/images/twiki/classification-propagation-1.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/1daef085/docs/src/site/resources/images/twiki/classification-propagation-2.png -- diff --git a/docs/src/site/resources/images/twiki/classification-propagation-2.png b/docs/src/site/resources/images/twiki/classification-propagation-2.png new file mode 100644 index 000..352db3b Binary files /dev/null and b/docs/src/site/resources/images/twiki/classification-propagation-2.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/1daef085/docs/src/site/resources/images/twiki/classification-propagation-3.png -- diff --git a/docs/src/site/resources/images/twiki/classification-propagation-3.png b/docs/src/site/resources/images/twiki/classification-propagation-3.png new file mode 100644 index 000..355bdf9 Binary files /dev/null and b/docs/src/site/resources/images/twiki/classification-propagation-3.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/1daef085/docs/src/site/resources/images/twiki/classification-propagation-4.png -- diff --git a/docs/src/site/resources/images/twiki/classification-propagation-4.png b/docs/src/site/resources/images/twiki/classification-propagation-4.png new file mode 100644 index 000..74d8ea1 Binary files /dev/null and b/docs/src/site/resources/images/twiki/classification-propagation-4.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/1daef085/docs/src/site/resources/images/twiki/classification-propagation-5.png -- diff --git a/docs/src/site/resources/images/twiki/classification-propagation-5.png b/docs/src/site/resources/images/twiki/classification-propagation-5.png new file mode 100644 index 000..66350e4 Binary files /dev/null and b/docs/src/site/resources/images/twiki/classification-propagation-5.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/1daef085/docs/src/site/resources/images/twiki/classification-propagation-6.png -- diff --git a/docs/src/site/resources/images/twiki/classification-propagation-6.png b/docs/src/site/resources/images/twiki/classification-propagation-6.png new file mode 100644 index 000..1669bed Binary files /dev/null and b/docs/src/site/resources/images/twiki/classification-propagation-6.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/1daef085/docs/src/site/resources/images/twiki/classification-propagation-7.png -- diff --git a/docs/src/site/resources/
atlas git commit: ATLAS-2697: audit log shows 'Propagated classification added' for directly associatied classification
Repository: atlas Updated Branches: refs/heads/master c2d927e0b -> 8f9813307 ATLAS-2697: audit log shows 'Propagated classification added' for directly associatied classification Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/8f981330 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/8f981330 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/8f981330 Branch: refs/heads/master Commit: 8f9813307c79ff27113dca6adb3bf47c51a23fc1 Parents: c2d927e Author: Sarath Subramanian <ssubraman...@hortonworks.com> Authored: Wed May 16 23:19:08 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu May 17 07:30:11 2018 -0700 -- .../atlas/repository/store/graph/v1/EntityGraphMapper.java | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/8f981330/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java -- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java index 8344b70..debb441 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java @@ -1280,6 +1280,7 @@ public class EntityGraphMapper { final AtlasEntityType entityType = typeRegistry.getEntityTypeByName(entityTypeName); List entitiesToPropagateTo = null; Map<AtlasVertex, List> propagations = null; +List addClassifications = new ArrayList<>(classifications.size()); for (AtlasClassification c : classifications) { AtlasClassification classification = new AtlasClassification(c); @@ -1360,6 +1361,8 @@ public class EntityGraphMapper { LOG.debug(" --> Not propagating classification: [{}][{}] - propagation is disabled.", getTypeName(classificationVertex), entityTypeName); } } + +addClassifications.add(classification); } // notify listeners on classification addition @@ -1373,7 +1376,7 @@ public class EntityGraphMapper { StringentityGuid = GraphHelper.getGuid(vertex); AtlasEntityWithExtInfoentityWithExtInfo= instanceConverter.getAndCacheEntity(entityGuid); AtlasEntity entity = (entityWithExtInfo != null) ? entityWithExtInfo.getEntity() : null; -List addedClassifications = StringUtils.equals(entityGuid, guid) ? classifications : propagations.get(vertex); +List addedClassifications = StringUtils.equals(entityGuid, guid) ? addClassifications : propagations.get(vertex); if (CollectionUtils.isNotEmpty(addedClassifications)) { entityChangeNotifier.onClassificationAddedToEntity(entity, addedClassifications);
atlas git commit: ATLAS-2697: audit log shows 'Propagated classification added' for directly associatied classification
Repository: atlas Updated Branches: refs/heads/branch-1.0 7d3d2fc75 -> 9f443cb7f ATLAS-2697: audit log shows 'Propagated classification added' for directly associatied classification Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 8f9813307c79ff27113dca6adb3bf47c51a23fc1) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/9f443cb7 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/9f443cb7 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/9f443cb7 Branch: refs/heads/branch-1.0 Commit: 9f443cb7fbf6aeb04370537bf1c099a46501f9a9 Parents: 7d3d2fc Author: Sarath Subramanian <ssubraman...@hortonworks.com> Authored: Wed May 16 23:19:08 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu May 17 07:35:22 2018 -0700 -- .../atlas/repository/store/graph/v1/EntityGraphMapper.java | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/9f443cb7/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java -- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java index 8344b70..debb441 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java @@ -1280,6 +1280,7 @@ public class EntityGraphMapper { final AtlasEntityType entityType = typeRegistry.getEntityTypeByName(entityTypeName); List entitiesToPropagateTo = null; Map<AtlasVertex, List> propagations = null; +List addClassifications = new ArrayList<>(classifications.size()); for (AtlasClassification c : classifications) { AtlasClassification classification = new AtlasClassification(c); @@ -1360,6 +1361,8 @@ public class EntityGraphMapper { LOG.debug(" --> Not propagating classification: [{}][{}] - propagation is disabled.", getTypeName(classificationVertex), entityTypeName); } } + +addClassifications.add(classification); } // notify listeners on classification addition @@ -1373,7 +1376,7 @@ public class EntityGraphMapper { StringentityGuid = GraphHelper.getGuid(vertex); AtlasEntityWithExtInfoentityWithExtInfo= instanceConverter.getAndCacheEntity(entityGuid); AtlasEntity entity = (entityWithExtInfo != null) ? entityWithExtInfo.getEntity() : null; -List addedClassifications = StringUtils.equals(entityGuid, guid) ? classifications : propagations.get(vertex); +List addedClassifications = StringUtils.equals(entityGuid, guid) ? addClassifications : propagations.get(vertex); if (CollectionUtils.isNotEmpty(addedClassifications)) { entityChangeNotifier.onClassificationAddedToEntity(entity, addedClassifications);
atlas git commit: ATLAS-2478: updates to support Elasticsearch 5.6.4 index backend (Tech Preview)
Repository: atlas Updated Branches: refs/heads/branch-1.0 9f443cb7f -> eac158d53 ATLAS-2478: updates to support Elasticsearch 5.6.4 index backend (Tech Preview) Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit e4ffcf248ee066f0c823bca2a65f00bdc3836411) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/eac158d5 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/eac158d5 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/eac158d5 Branch: refs/heads/branch-1.0 Commit: eac158d53594bdb87bf4674c745687b1e630ffaf Parents: 9f443cb Author: Pierre Padovani <pierre.padov...@civitaslearning.com> Authored: Tue Mar 13 12:13:55 2018 -0500 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu May 17 09:25:39 2018 -0700 -- .../org/apache/atlas/repository/Constants.java | 31 -- distro/pom.xml | 62 ++-- distro/src/bin/atlas_config.py | 25 +++- distro/src/bin/atlas_start.py | 6 ++ distro/src/bin/atlas_stop.py| 34 ++- distro/src/conf/atlas-env.sh| 5 +- .../src/main/assemblies/standalone-package.xml | 7 +++ docs/src/site/twiki/Configuration.twiki | 16 - docs/src/site/twiki/HighAvailability.twiki | 14 - docs/src/site/twiki/InstallationSteps.twiki | 18 ++ graphdb/janus/pom.xml | 6 ++ pom.xml | 5 +- webapp/pom.xml | 12 13 files changed, 221 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/eac158d5/common/src/main/java/org/apache/atlas/repository/Constants.java -- diff --git a/common/src/main/java/org/apache/atlas/repository/Constants.java b/common/src/main/java/org/apache/atlas/repository/Constants.java index 3732556..6d95c45 100644 --- a/common/src/main/java/org/apache/atlas/repository/Constants.java +++ b/common/src/main/java/org/apache/atlas/repository/Constants.java @@ -18,6 +18,10 @@ package org.apache.atlas.repository; +import org.apache.atlas.ApplicationProperties; +import org.apache.atlas.AtlasException; +import org.apache.commons.configuration.Configuration; + /** * Repository Constants. * @@ -52,12 +56,12 @@ public final class Constants { /** * Properties for type store graph. */ -public static final String TYPE_CATEGORY_PROPERTY_KEY = INTERNAL_PROPERTY_KEY_PREFIX + "type.category"; -public static final String VERTEX_TYPE_PROPERTY_KEY = INTERNAL_PROPERTY_KEY_PREFIX + "type"; -public static final String TYPENAME_PROPERTY_KEY= INTERNAL_PROPERTY_KEY_PREFIX + "type.name"; -public static final String TYPEDESCRIPTION_PROPERTY_KEY = INTERNAL_PROPERTY_KEY_PREFIX + "type.description"; -public static final String TYPEVERSION_PROPERTY_KEY = INTERNAL_PROPERTY_KEY_PREFIX + "type.version"; -public static final String TYPEOPTIONS_PROPERTY_KEY = INTERNAL_PROPERTY_KEY_PREFIX + "type.options"; +public static final String TYPE_CATEGORY_PROPERTY_KEY = getTypePropertyKey(INTERNAL_PROPERTY_KEY_PREFIX + "type.category"); +public static final String VERTEX_TYPE_PROPERTY_KEY = getTypePropertyKey(INTERNAL_PROPERTY_KEY_PREFIX + "type"); +public static final String TYPENAME_PROPERTY_KEY= getTypePropertyKey(INTERNAL_PROPERTY_KEY_PREFIX + "type.name"); +public static final String TYPEDESCRIPTION_PROPERTY_KEY = getTypePropertyKey(INTERNAL_PROPERTY_KEY_PREFIX + "type.description"); +public static final String TYPEVERSION_PROPERTY_KEY = getTypePropertyKey(INTERNAL_PROPERTY_KEY_PREFIX + "type.version"); +public static final String TYPEOPTIONS_PROPERTY_KEY = getTypePropertyKey(INTERNAL_PROPERTY_KEY_PREFIX + "type.options"); // relationship def constants public static final String RELATIONSHIPTYPE_END1_KEY = "endDef1"; @@ -135,4 +139,19 @@ public final class Constants { private Constants() { } +private static String getTypePropertyKey(String defaultKey) { +try { +Configuration configuration = ApplicationProperties.get(); + +if (configuration.containsKey("atlas.graph.index.search.backend") && + configuration.getString("atlas.graph.index.search.backend").equals("elasticsearch")) { + +return defaultKey.replaceAll("\\.", "_"); +
atlas git commit: ATLAS-2692: updated UI to render deleted relationships differently from active ones
Repository: atlas Updated Branches: refs/heads/master 8119492fc -> 4d28dc241 ATLAS-2692: updated UI to render deleted relationships differently from active ones Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/4d28dc24 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/4d28dc24 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/4d28dc24 Branch: refs/heads/master Commit: 4d28dc241568010192f55a3d34cb7f7f1f88a9b2 Parents: 8119492 Author: kevalbhatt <kbh...@apache.org> Authored: Wed May 16 18:58:46 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Wed May 16 08:36:25 2018 -0700 -- dashboardv2/public/css/scss/common.scss | 6 ++ dashboardv2/public/css/scss/relationship.scss | 14 +++-- .../js/views/graph/RelationshipLayoutView.js| 22 +++- 3 files changed, 39 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/4d28dc24/dashboardv2/public/css/scss/common.scss -- diff --git a/dashboardv2/public/css/scss/common.scss b/dashboardv2/public/css/scss/common.scss index 761fa76..c6c369b 100644 --- a/dashboardv2/public/css/scss/common.scss +++ b/dashboardv2/public/css/scss/common.scss @@ -34,6 +34,12 @@ &.btn[data-id="addTag"] { display: none; } +&.btn[data-id="addTerm"] { +display: none; +} +&.btn[data-id="editButton"] { +display: none; +} &.editbutton[data-id="editButton"] { display: none !important; } http://git-wip-us.apache.org/repos/asf/atlas/blob/4d28dc24/dashboardv2/public/css/scss/relationship.scss -- diff --git a/dashboardv2/public/css/scss/relationship.scss b/dashboardv2/public/css/scss/relationship.scss index aad8063..f3e98b6 100644 --- a/dashboardv2/public/css/scss/relationship.scss +++ b/dashboardv2/public/css/scss/relationship.scss @@ -30,7 +30,7 @@ box-shadow: 4px 13px 14px -12px; background: #e7e7e7; transform: scaleX(0); -width: 200px; +width: 240px; transition: transform 0.3s ease-in; &.open { transform: scaleX(1); @@ -55,12 +55,22 @@ overflow: auto; list-style-type: decimal; list-style-position: outside; -padding-left: 30px; +padding-left: 15px; } ul>li { word-wrap: break-word; margin-bottom: 5px; text-align: left; + +&.deleted-relation { +a { +color: #BB5838 !important; +} +.deleteBtn { +padding: 2px 8px !important; +margin: 5px 5px !important; +} +} } } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/4d28dc24/dashboardv2/public/js/views/graph/RelationshipLayoutView.js -- diff --git a/dashboardv2/public/js/views/graph/RelationshipLayoutView.js b/dashboardv2/public/js/views/graph/RelationshipLayoutView.js index 7a51796e..edb7672 100644 --- a/dashboardv2/public/js/views/graph/RelationshipLayoutView.js +++ b/dashboardv2/public/js/views/graph/RelationshipLayoutView.js @@ -118,7 +118,9 @@ define(['require', this.$("[data-id='typeName']").text(typeName); var getElement = function(options) { var name = options.entityName ? options.entityName : Utils.getName(options, "displayText"); -return "" + _.escape(name) + " (" + options.typeName + ")"; +return "" + _.escape(name) + " (" + options.typeName + ")" + +'' + +""; } if (_.isArray(data)) { if (data.length > 1) { @@ -304,6 +306,20 @@ define(['require', }); } }) + +function isSingleRelationDeleted(data) { +var d = $.extend(true, {}, data); +if (!_.isArray(d.value)) { +d.value = [d.value]; +} +if (d && _.isArray(d.value)) { +if (d.value.length ==
[2/2] atlas git commit: ATLAS-2692: updated UI to render deleted relationships differently from active ones
ATLAS-2692: updated UI to render deleted relationships differently from active ones Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 4d28dc241568010192f55a3d34cb7f7f1f88a9b2) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/326282fc Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/326282fc Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/326282fc Branch: refs/heads/branch-1.0 Commit: 326282fc41206e340eb0c92c62ca24a3c395a194 Parents: 6f57b41 Author: kevalbhatt <kbh...@apache.org> Authored: Wed May 16 18:58:46 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Wed May 16 08:38:00 2018 -0700 -- dashboardv2/public/css/scss/common.scss | 6 ++ dashboardv2/public/css/scss/relationship.scss | 14 +++-- .../js/views/graph/RelationshipLayoutView.js| 22 +++- 3 files changed, 39 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/326282fc/dashboardv2/public/css/scss/common.scss -- diff --git a/dashboardv2/public/css/scss/common.scss b/dashboardv2/public/css/scss/common.scss index 761fa76..c6c369b 100644 --- a/dashboardv2/public/css/scss/common.scss +++ b/dashboardv2/public/css/scss/common.scss @@ -34,6 +34,12 @@ &.btn[data-id="addTag"] { display: none; } +&.btn[data-id="addTerm"] { +display: none; +} +&.btn[data-id="editButton"] { +display: none; +} &.editbutton[data-id="editButton"] { display: none !important; } http://git-wip-us.apache.org/repos/asf/atlas/blob/326282fc/dashboardv2/public/css/scss/relationship.scss -- diff --git a/dashboardv2/public/css/scss/relationship.scss b/dashboardv2/public/css/scss/relationship.scss index aad8063..f3e98b6 100644 --- a/dashboardv2/public/css/scss/relationship.scss +++ b/dashboardv2/public/css/scss/relationship.scss @@ -30,7 +30,7 @@ box-shadow: 4px 13px 14px -12px; background: #e7e7e7; transform: scaleX(0); -width: 200px; +width: 240px; transition: transform 0.3s ease-in; &.open { transform: scaleX(1); @@ -55,12 +55,22 @@ overflow: auto; list-style-type: decimal; list-style-position: outside; -padding-left: 30px; +padding-left: 15px; } ul>li { word-wrap: break-word; margin-bottom: 5px; text-align: left; + +&.deleted-relation { +a { +color: #BB5838 !important; +} +.deleteBtn { +padding: 2px 8px !important; +margin: 5px 5px !important; +} +} } } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/326282fc/dashboardv2/public/js/views/graph/RelationshipLayoutView.js -- diff --git a/dashboardv2/public/js/views/graph/RelationshipLayoutView.js b/dashboardv2/public/js/views/graph/RelationshipLayoutView.js index 7a51796e..edb7672 100644 --- a/dashboardv2/public/js/views/graph/RelationshipLayoutView.js +++ b/dashboardv2/public/js/views/graph/RelationshipLayoutView.js @@ -118,7 +118,9 @@ define(['require', this.$("[data-id='typeName']").text(typeName); var getElement = function(options) { var name = options.entityName ? options.entityName : Utils.getName(options, "displayText"); -return "" + _.escape(name) + " (" + options.typeName + ")"; +return "" + _.escape(name) + " (" + options.typeName + ")" + +'' + +""; } if (_.isArray(data)) { if (data.length > 1) { @@ -304,6 +306,20 @@ define(['require', }); } }) + +function isSingleRelationDeleted(data) { +var d = $.extend(true, {}, data); +if (!_.isArray(d.value)) { +d.value = [d.value]; +} +if (d && _.isArray(d.value)) { +if (d.value.length == 1 &
atlas git commit: ATLAS-2666: added unit tests to KafkaBridge
Repository: atlas Updated Branches: refs/heads/master 4d28dc241 -> 2798234df ATLAS-2666: added unit tests to KafkaBridge Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/2798234d Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/2798234d Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/2798234d Branch: refs/heads/master Commit: 2798234dfb8e7a6781b28cc1dbb8d3547591e336 Parents: 4d28dc2 Author: rmani <rm...@hortonworks.com> Authored: Thu May 10 12:08:43 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Wed May 16 17:11:53 2018 -0700 -- .../src/test/resources/policy-store.txt | 9 -- .../src/test/resources/policy-store.txt | 9 -- .../src/test/resources/policy-store.txt | 9 -- addons/kafka-bridge/pom.xml | 2 +- .../apache/atlas/kafka/bridge/KafkaBridge.java | 19 ++- .../atlas/kafka/bridge/KafkaBridgeTest.java | 132 ++ .../test/resources/atlas-application.properties | 124 + .../src/test/resources/atlas-log4j.xml | 137 +++ .../test/resources/users-credentials.properties | 3 + .../src/test/resources/policy-store.txt | 9 -- .../src/test/resources/policy-store.txt | 9 -- 11 files changed, 410 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/2798234d/addons/falcon-bridge/src/test/resources/policy-store.txt -- diff --git a/addons/falcon-bridge/src/test/resources/policy-store.txt b/addons/falcon-bridge/src/test/resources/policy-store.txt deleted file mode 100644 index 048affe..000 --- a/addons/falcon-bridge/src/test/resources/policy-store.txt +++ /dev/null @@ -1,9 +0,0 @@ -##Policy Format -##r-READ, w-WRITE, u-UPDATE, d-DELETE -##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name -## -adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* -dataScientistPolicyDATA_SCIENTIST:r;;type:*,entity:* -dataStewardPolicyDATA_STEWARD:rwu;;type:*,entity:* -hadoopPolicyhadoop:rwud;;type:*,entity:*,operation:* -rangerTagSyncPolicyRANGER_TAG_SYNC:r;;type:*,entity:* http://git-wip-us.apache.org/repos/asf/atlas/blob/2798234d/addons/hbase-bridge/src/test/resources/policy-store.txt -- diff --git a/addons/hbase-bridge/src/test/resources/policy-store.txt b/addons/hbase-bridge/src/test/resources/policy-store.txt deleted file mode 100644 index 048affe..000 --- a/addons/hbase-bridge/src/test/resources/policy-store.txt +++ /dev/null @@ -1,9 +0,0 @@ -##Policy Format -##r-READ, w-WRITE, u-UPDATE, d-DELETE -##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name -## -adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* -dataScientistPolicyDATA_SCIENTIST:r;;type:*,entity:* -dataStewardPolicyDATA_STEWARD:rwu;;type:*,entity:* -hadoopPolicyhadoop:rwud;;type:*,entity:*,operation:* -rangerTagSyncPolicyRANGER_TAG_SYNC:r;;type:*,entity:* http://git-wip-us.apache.org/repos/asf/atlas/blob/2798234d/addons/hive-bridge/src/test/resources/policy-store.txt -- diff --git a/addons/hive-bridge/src/test/resources/policy-store.txt b/addons/hive-bridge/src/test/resources/policy-store.txt deleted file mode 100644 index 048affe..000 --- a/addons/hive-bridge/src/test/resources/policy-store.txt +++ /dev/null @@ -1,9 +0,0 @@ -##Policy Format -##r-READ, w-WRITE, u-UPDATE, d-DELETE -##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name -## -adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* -dataScientistPolicyDATA_SCIENTIST:r;;type:*,entity:* -dataStewardPolicyDATA_STEWARD:rwu;;type:*,entity:* -hadoopPolicyhadoop:rwud;;type:*,entity:*,operation:* -rangerTagSyncPolicyRANGER_TAG_SYNC:r;;type:*,entity:* http://git-wip-us.apache.org/repos/asf/atlas/blob/2798234d/addons/kafka-bridge/pom.xml -- diff --git a/addons/kafka-bridge/pom.xml b/addons/kafka-bridge/pom.xml index 52f90d6..a43a063 100644 --- a/addons/kafka-bridge/pom.xml +++ b/addons/kafka-bridge/pom
atlas git commit: ATLAS-2666: added unit tests to KafkaBridge
Repository: atlas Updated Branches: refs/heads/branch-1.0 c89187032 -> 40bb14628 ATLAS-2666: added unit tests to KafkaBridge Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 2798234dfb8e7a6781b28cc1dbb8d3547591e336) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/40bb1462 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/40bb1462 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/40bb1462 Branch: refs/heads/branch-1.0 Commit: 40bb14628ec0b2f29e7e366036b542aa283742dc Parents: c891870 Author: rmani <rm...@hortonworks.com> Authored: Thu May 10 12:08:43 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Wed May 16 17:16:24 2018 -0700 -- .../src/test/resources/policy-store.txt | 9 -- .../src/test/resources/policy-store.txt | 9 -- .../src/test/resources/policy-store.txt | 9 -- addons/kafka-bridge/pom.xml | 2 +- .../apache/atlas/kafka/bridge/KafkaBridge.java | 19 ++- .../atlas/kafka/bridge/KafkaBridgeTest.java | 132 ++ .../test/resources/atlas-application.properties | 124 + .../src/test/resources/atlas-log4j.xml | 137 +++ .../test/resources/users-credentials.properties | 3 + .../src/test/resources/policy-store.txt | 9 -- .../src/test/resources/policy-store.txt | 9 -- 11 files changed, 410 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/40bb1462/addons/falcon-bridge/src/test/resources/policy-store.txt -- diff --git a/addons/falcon-bridge/src/test/resources/policy-store.txt b/addons/falcon-bridge/src/test/resources/policy-store.txt deleted file mode 100644 index 048affe..000 --- a/addons/falcon-bridge/src/test/resources/policy-store.txt +++ /dev/null @@ -1,9 +0,0 @@ -##Policy Format -##r-READ, w-WRITE, u-UPDATE, d-DELETE -##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name -## -adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* -dataScientistPolicyDATA_SCIENTIST:r;;type:*,entity:* -dataStewardPolicyDATA_STEWARD:rwu;;type:*,entity:* -hadoopPolicyhadoop:rwud;;type:*,entity:*,operation:* -rangerTagSyncPolicyRANGER_TAG_SYNC:r;;type:*,entity:* http://git-wip-us.apache.org/repos/asf/atlas/blob/40bb1462/addons/hbase-bridge/src/test/resources/policy-store.txt -- diff --git a/addons/hbase-bridge/src/test/resources/policy-store.txt b/addons/hbase-bridge/src/test/resources/policy-store.txt deleted file mode 100644 index 048affe..000 --- a/addons/hbase-bridge/src/test/resources/policy-store.txt +++ /dev/null @@ -1,9 +0,0 @@ -##Policy Format -##r-READ, w-WRITE, u-UPDATE, d-DELETE -##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name -## -adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* -dataScientistPolicyDATA_SCIENTIST:r;;type:*,entity:* -dataStewardPolicyDATA_STEWARD:rwu;;type:*,entity:* -hadoopPolicyhadoop:rwud;;type:*,entity:*,operation:* -rangerTagSyncPolicyRANGER_TAG_SYNC:r;;type:*,entity:* http://git-wip-us.apache.org/repos/asf/atlas/blob/40bb1462/addons/hive-bridge/src/test/resources/policy-store.txt -- diff --git a/addons/hive-bridge/src/test/resources/policy-store.txt b/addons/hive-bridge/src/test/resources/policy-store.txt deleted file mode 100644 index 048affe..000 --- a/addons/hive-bridge/src/test/resources/policy-store.txt +++ /dev/null @@ -1,9 +0,0 @@ -##Policy Format -##r-READ, w-WRITE, u-UPDATE, d-DELETE -##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name -## -adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* -dataScientistPolicyDATA_SCIENTIST:r;;type:*,entity:* -dataStewardPolicyDATA_STEWARD:rwu;;type:*,entity:* -hadoopPolicyhadoop:rwud;;type:*,entity:*,operation:* -rangerTagSyncPolicyRANGER_TAG_SYNC:r;;type:*,entity:* http://git-wip-us.apache.org/repos/asf/atlas/blob/40bb1462/addons/kafka-bridge/pom.xml -- diff --git a/addons/kafka-bridge/pom.xml b/addons/kafka-bridge/pom.xml index e0a3dbb..7c86f99 100644 ---
[1/2] atlas git commit: ATLAS-2706: UI : Change the labels of propagation classification popup
Repository: atlas Updated Branches: refs/heads/master eaf067bc1 -> 65338c4de ATLAS-2706: UI : Change the labels of propagation classification popup Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/02659550 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/02659550 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/02659550 Branch: refs/heads/master Commit: 026595501fc3de37f3993d4bb9c0e52f0f23c8d9 Parents: eaf067b Author: kevalbhatt <kbh...@apache.org> Authored: Mon May 21 12:43:29 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Mon May 21 07:02:38 2018 -0700 -- .../templates/graph/PropagationPropertyModalView_tmpl.html | 4 ++-- .../public/js/views/graph/PropagationPropertyModal.js| 8 2 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/02659550/dashboardv2/public/js/templates/graph/PropagationPropertyModalView_tmpl.html -- diff --git a/dashboardv2/public/js/templates/graph/PropagationPropertyModalView_tmpl.html b/dashboardv2/public/js/templates/graph/PropagationPropertyModalView_tmpl.html index 6aae481..7dc4850 100644 --- a/dashboardv2/public/js/templates/graph/PropagationPropertyModalView_tmpl.html +++ b/dashboardv2/public/js/templates/graph/PropagationPropertyModalView_tmpl.html @@ -18,12 +18,12 @@ -Propagation flow +Enable/Disable Propagation -Block propagation +Select Classifications to Block Propagation http://git-wip-us.apache.org/repos/asf/atlas/blob/02659550/dashboardv2/public/js/views/graph/PropagationPropertyModal.js -- diff --git a/dashboardv2/public/js/views/graph/PropagationPropertyModal.js b/dashboardv2/public/js/views/graph/PropagationPropertyModal.js index 5972ea8..9aef264 100644 --- a/dashboardv2/public/js/views/graph/PropagationPropertyModal.js +++ b/dashboardv2/public/js/views/graph/PropagationPropertyModal.js @@ -124,7 +124,7 @@ define(['require', this.viewType = 'flow'; var that = this, modalObj = { -title: 'Edit Propagation Flow', +title: 'Enable/Disable Propagation', content: this, okText: 'Update', okCloses: false, @@ -301,7 +301,7 @@ define(['require', propagationStringValue += getTableRow({ "val": val, fromBlockClassification: false }); }); -classificationTableValue = "Block Propagatation TableClassificationEntity NameBlock Propagatation" + propagationStringValue + ""; +classificationTableValue = "ClassificationEntity NameBlock Propagatation" + propagationStringValue + ""; this.ui.PropagatedClassificationTable.append(_.isEmpty(propagationStringValue) ? "No Records Found." : classificationTableValue); }, @@ -333,12 +333,12 @@ define(['require', showEditPropagation: function() { this.$('.editPropagation').show(); this.$('.propagatedClassificationTable').hide(); -this.modal.$el.find('.modal-title').text("Edit Propagation Flow"); +this.modal.$el.find('.modal-title').text("Enable/Disable Propagation"); }, showPropagatedClassificationTable: function() { this.$('.editPropagation').hide(); this.$('.propagatedClassificationTable').show(); -this.modal.$el.find('.modal-title').text("Block Propagation Table"); +this.modal.$el.find('.modal-title').text("Select Classifications to Block Propagation"); } });
[2/2] atlas git commit: ATLAS-2706: UI : Change the labels of propagation classification popup
ATLAS-2706: UI : Change the labels of propagation classification popup Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 026595501fc3de37f3993d4bb9c0e52f0f23c8d9) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/4427f73e Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/4427f73e Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/4427f73e Branch: refs/heads/branch-1.0 Commit: 4427f73ef02dcb5fec9040553c2d2d3d45a4332d Parents: 8d8b81c Author: kevalbhatt <kbh...@apache.org> Authored: Mon May 21 12:43:29 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Mon May 21 07:40:13 2018 -0700 -- .../templates/graph/PropagationPropertyModalView_tmpl.html | 4 ++-- .../public/js/views/graph/PropagationPropertyModal.js| 8 2 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/4427f73e/dashboardv2/public/js/templates/graph/PropagationPropertyModalView_tmpl.html -- diff --git a/dashboardv2/public/js/templates/graph/PropagationPropertyModalView_tmpl.html b/dashboardv2/public/js/templates/graph/PropagationPropertyModalView_tmpl.html index 6aae481..7dc4850 100644 --- a/dashboardv2/public/js/templates/graph/PropagationPropertyModalView_tmpl.html +++ b/dashboardv2/public/js/templates/graph/PropagationPropertyModalView_tmpl.html @@ -18,12 +18,12 @@ -Propagation flow +Enable/Disable Propagation -Block propagation +Select Classifications to Block Propagation http://git-wip-us.apache.org/repos/asf/atlas/blob/4427f73e/dashboardv2/public/js/views/graph/PropagationPropertyModal.js -- diff --git a/dashboardv2/public/js/views/graph/PropagationPropertyModal.js b/dashboardv2/public/js/views/graph/PropagationPropertyModal.js index 5972ea8..9aef264 100644 --- a/dashboardv2/public/js/views/graph/PropagationPropertyModal.js +++ b/dashboardv2/public/js/views/graph/PropagationPropertyModal.js @@ -124,7 +124,7 @@ define(['require', this.viewType = 'flow'; var that = this, modalObj = { -title: 'Edit Propagation Flow', +title: 'Enable/Disable Propagation', content: this, okText: 'Update', okCloses: false, @@ -301,7 +301,7 @@ define(['require', propagationStringValue += getTableRow({ "val": val, fromBlockClassification: false }); }); -classificationTableValue = "Block Propagatation TableClassificationEntity NameBlock Propagatation" + propagationStringValue + ""; +classificationTableValue = "ClassificationEntity NameBlock Propagatation" + propagationStringValue + ""; this.ui.PropagatedClassificationTable.append(_.isEmpty(propagationStringValue) ? "No Records Found." : classificationTableValue); }, @@ -333,12 +333,12 @@ define(['require', showEditPropagation: function() { this.$('.editPropagation').show(); this.$('.propagatedClassificationTable').hide(); -this.modal.$el.find('.modal-title').text("Edit Propagation Flow"); +this.modal.$el.find('.modal-title').text("Enable/Disable Propagation"); }, showPropagatedClassificationTable: function() { this.$('.editPropagation').hide(); this.$('.propagatedClassificationTable').show(); -this.modal.$el.find('.modal-title').text("Block Propagation Table"); +this.modal.$el.find('.modal-title').text("Select Classifications to Block Propagation"); } });
[1/2] atlas git commit: ATLAS-2707: Audit detail table is not able to render object type
Repository: atlas Updated Branches: refs/heads/branch-1.0 8d8b81c30 -> 4d4bd5564 ATLAS-2707: Audit detail table is not able to render object type Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 65338c4ded5fbfe43e7e645b62010b8c4218b8f6) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/4d4bd556 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/4d4bd556 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/4d4bd556 Branch: refs/heads/branch-1.0 Commit: 4d4bd556473dd67e4f1162a2433385978091b253 Parents: 4427f73 Author: kevalbhatt <kbh...@apache.org> Authored: Mon May 21 17:11:18 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Mon May 21 07:40:13 2018 -0700 -- dashboardv2/public/js/utils/CommonViewFunction.js | 6 +- .../public/js/views/audit/CreateAuditTableLayoutView.js| 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/4d4bd556/dashboardv2/public/js/utils/CommonViewFunction.js -- diff --git a/dashboardv2/public/js/utils/CommonViewFunction.js b/dashboardv2/public/js/utils/CommonViewFunction.js index bcff5e4..171f662 100644 --- a/dashboardv2/public/js/utils/CommonViewFunction.js +++ b/dashboardv2/public/js/utils/CommonViewFunction.js @@ -221,6 +221,10 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum val = '' + keyValue + ''; } else if (key.toLocaleLowerCase().indexOf("time") !== -1 || key.toLocaleLowerCase().indexOf("date") !== -1) { val = new Date(keyValue); + +if (isNaN(val.getTime())) { +val = _.escape(keyValue); +} } else { val = _.escape(keyValue); } @@ -824,4 +828,4 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum } } return CommonViewFunction; -}); \ No newline at end of file +}); http://git-wip-us.apache.org/repos/asf/atlas/blob/4d4bd556/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js -- diff --git a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js index 5670b8c..02b4c6f 100644 --- a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js +++ b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js @@ -83,7 +83,7 @@ define(['require', this.ui.name.text(name); if (parseDetailsObject) { this.ui.auditHeaderValue.html('KeyNew Value'); -table = CommonViewFunction.propertyTable({ scope: this, valueObject: parseDetailsObject, attributeDefs: this.attributeDefs, extractJSON: { extractKey: 'value' } }); +table = CommonViewFunction.propertyTable({ scope: this, valueObject: parseDetailsObject, attributeDefs: this.attributeDefs }); if (table.length) { this.ui.noData.hide(); this.ui.tableAudit.show();
atlas git commit: ATLAS-2711: Fix duplicate qualifiedName issue
Repository: atlas Updated Branches: refs/heads/branch-1.0 a95fcdb55 -> 1e9c71152 ATLAS-2711: Fix duplicate qualifiedName issue Change-Id: I23b53086b2bb2380f451e7d85b59096edc610181 (cherry picked from commit 96e5f1cbda1ce2d645cf4159d0f02051005437a9) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/1e9c7115 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/1e9c7115 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/1e9c7115 Branch: refs/heads/branch-1.0 Commit: 1e9c71152dc3c05101805d04317c69b5a67fea30 Parents: a95fcdb Author: apoorvnaik <apoorvn...@apache.org> Authored: Mon May 21 17:20:13 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Tue May 22 10:07:46 2018 -0700 -- .../apache/atlas/glossary/GlossaryService.java | 63 +--- 1 file changed, 42 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/1e9c7115/repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java -- diff --git a/repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java b/repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java index bd9095b..a5499e0 100644 --- a/repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java +++ b/repository/src/main/java/org/apache/atlas/glossary/GlossaryService.java @@ -352,6 +352,11 @@ public class GlossaryService { storeObject = dataAccess.load(glossaryTerm); } else { glossaryTerm.setQualifiedName(storeObject.getQualifiedName()); + +if (termExists(glossaryTerm)) { +throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_TERM_ALREADY_EXISTS, glossaryTerm.getQualifiedName()); +} + storeObject = dataAccess.save(glossaryTerm); } setInfoForRelations(storeObject); @@ -412,16 +417,21 @@ public class GlossaryService { storeObject = dataAccess.save(atlasGlossaryTerm); } catch (AtlasBaseException e) { LOG.debug("Glossary term had no immediate attr updates. Exception: {}", e.getMessage()); -} finally { -glossaryTermUtils.processTermRelations(storeObject, atlasGlossaryTerm, GlossaryUtils.RelationshipOperation.UPDATE); +} -// If qualifiedName changes due to anchor change, we need to persist the term again with updated qualifiedName -if (StringUtils.equals(storeObject.getQualifiedName(), atlasGlossaryTerm.getQualifiedName())) { -storeObject = dataAccess.load(atlasGlossaryTerm); -} else { - atlasGlossaryTerm.setQualifiedName(storeObject.getQualifiedName()); -storeObject = dataAccess.save(atlasGlossaryTerm); +glossaryTermUtils.processTermRelations(storeObject, atlasGlossaryTerm, GlossaryUtils.RelationshipOperation.UPDATE); + +// If qualifiedName changes due to anchor change, we need to persist the term again with updated qualifiedName +if (StringUtils.equals(storeObject.getQualifiedName(), atlasGlossaryTerm.getQualifiedName())) { +storeObject = dataAccess.load(atlasGlossaryTerm); +} else { + atlasGlossaryTerm.setQualifiedName(storeObject.getQualifiedName()); + +if (termExists(atlasGlossaryTerm)) { +throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_TERM_ALREADY_EXISTS, atlasGlossaryTerm.getQualifiedName()); } + +storeObject = dataAccess.save(atlasGlossaryTerm); } } @@ -546,17 +556,22 @@ public class GlossaryService { // Attempt relation creation and gather all impacted categories Map<String, AtlasGlossaryCategory> impactedCategories = glossaryCategoryUtils.processCategoryRelations(storeObject, glossaryCategory, GlossaryUtils.RelationshipOperation.CREATE); -// Re save the categories in case any qualifiedName change has occurred -dataAccess.save(impactedCategories.values()); - // Since the current category is also affected, we need to update qualifiedName and save again if (StringUtils.equals(glossaryCategory.getQualifiedName(), storeObject.getQualifiedName())) { storeObject = dataAccess.load(glossaryCategory); } else { glossaryCategory.setQualifiedName(storeObject.getQualifiedName()); + +if (categoryExists(glossaryCategory)) { +throw new AtlasBaseException(AtlasErrorCode.GLOSSARY_CATEGORY_ALREADY_EXISTS, glossaryCategory.getQualifiedName()); +} +
atlas git commit: ATLAS-2637: migration-import updates - fix for UT failure
Repository: atlas Updated Branches: refs/heads/master d343a4860 -> 2bb7f7784 ATLAS-2637: migration-import updates - fix for UT failure Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/2bb7f778 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/2bb7f778 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/2bb7f778 Branch: refs/heads/master Commit: 2bb7f778443d3a0fdceb4e5bb7a434f1fd3cdc45 Parents: d343a48 Author: Madhan Neethiraj <mad...@apache.org> Authored: Wed May 23 00:29:08 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Wed May 23 00:29:08 2018 -0700 -- .../repository/migration/RelationshipCacheGeneratorTest.java | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/2bb7f778/repository/src/test/java/org/apache/atlas/repository/migration/RelationshipCacheGeneratorTest.java -- diff --git a/repository/src/test/java/org/apache/atlas/repository/migration/RelationshipCacheGeneratorTest.java b/repository/src/test/java/org/apache/atlas/repository/migration/RelationshipCacheGeneratorTest.java index 362990f..050bda3 100644 --- a/repository/src/test/java/org/apache/atlas/repository/migration/RelationshipCacheGeneratorTest.java +++ b/repository/src/test/java/org/apache/atlas/repository/migration/RelationshipCacheGeneratorTest.java @@ -61,8 +61,6 @@ public class RelationshipCacheGeneratorTest { public void createLookup() { final String PROCESS_INPUT_KEY = "__Process.inputs"; final String PROCESS_OUTPUT_KEY = "__Process.outputs"; -String ONE_TO_TWO_STR = ONE_TO_TWO.toString(); -String TWO_TO_ONE_STR = TWO_TO_ONE.toString(); Map<String, RelationshipCacheGenerator.TypeInfo> cache = RelationshipCacheGenerator.get(typeRegistry); assertEquals(cache.size(), getLegacyAttributeCount() - 1); @@ -72,10 +70,10 @@ public class RelationshipCacheGeneratorTest { } assertEquals(cache.get(PROCESS_INPUT_KEY).getTypeName(), "dataset_process_inputs"); -assertEquals(cache.get(PROCESS_INPUT_KEY).getPropagateTags(), ONE_TO_TWO_STR); +assertEquals(cache.get(PROCESS_INPUT_KEY).getPropagateTags(), TWO_TO_ONE); assertEquals(cache.get(PROCESS_OUTPUT_KEY).getTypeName(), "process_dataset_outputs"); -assertEquals(cache.get(PROCESS_OUTPUT_KEY).getPropagateTags(), TWO_TO_ONE_STR); +assertEquals(cache.get(PROCESS_OUTPUT_KEY).getPropagateTags(), ONE_TO_TWO); } private int getLegacyAttributeCount() {
atlas git commit: ATLAS-2637: migration-import updates - fix for UT failure
Repository: atlas Updated Branches: refs/heads/branch-1.0 bf037c92e -> 0975f7d69 ATLAS-2637: migration-import updates - fix for UT failure (cherry picked from commit 2bb7f778443d3a0fdceb4e5bb7a434f1fd3cdc45) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/0975f7d6 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/0975f7d6 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/0975f7d6 Branch: refs/heads/branch-1.0 Commit: 0975f7d69cba2edeeaa013535e54493e834bd9f1 Parents: bf037c9 Author: Madhan Neethiraj <mad...@apache.org> Authored: Wed May 23 00:29:08 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Wed May 23 00:29:34 2018 -0700 -- .../repository/migration/RelationshipCacheGeneratorTest.java | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/0975f7d6/repository/src/test/java/org/apache/atlas/repository/migration/RelationshipCacheGeneratorTest.java -- diff --git a/repository/src/test/java/org/apache/atlas/repository/migration/RelationshipCacheGeneratorTest.java b/repository/src/test/java/org/apache/atlas/repository/migration/RelationshipCacheGeneratorTest.java index 362990f..050bda3 100644 --- a/repository/src/test/java/org/apache/atlas/repository/migration/RelationshipCacheGeneratorTest.java +++ b/repository/src/test/java/org/apache/atlas/repository/migration/RelationshipCacheGeneratorTest.java @@ -61,8 +61,6 @@ public class RelationshipCacheGeneratorTest { public void createLookup() { final String PROCESS_INPUT_KEY = "__Process.inputs"; final String PROCESS_OUTPUT_KEY = "__Process.outputs"; -String ONE_TO_TWO_STR = ONE_TO_TWO.toString(); -String TWO_TO_ONE_STR = TWO_TO_ONE.toString(); Map<String, RelationshipCacheGenerator.TypeInfo> cache = RelationshipCacheGenerator.get(typeRegistry); assertEquals(cache.size(), getLegacyAttributeCount() - 1); @@ -72,10 +70,10 @@ public class RelationshipCacheGeneratorTest { } assertEquals(cache.get(PROCESS_INPUT_KEY).getTypeName(), "dataset_process_inputs"); -assertEquals(cache.get(PROCESS_INPUT_KEY).getPropagateTags(), ONE_TO_TWO_STR); +assertEquals(cache.get(PROCESS_INPUT_KEY).getPropagateTags(), TWO_TO_ONE); assertEquals(cache.get(PROCESS_OUTPUT_KEY).getTypeName(), "process_dataset_outputs"); -assertEquals(cache.get(PROCESS_OUTPUT_KEY).getPropagateTags(), TWO_TO_ONE_STR); +assertEquals(cache.get(PROCESS_OUTPUT_KEY).getPropagateTags(), ONE_TO_TWO); } private int getLegacyAttributeCount() {
[8/8] atlas git commit: ATLAS-2712: Update v2 Audit API to handle v1 to v2 conversion
ATLAS-2712: Update v2 Audit API to handle v1 to v2 conversion Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit d343a4860df49e767eeefd46ab5fa2b147cc5cd3) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/bf037c92 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/bf037c92 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/bf037c92 Branch: refs/heads/branch-1.0 Commit: bf037c92e643659b8ad0580afd3b52a7e1051785 Parents: 5cbfca2 Author: Sarath Subramanian <ssubraman...@hortonworks.com> Authored: Tue May 22 18:38:33 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Tue May 22 23:11:56 2018 -0700 -- .../atlas/model/audit/EntityAuditEventV2.java | 51 +-- .../AbstractStorageBasedAuditRepository.java| 19 ++- .../audit/CassandraBasedAuditRepository.java| 4 +- .../repository/audit/EntityAuditListener.java | 42 +- .../repository/audit/EntityAuditListenerV2.java | 76 +++--- .../audit/HBaseBasedAuditRepository.java| 151 --- .../converters/AtlasInstanceConverter.java | 28 ++-- .../graph/v1/AtlasEntityChangeNotifier.java | 8 +- .../audit/AuditRepositoryTestBase.java | 8 +- 9 files changed, 300 insertions(+), 87 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/bf037c92/intg/src/main/java/org/apache/atlas/model/audit/EntityAuditEventV2.java -- diff --git a/intg/src/main/java/org/apache/atlas/model/audit/EntityAuditEventV2.java b/intg/src/main/java/org/apache/atlas/model/audit/EntityAuditEventV2.java index d14f6ae..787f5a9 100644 --- a/intg/src/main/java/org/apache/atlas/model/audit/EntityAuditEventV2.java +++ b/intg/src/main/java/org/apache/atlas/model/audit/EntityAuditEventV2.java @@ -32,6 +32,7 @@ import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; +import static org.apache.atlas.model.audit.EntityAuditEventV2.EntityAuditType.ENTITY_AUDIT_V2; /** * Structure of v2 entity audit event @@ -42,13 +43,15 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ @XmlRootElement @XmlAccessorType(XmlAccessType.PROPERTY) public class EntityAuditEventV2 implements Serializable { -public enum EntityAuditAction { +public enum EntityAuditType { ENTITY_AUDIT_V1, ENTITY_AUDIT_V2 } + +public enum EntityAuditActionV2 { ENTITY_CREATE, ENTITY_UPDATE, ENTITY_DELETE, ENTITY_IMPORT_CREATE, ENTITY_IMPORT_UPDATE, ENTITY_IMPORT_DELETE, CLASSIFICATION_ADD, CLASSIFICATION_DELETE, CLASSIFICATION_UPDATE, PROPAGATED_CLASSIFICATION_ADD, PROPAGATED_CLASSIFICATION_DELETE, PROPAGATED_CLASSIFICATION_UPDATE; -public static EntityAuditAction fromString(String strValue) { +public static EntityAuditActionV2 fromString(String strValue) { switch (strValue) { case "ENTITY_CREATE": return ENTITY_CREATE; @@ -79,28 +82,35 @@ public class EntityAuditEventV2 implements Serializable { return PROPAGATED_CLASSIFICATION_UPDATE; } -throw new IllegalArgumentException("No enum constant " + EntityAuditAction.class.getCanonicalName() + "." + strValue); +throw new IllegalArgumentException("No enum constant " + EntityAuditActionV2.class.getCanonicalName() + "." + strValue); } } -private StringentityId; -private long timestamp; -private Stringuser; -private EntityAuditAction action; -private Stringdetails; -private StringeventKey; -private AtlasEntity entity; +private String entityId; +private longtimestamp; +private String user; +private EntityAuditActionV2 action; +private String details; +private String eventKey; +private AtlasEntity entity; +private EntityAuditType type; public EntityAuditEventV2() { } -public EntityAuditEventV2(String entityId, long timestamp, String user, EntityAuditAction action, String details, +public EntityAuditEventV2(String entityId, long timestamp, String user, EntityAuditActionV2 action, String details, AtlasEntity entity) { +this(entityId, timestamp, user, action, details, entity, ENTITY_AUDIT_V2); +} + +public EntityAuditEventV2(String entityId, long timestamp, String user, EntityAuditActionV2 actio
[1/8] atlas git commit: ATLAS-2705 #2
Repository: atlas Updated Branches: refs/heads/branch-1.0 1e9c71152 -> bf037c92e ATLAS-2705 #2 Change-Id: I37796a6596cb284ba885dc05ffacd1dd7bcb6fba (cherry picked from commit a0269b9ce8c1ebbe056b786f4bc1e3a522ca0e50) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/e5e45589 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/e5e45589 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/e5e45589 Branch: refs/heads/branch-1.0 Commit: e5e45589cbb0f4f96ffe8ae64342a580f36ed9b4 Parents: 1e9c711 Author: apoorvnaik <apoorvn...@apache.org> Authored: Tue May 22 14:11:26 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Tue May 22 23:11:12 2018 -0700 -- .../atlas/glossary/GlossaryCategoryUtils.java | 16 +- .../atlas/glossary/GlossaryTermUtils.java | 10 +++--- .../store/graph/AtlasRelationshipStore.java | 7 + .../graph/v1/AtlasRelationshipStoreV1.java | 10 -- .../store/graph/v1/DeleteHandlerV1.java | 33 5 files changed, 35 insertions(+), 41 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/e5e45589/repository/src/main/java/org/apache/atlas/glossary/GlossaryCategoryUtils.java -- diff --git a/repository/src/main/java/org/apache/atlas/glossary/GlossaryCategoryUtils.java b/repository/src/main/java/org/apache/atlas/glossary/GlossaryCategoryUtils.java index 42cdef8..38ce147 100644 --- a/repository/src/main/java/org/apache/atlas/glossary/GlossaryCategoryUtils.java +++ b/repository/src/main/java/org/apache/atlas/glossary/GlossaryCategoryUtils.java @@ -113,7 +113,7 @@ public class GlossaryCategoryUtils extends GlossaryUtils { updatedCategory.getAnchor().getGlossaryGuid(), storeObject.getGuid()); } - relationshipStore.deleteById(storeObject.getAnchor().getRelationGuid()); + relationshipStore.deleteById(storeObject.getAnchor().getRelationGuid(), true); // Derive the qualifiedName when anchor changes StringanchorGlossaryGuid = updatedCategory.getAnchor().getGlossaryGuid(); @@ -135,7 +135,7 @@ public class GlossaryCategoryUtils extends GlossaryUtils { if (DEBUG_ENABLED) { LOG.debug("Deleting category anchor"); } - relationshipStore.deleteById(storeObject.getAnchor().getRelationGuid()); + relationshipStore.deleteById(storeObject.getAnchor().getRelationGuid(), true); } break; } @@ -174,7 +174,7 @@ public class GlossaryCategoryUtils extends GlossaryUtils { relationshipStore.update(parentRelationship); } else { // Delete link to existing parent and link to new parent - relationshipStore.deleteById(parentRelationship.getGuid()); + relationshipStore.deleteById(parentRelationship.getGuid(), true); createRelationship(defineCategoryHierarchyLink(newParent, storeObject.getGuid())); } } @@ -209,7 +209,7 @@ public class GlossaryCategoryUtils extends GlossaryUtils { if (DEBUG_ENABLED) { LOG.debug("Removing category parent, category = {}, parent = {}", storeObject.getGuid(), existingParent.getDisplayText()); } -relationshipStore.deleteById(existingParent.getRelationGuid()); +relationshipStore.deleteById(existingParent.getRelationGuid(), true); // Parent deleted, qualifiedName needs recomputation @@ -343,7 +343,7 @@ public class GlossaryCategoryUtils extends GlossaryUtils { if (DEBUG_ENABLED) { LOG.debug("Creating term relation with category = {}, terms = {}", storeObject.getDisplayName(), term.getDisplayText()); } -relationshipStore.deleteById(term.getRelationGuid()); +relationshipStore.deleteById(term.getRelationGuid(), true); } } } @@ -485,7 +485,7 @@ public class GlossaryCategoryUtils extends GlossaryUtils { if (DEBUG_ENABLED) { LOG.debug("Deleting child, category = {}, child = {}", storeObject.getDisplayName(), child.getDisplayText()); } -relationshipStore.deleteById(child.getRelationGuid()); +relationshipStore.deleteById(child.getRelationGuid(), true); } } } @@ -565,9 +565,11 @@ p
[4/8] atlas git commit: ATLAS-2637: migration-import updates for changes in collection attribute storage
http://git-wip-us.apache.org/repos/asf/atlas/blob/5cbfca24/repository/src/test/resources/complex-attr_db/atlas-migration-data.json -- diff --git a/repository/src/test/resources/complex-attr_db/atlas-migration-data.json b/repository/src/test/resources/complex-attr_db/atlas-migration-data.json new file mode 100644 index 000..e7330e2 --- /dev/null +++ b/repository/src/test/resources/complex-attr_db/atlas-migration-data.json @@ -0,0 +1,5569 @@ +{ + "mode": "EXTENDED", + "vertices": [ +{ + "__type.name": { +"type": "string", +"value": "TaxonomyTerm" + }, + "__type.TaxonomyTerm.atlas.taxonomy": { +"type": "string", +"value": "{\"multiplicity\":\"{\\\"lower\\\":0,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":false,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"string\",\"name\":\"atlas.taxonomy\",\"isUnique\":false}" + }, + "__modifiedBy": { +"type": "string", +"value": "root" + }, + "__type.options": { +"type": "string", +"value": "null" + }, + "__guid": { +"type": "string", +"value": "5af3e7e8-68a6-4cf6-b88e-4c619731f3e2" + }, + "__version": { +"type": "long", +"value": 1 + }, + "__type.TaxonomyTerm": { +"type": "list", +"value": [ + { +"type": "string", +"value": "atlas.taxonomy" + } +] + }, + "__type.category": { +"type": "string", +"value": "TRAIT" + }, + "__type.version": { +"type": "string", +"value": "1.0" + }, + "__createdBy": { +"type": "string", +"value": "root" + }, + "__modificationTimestamp": { +"type": "long", +"value": 1523656711303 + }, + "__type": { +"type": "string", +"value": "typeSystem" + }, + "__type.description": { +"type": "string", +"value": "TaxonomyTerm" + }, + "__timestamp": { +"type": "long", +"value": 1523656711303 + }, + "_id": 16400, + "_type": "vertex" +}, +{ + "__type.name": { +"type": "string", +"value": "Referenceable" + }, + "__modifiedBy": { +"type": "string", +"value": "root" + }, + "__type.options": { +"type": "string", +"value": "null" + }, + "__type.Referenceable": { +"type": "list", +"value": [ + { +"type": "string", +"value": "qualifiedName" + } +] + }, + "__guid": { +"type": "string", +"value": "f4b80d9b-e72c-419f-ab40-9a3256a541b9" + }, + "__version": { +"type": "long", +"value": 1 + }, + "__type.category": { +"type": "string", +"value": "CLASS" + }, + "__type.version": { +"type": "string", +"value": "1.0" + }, + "__createdBy": { +"type": "string", +"value": "root" + }, + "__modificationTimestamp": { +"type": "long", +"value": 1523656711776 + }, + "__type": { +"type": "string", +"value": "typeSystem" + }, + "__type.Referenceable.qualifiedName": { +"type": "string", +"value": "{\"multiplicity\":\"{\\\"lower\\\":1,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":true,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"string\",\"name\":\"qualifiedName\",\"isUnique\":true}" + }, + "__type.description": { +"type": "string", +"value": "Referenceable" + }, + "__timestamp": { +"type": "long", +"value": 1523656711776 + }, + "_id": 32784, + "_type": "vertex" +}, +{ + "__type.name": { +"type": "string", +"value": "__internal" + }, + "__version": { +"type": "long", +"value": 1 + }, + "__type.category": { +"type": "string", +"value": "CLASS" + }, + "__modifiedBy": { +"type": "string", +"value": "root" + }, + "__type.version": { +"type": "string", +"value": "1.0" + }, + "__createdBy": { +"type": "string", +"value": "root" + }, + "__modificationTimestamp": { +"type": "long", +"value": 1523656711806 + }, + "__type": { +"type": "string", +"value": "typeSystem" + }, + "__type.options": { +"type": "string", +"value": "null" + }, + "__type.description": { +"type": "string", +"value": "__internal" + }, + "__guid": { +"type": "string", +"value": "25e22509-b6fd-42ed-b5bc-8e1726f37103" + }, + "__timestamp": { +
[5/8] atlas git commit: ATLAS-2637: migration-import updates for changes in collection attribute storage
http://git-wip-us.apache.org/repos/asf/atlas/blob/5cbfca24/repository/src/test/java/org/apache/atlas/repository/migration/TypesWithCollectionsFinderTest.java -- diff --git a/repository/src/test/java/org/apache/atlas/repository/migration/TypesWithCollectionsFinderTest.java b/repository/src/test/java/org/apache/atlas/repository/migration/TypesWithCollectionsFinderTest.java new file mode 100644 index 000..4b236c1 --- /dev/null +++ b/repository/src/test/java/org/apache/atlas/repository/migration/TypesWithCollectionsFinderTest.java @@ -0,0 +1,84 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.atlas.repository.migration; + +import com.google.inject.Inject; +import org.apache.atlas.TestModules; +import org.apache.atlas.exception.AtlasBaseException; +import org.apache.atlas.repository.graphdb.AtlasGraph; +import org.apache.atlas.repository.graphdb.janus.migration.TypesWithCollectionsFinder; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Guice; +import org.testng.annotations.Test; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +@Guice(modules = TestModules.TestOnlyModule.class) +public class TypesWithCollectionsFinderTest extends MigrationBaseAsserts { +@Inject +protected TypesWithCollectionsFinderTest(AtlasGraph graph) { +super(graph); +} + +@BeforeClass +public void setup() throws IOException, AtlasBaseException { +loadTypesFromJson(); +} + +@Test +public void fetchAll() { +Map> typeAttrMap = TypesWithCollectionsFinder.getVertexPropertiesForCollectionAttributes(typeRegistry); + +assertEquals(typeAttrMap.size(), 9); + +assertProperties(typeAttrMap, "__AtlasUserProfile", "ARRAY", "__AtlasUserProfile.savedSearches"); + +assertProperties(typeAttrMap, "Process", "ARRAY", "Process.inputs"); +assertProperties(typeAttrMap, "Process", "ARRAY", "Process.outputs"); + +assertProperties(typeAttrMap, "hdfs_path", "MAP_PRIMITIVE", "hdfs_path.extendedAttributes"); + +assertProperties(typeAttrMap, "hive_column_lineage", "ARRAY", "Process.inputs"); +assertProperties(typeAttrMap, "hive_column_lineage", "ARRAY", "Process.outputs"); + +assertProperties(typeAttrMap, "hive_db", "MAP_PRIMITIVE", "hive_db.parameters"); + +assertProperties(typeAttrMap, "hive_process", "ARRAY", "Process.inputs"); +assertProperties(typeAttrMap, "hive_process", "ARRAY", "Process.outputs"); + +assertProperties(typeAttrMap, "hive_storagedesc", "ARRAY", "hive_storagedesc.sortCols"); + +assertProperties(typeAttrMap, "hive_serde", "MAP_PRIMITIVE", "hive_serde.parameters"); + +assertProperties(typeAttrMap, "hive_table", "ARRAY", "hive_table.partitionKeys"); +assertProperties(typeAttrMap, "hive_table", "ARRAY", "hive_table.columns"); +assertProperties(typeAttrMap, "hive_table", "MAP_PRIMITIVE", "hive_table.parameters"); +} + +private void assertProperties(Map > typeAttrMap, String typeName, String typeCategory, String propertyName) { +List actualProperties = typeAttrMap.get(typeName).get(typeCategory); + +assertTrue(actualProperties.contains(propertyName)); +} +} http://git-wip-us.apache.org/repos/asf/atlas/blob/5cbfca24/repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java -- diff --git a/repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java b/repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java index d810a11..b18e5d3 100644 --- a/repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java +++ b/repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityTestBase.java @@ -35,7 +35,7 @@ import
[6/8] atlas git commit: ATLAS-2637: migration-import updates for changes in collection attribute storage
http://git-wip-us.apache.org/repos/asf/atlas/blob/5cbfca24/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/BaseUtils.java -- diff --git a/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/BaseUtils.java b/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/BaseUtils.java index e863d9f..aee1b69 100644 --- a/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/BaseUtils.java +++ b/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/BaseUtils.java @@ -26,14 +26,16 @@ import org.apache.tinkerpop.gremlin.structure.io.graphson.TypeInfo; import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph; import org.apache.tinkerpop.shaded.jackson.databind.JsonNode; import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper; -import org.testng.ITestContext; +import org.testng.SkipException; import org.testng.annotations.BeforeClass; -import org.testng.annotations.DataProvider; import java.io.File; import java.io.IOException; import java.nio.file.Paths; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; +import java.util.Map; import static org.testng.AssertJUnit.assertTrue; @@ -41,12 +43,16 @@ public class BaseUtils { private static final String resourcesDirRelativePath = "/src/test/resources/"; private String resourceDir; -protected final RelationshipTypeCache emptyRelationshipCache = new RelationshipTypeCache(new HashMap<>()); +protected final ElementProcessors emptyRelationshipCache = new ElementProcessors(new HashMap<>(), new HashMap<>()); protected GraphSONUtility graphSONUtility; -protected Object[][] getJsonNodeFromFile(String s) throws IOException { +protected JsonNode getJsonNodeFromFile(String s) { File f = new File(getFilePath(s)); -return new Object[][]{{getEntityNode(FileUtils.readFileToString(f))}}; +try { +return getEntityNode(FileUtils.readFileToString(f)); +} catch (IOException e) { +throw new SkipException("getJsonNodeFromFile: " + s, e); +} } protected String getFilePath(String fileName) { @@ -76,12 +82,18 @@ public class BaseUtils { utility.vertexFromJson(tg, node); } -protected void addEdge(TinkerGraph tg, MappedElementCache cache) throws IOException { +protected void addEdge(TinkerGraph tg, MappedElementCache cache) { GraphSONUtility gu = graphSONUtility; -gu.vertexFromJson(tg, (JsonNode) (getDBV(null)[0][0])); -gu.vertexFromJson(tg, (JsonNode) (getTableV(null))[0][0]); -gu.edgeFromJson(tg, cache, (JsonNode) getEdge(null)[0][0]); +addVertexToGraph(tg, gu, getDBV(), getTableV(), getCol1(), getCol2()); +addEdgeToGraph(tg, gu, cache, getEdge(), getEdgeCol(), getEdgeCol2()); +} + +protected void addEdgesForMap(TinkerGraph tg, MappedElementCache cache) { +GraphSONUtility gu = graphSONUtility; + +addVertexToGraph(tg, gu, getDBV(), getTableV(), getCol1(), getCol2()); +addEdgeToGraph(tg, gu, cache, getEdgeCol3(), getEdgeCol4()); } protected Vertex fetchTableVertex(TinkerGraph tg) { @@ -91,29 +103,84 @@ public class BaseUtils { return (Vertex) query.next(); } -@DataProvider(name = "col1") -public Object[][] getCol1(ITestContext context) throws IOException { +protected Map> getTypePropertyMap(String type, String property, String category) { +Map > map = new HashMap<>(); +map.put(type, new HashMap<>()); +map.get(type).put(category, new ArrayList<>()); +map.get(type).get(category).add(property); +return map; +} + +protected void addVertexToGraph(TinkerGraph tg, GraphSONUtility gu, JsonNode... nodes) { +for(JsonNode n : nodes) { +gu.vertexFromJson(tg, n); +} +} + +protected void addEdgeToGraph(TinkerGraph tg, GraphSONUtility gu, MappedElementCache cache, JsonNode... nodes) { + +for(JsonNode n : nodes) { +gu.edgeFromJson(tg, cache, n); +} +} + +public JsonNode getCol1() { return getJsonNodeFromFile("col-legacy.json"); } -@DataProvider(name = "dbType") -public Object[][] getDbType(ITestContext context) throws IOException { +public JsonNode getCol2() { +return getJsonNodeFromFile("col-2-legacy.json"); +} + +public JsonNode getCol3() { +return getJsonNodeFromFile("col-3-legacy.json"); +} + +public JsonNode getDbType() { return getJsonNodeFromFile("db-type-legacy.json"); } -@DataProvider(name = "edge") -public Object[][] getEdge(ITestContext context) throws IOException { +public JsonNode getEdge() { return
[5/7] atlas git commit: ATLAS-2637: migration-import updates for changes in collection attribute storage
http://git-wip-us.apache.org/repos/asf/atlas/blob/47ec9f7a/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/BaseUtils.java -- diff --git a/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/BaseUtils.java b/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/BaseUtils.java index e863d9f..aee1b69 100644 --- a/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/BaseUtils.java +++ b/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/BaseUtils.java @@ -26,14 +26,16 @@ import org.apache.tinkerpop.gremlin.structure.io.graphson.TypeInfo; import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph; import org.apache.tinkerpop.shaded.jackson.databind.JsonNode; import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper; -import org.testng.ITestContext; +import org.testng.SkipException; import org.testng.annotations.BeforeClass; -import org.testng.annotations.DataProvider; import java.io.File; import java.io.IOException; import java.nio.file.Paths; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; +import java.util.Map; import static org.testng.AssertJUnit.assertTrue; @@ -41,12 +43,16 @@ public class BaseUtils { private static final String resourcesDirRelativePath = "/src/test/resources/"; private String resourceDir; -protected final RelationshipTypeCache emptyRelationshipCache = new RelationshipTypeCache(new HashMap<>()); +protected final ElementProcessors emptyRelationshipCache = new ElementProcessors(new HashMap<>(), new HashMap<>()); protected GraphSONUtility graphSONUtility; -protected Object[][] getJsonNodeFromFile(String s) throws IOException { +protected JsonNode getJsonNodeFromFile(String s) { File f = new File(getFilePath(s)); -return new Object[][]{{getEntityNode(FileUtils.readFileToString(f))}}; +try { +return getEntityNode(FileUtils.readFileToString(f)); +} catch (IOException e) { +throw new SkipException("getJsonNodeFromFile: " + s, e); +} } protected String getFilePath(String fileName) { @@ -76,12 +82,18 @@ public class BaseUtils { utility.vertexFromJson(tg, node); } -protected void addEdge(TinkerGraph tg, MappedElementCache cache) throws IOException { +protected void addEdge(TinkerGraph tg, MappedElementCache cache) { GraphSONUtility gu = graphSONUtility; -gu.vertexFromJson(tg, (JsonNode) (getDBV(null)[0][0])); -gu.vertexFromJson(tg, (JsonNode) (getTableV(null))[0][0]); -gu.edgeFromJson(tg, cache, (JsonNode) getEdge(null)[0][0]); +addVertexToGraph(tg, gu, getDBV(), getTableV(), getCol1(), getCol2()); +addEdgeToGraph(tg, gu, cache, getEdge(), getEdgeCol(), getEdgeCol2()); +} + +protected void addEdgesForMap(TinkerGraph tg, MappedElementCache cache) { +GraphSONUtility gu = graphSONUtility; + +addVertexToGraph(tg, gu, getDBV(), getTableV(), getCol1(), getCol2()); +addEdgeToGraph(tg, gu, cache, getEdgeCol3(), getEdgeCol4()); } protected Vertex fetchTableVertex(TinkerGraph tg) { @@ -91,29 +103,84 @@ public class BaseUtils { return (Vertex) query.next(); } -@DataProvider(name = "col1") -public Object[][] getCol1(ITestContext context) throws IOException { +protected Map> getTypePropertyMap(String type, String property, String category) { +Map > map = new HashMap<>(); +map.put(type, new HashMap<>()); +map.get(type).put(category, new ArrayList<>()); +map.get(type).get(category).add(property); +return map; +} + +protected void addVertexToGraph(TinkerGraph tg, GraphSONUtility gu, JsonNode... nodes) { +for(JsonNode n : nodes) { +gu.vertexFromJson(tg, n); +} +} + +protected void addEdgeToGraph(TinkerGraph tg, GraphSONUtility gu, MappedElementCache cache, JsonNode... nodes) { + +for(JsonNode n : nodes) { +gu.edgeFromJson(tg, cache, n); +} +} + +public JsonNode getCol1() { return getJsonNodeFromFile("col-legacy.json"); } -@DataProvider(name = "dbType") -public Object[][] getDbType(ITestContext context) throws IOException { +public JsonNode getCol2() { +return getJsonNodeFromFile("col-2-legacy.json"); +} + +public JsonNode getCol3() { +return getJsonNodeFromFile("col-3-legacy.json"); +} + +public JsonNode getDbType() { return getJsonNodeFromFile("db-type-legacy.json"); } -@DataProvider(name = "edge") -public Object[][] getEdge(ITestContext context) throws IOException { +public JsonNode getEdge() { return
[3/7] atlas git commit: ATLAS-2637: migration-import updates for changes in collection attribute storage
http://git-wip-us.apache.org/repos/asf/atlas/blob/47ec9f7a/repository/src/test/resources/complex-attr_db/atlas-migration-data.json -- diff --git a/repository/src/test/resources/complex-attr_db/atlas-migration-data.json b/repository/src/test/resources/complex-attr_db/atlas-migration-data.json new file mode 100644 index 000..e7330e2 --- /dev/null +++ b/repository/src/test/resources/complex-attr_db/atlas-migration-data.json @@ -0,0 +1,5569 @@ +{ + "mode": "EXTENDED", + "vertices": [ +{ + "__type.name": { +"type": "string", +"value": "TaxonomyTerm" + }, + "__type.TaxonomyTerm.atlas.taxonomy": { +"type": "string", +"value": "{\"multiplicity\":\"{\\\"lower\\\":0,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":false,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"string\",\"name\":\"atlas.taxonomy\",\"isUnique\":false}" + }, + "__modifiedBy": { +"type": "string", +"value": "root" + }, + "__type.options": { +"type": "string", +"value": "null" + }, + "__guid": { +"type": "string", +"value": "5af3e7e8-68a6-4cf6-b88e-4c619731f3e2" + }, + "__version": { +"type": "long", +"value": 1 + }, + "__type.TaxonomyTerm": { +"type": "list", +"value": [ + { +"type": "string", +"value": "atlas.taxonomy" + } +] + }, + "__type.category": { +"type": "string", +"value": "TRAIT" + }, + "__type.version": { +"type": "string", +"value": "1.0" + }, + "__createdBy": { +"type": "string", +"value": "root" + }, + "__modificationTimestamp": { +"type": "long", +"value": 1523656711303 + }, + "__type": { +"type": "string", +"value": "typeSystem" + }, + "__type.description": { +"type": "string", +"value": "TaxonomyTerm" + }, + "__timestamp": { +"type": "long", +"value": 1523656711303 + }, + "_id": 16400, + "_type": "vertex" +}, +{ + "__type.name": { +"type": "string", +"value": "Referenceable" + }, + "__modifiedBy": { +"type": "string", +"value": "root" + }, + "__type.options": { +"type": "string", +"value": "null" + }, + "__type.Referenceable": { +"type": "list", +"value": [ + { +"type": "string", +"value": "qualifiedName" + } +] + }, + "__guid": { +"type": "string", +"value": "f4b80d9b-e72c-419f-ab40-9a3256a541b9" + }, + "__version": { +"type": "long", +"value": 1 + }, + "__type.category": { +"type": "string", +"value": "CLASS" + }, + "__type.version": { +"type": "string", +"value": "1.0" + }, + "__createdBy": { +"type": "string", +"value": "root" + }, + "__modificationTimestamp": { +"type": "long", +"value": 1523656711776 + }, + "__type": { +"type": "string", +"value": "typeSystem" + }, + "__type.Referenceable.qualifiedName": { +"type": "string", +"value": "{\"multiplicity\":\"{\\\"lower\\\":1,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":true,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"string\",\"name\":\"qualifiedName\",\"isUnique\":true}" + }, + "__type.description": { +"type": "string", +"value": "Referenceable" + }, + "__timestamp": { +"type": "long", +"value": 1523656711776 + }, + "_id": 32784, + "_type": "vertex" +}, +{ + "__type.name": { +"type": "string", +"value": "__internal" + }, + "__version": { +"type": "long", +"value": 1 + }, + "__type.category": { +"type": "string", +"value": "CLASS" + }, + "__modifiedBy": { +"type": "string", +"value": "root" + }, + "__type.version": { +"type": "string", +"value": "1.0" + }, + "__createdBy": { +"type": "string", +"value": "root" + }, + "__modificationTimestamp": { +"type": "long", +"value": 1523656711806 + }, + "__type": { +"type": "string", +"value": "typeSystem" + }, + "__type.options": { +"type": "string", +"value": "null" + }, + "__type.description": { +"type": "string", +"value": "__internal" + }, + "__guid": { +"type": "string", +"value": "25e22509-b6fd-42ed-b5bc-8e1726f37103" + }, + "__timestamp": { +
[2/7] atlas git commit: ATLAS-2637: migration-import updates for changes in collection attribute storage
http://git-wip-us.apache.org/repos/asf/atlas/blob/47ec9f7a/repository/src/test/resources/complex-attr_db/atlas-migration-typesdef.json -- diff --git a/repository/src/test/resources/complex-attr_db/atlas-migration-typesdef.json b/repository/src/test/resources/complex-attr_db/atlas-migration-typesdef.json new file mode 100644 index 000..42d02cd --- /dev/null +++ b/repository/src/test/resources/complex-attr_db/atlas-migration-typesdef.json @@ -0,0 +1,2303 @@ +{ + "enumDefs": [ +{ + "category": "ENUM", + "guid": "460e6d99-b06c-48d3-8bb2-9c40ca1235d0", + "createdBy": "root", + "updatedBy": "root", + "createTime": 1523656721280, + "updateTime": 1523656721280, + "version": 1, + "name": "hive_principal_type", + "description": "hive_principal_type", + "typeVersion": "1.0", + "elementDefs": [ +{ + "value": "USER", + "ordinal": 1 +}, +{ + "value": "ROLE", + "ordinal": 2 +}, +{ + "value": "GROUP", + "ordinal": 3 +} + ] +}, +{ + "category": "ENUM", + "guid": "df00ab81-0791-4dbb-bd56-e4183e039111", + "createdBy": "root", + "updatedBy": "root", + "createTime": 1523656718218, + "updateTime": 1523656718218, + "version": 1, + "name": "file_action", + "description": "file_action", + "typeVersion": "1.0", + "elementDefs": [ +{ + "value": "NONE", + "ordinal": 0 +}, +{ + "value": "EXECUTE", + "ordinal": 1 +}, +{ + "value": "WRITE", + "ordinal": 2 +}, +{ + "value": "WRITE_EXECUTE", + "ordinal": 3 +}, +{ + "value": "READ", + "ordinal": 4 +}, +{ + "value": "READ_EXECUTE", + "ordinal": 5 +}, +{ + "value": "READ_WRITE", + "ordinal": 6 +}, +{ + "value": "ALL", + "ordinal": 7 +} + ] +} + ], + "structDefs": [ +{ + "category": "STRUCT", + "guid": "bd0ba5b3-525e-4d35-9527-7ffa10b4e5bc", + "createdBy": "admin", + "updatedBy": "admin", + "createTime": 1526494657148, + "updateTime": 1526494657148, + "version": 1, + "name": "struct_type", + "description": "struct_type_description", + "typeVersion": "1.0", + "attributeDefs": [ +{ + "name": "name", + "typeName": "string", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": true +} + ] +}, +{ + "category": "STRUCT", + "guid": "30993e57-4d69-46ab-b531-02371eace3d9", + "createdBy": "root", + "updatedBy": "root", + "createTime": 1523656721304, + "updateTime": 1523656721304, + "version": 1, + "name": "hive_order", + "description": "hive_order", + "typeVersion": "1.0", + "attributeDefs": [ +{ + "name": "order", + "typeName": "int", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +}, +{ + "name": "col", + "typeName": "string", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +} + ] +}, +{ + "category": "STRUCT", + "guid": "db96593c-2453-4795-966f-edaa05e69cde", + "createdBy": "root", + "updatedBy": "root", + "createTime": 1523656722372, + "updateTime": 1523656722372, + "version": 1, + "name": "hive_serde", + "description": "hive_serde", + "typeVersion": "1.0", + "attributeDefs": [ +{ + "name": "name", + "typeName": "string", + "isOptional": true, + "cardinality": "SINGLE", + "valuesMinCount": 0, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +}, +{ + "name": "serializationLib", + "typeName": "string", + "isOptional": true, + "cardinality": "SINGLE", + "valuesMinCount": 0, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +}, +{ + "name": "parameters", + "typeName": "map", + "isOptional": true, + "cardinality": "SINGLE", + "valuesMinCount": 0, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +
[6/7] atlas git commit: ATLAS-2637: migration-import updates for changes in collection attribute storage
ATLAS-2637: migration-import updates for changes in collection attribute storage Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/47ec9f7a Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/47ec9f7a Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/47ec9f7a Branch: refs/heads/master Commit: 47ec9f7a8cc02346ac167849374bf088f55be74a Parents: a0269b9 Author: Ashutosh Mestry <ames...@hortonworks.com> Authored: Tue May 22 18:24:57 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Tue May 22 23:04:32 2018 -0700 -- .../java/org/apache/atlas/AtlasConstants.java |2 +- .../atlas/repository/graphdb/AtlasGraph.java|3 +- .../graphdb/janus/AtlasJanusGraph.java | 262 +- .../graphdb/janus/AtlasJanusGraphDatabase.java | 10 +- .../janus/migration/AtlasGraphSONReader.java| 100 +- .../janus/migration/ElementProcessors.java | 423 ++ .../janus/migration/GraphSONUtility.java| 107 +- .../janus/migration/JsonNodeProcessManager.java |1 + .../janus/migration/MappedElementCache.java | 44 - .../janus/migration/PostProcessManager.java | 100 +- .../migration/RelationshipCacheGenerator.java | 98 + .../janus/migration/RelationshipTypeCache.java | 37 - .../migration/TypesWithCollectionsFinder.java | 123 + .../postProcess/PostProcessListProperty.java| 68 + .../graphdb/janus/migration/BaseUtils.java | 107 +- .../GraphSONUtilityPostProcessTest.java | 95 - .../janus/migration/GraphSONUtilityTest.java| 266 +- .../janus/migration/JsonNodeParsersTest.java| 16 +- .../janus/migration/MappedElementCacheTest.java | 26 +- .../migration/PostProcessListPropertyTest.java | 142 + .../janus/src/test/resources/col-2-legacy.json | 73 + .../janus/src/test/resources/col-3-legacy.json | 86 + .../src/test/resources/edge-legacy-col.json | 27 + .../src/test/resources/edge-legacy-col2.json| 27 + .../src/test/resources/edge-legacy-col3.json| 27 + .../src/test/resources/edge-legacy-col4.json| 27 + .../src/test/resources/edge-legacy-process.json | 27 + .../src/test/resources/edge-legacy-tag.json | 27 + .../src/test/resources/lineage-v-98312.json | 79 + .../src/test/resources/table-v-147504.json | 83 +- .../janus/src/test/resources/tag-163856752.json | 35 + .../apache/atlas/store/AtlasTypeDefStore.java |6 - .../test/java/org/apache/atlas/TestUtilsV2.java |1 - .../migration/DataMigrationService.java | 48 +- .../migration/RelationshipCacheGenerator.java | 73 - .../graph/v1/AtlasTypeDefGraphStoreV1.java |7 - .../migration/ComplexAttributesTest.java| 61 + .../migration/HiveParititionTest.java | 13 +- .../repository/migration/HiveStocksTest.java|3 +- .../migration/MigrationBaseAsserts.java | 28 +- .../RelationshipCacheGeneratorTest.java | 96 + .../migration/RelationshipMappingTest.java | 87 - .../TypesWithCollectionsFinderTest.java | 84 + .../store/graph/v1/AtlasEntityTestBase.java |5 +- .../complex-attr_db/atlas-migration-data.json | 5569 ++ .../atlas-migration-typesdef.json | 2303 .../parts_db/atlas-migration-data.json | 3990 - 47 files changed, 14107 insertions(+), 815 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/47ec9f7a/common/src/main/java/org/apache/atlas/AtlasConstants.java -- diff --git a/common/src/main/java/org/apache/atlas/AtlasConstants.java b/common/src/main/java/org/apache/atlas/AtlasConstants.java index 2b92e6e..2b9f411 100644 --- a/common/src/main/java/org/apache/atlas/AtlasConstants.java +++ b/common/src/main/java/org/apache/atlas/AtlasConstants.java @@ -35,6 +35,6 @@ public final class AtlasConstants { public static final int ATLAS_SHUTDOWN_HOOK_PRIORITY = 30; public static final String DEFAULT_TYPE_VERSION = "1.0"; -public static final String ATLAS_MIGRATION_MODE_FILENAME = "atlas.migration.mode.filename"; +public static final String ATLAS_MIGRATION_MODE_FILENAME = "atlas.migration.data.filename"; public static final String ATLAS_SERVICES_ENABLED= "atlas.services.enabled"; } http://git-wip-us.apache.org/repos/asf/atlas/blob/47ec9f7a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java -- diff --git a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java b/graphdb/api/src/main/java/org/apa
[1/7] atlas git commit: ATLAS-2637: migration-import updates for changes in collection attribute storage
Repository: atlas Updated Branches: refs/heads/master a0269b9ce -> d343a4860 http://git-wip-us.apache.org/repos/asf/atlas/blob/47ec9f7a/repository/src/test/resources/parts_db/atlas-migration-data.json -- diff --git a/repository/src/test/resources/parts_db/atlas-migration-data.json b/repository/src/test/resources/parts_db/atlas-migration-data.json index 1414ea1..1fa277e 100644 --- a/repository/src/test/resources/parts_db/atlas-migration-data.json +++ b/repository/src/test/resources/parts_db/atlas-migration-data.json @@ -1 +1,3989 @@ -{"mode":"EXTENDED","vertices":[{"__type.name":{"type":"string","value":"hive_order"},"__modifiedBy":{"type":"string","value":"root"},"__type.hive_order.order":{"type":"string","value":"{\"multiplicity\":\"{\\\"lower\\\":1,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":false,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"int\",\"name\":\"order\",\"isUnique\":false}"},"__type.options":{"type":"string","value":"null"},"__guid":{"type":"string","value":"2acd11e7-9cbd-4d47-9ded-831dabf80206"},"__version":{"type":"long","value":1},"__type.hive_order":{"type":"list","value":[{"type":"string","value":"order"},{"type":"string","value":"col"}]},"__type.hive_order.col":{"type":"string","value":"{\"multiplicity\":\"{\\\"lower\\\":1,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":false,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"string\",\"name\":\"col\",\"isUnique\":false}"},"__type.category":{"type":"string","value":"STRUCT"},"__t ype.version":{"type":"string","value":"1.0"},"__createdBy":{"type":"string","value":"root"},"__modificationTimestamp":{"type":"long","value":1522695099005},"__type":{"type":"string","value":"typeSystem"},"__type.description":{"type":"string","value":"hive_order"},"__timestamp":{"type":"long","value":1522695099005},"_id":16448,"_type":"vertex"},{"__type.hive_storagedesc.outputFormat":{"type":"string","value":"{\"multiplicity\":\"{\\\"lower\\\":0,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":false,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"string\",\"name\":\"outputFormat\",\"isUnique\":false}"},"__type.hive_storagedesc.bucketCols":{"type":"string","value":"{\"multiplicity\":\"{\\\"lower\\\":0,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":false,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"array\",\"name\":\"bucketCols\",\"isUnique\":false}"},"__type.name":{"type":"string","value":"hive_storagedesc"},"__type. hive_storagedesc.parameters":{"type":"string","value":"{\"multiplicity\":\"{\\\"lower\\\":0,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":false,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"map\",\"name\":\"parameters\",\"isUnique\":false}"},"__modifiedBy":{"type":"string","value":"root"},"__type.options":{"type":"string","value":"null"},"__type.hive_storagedesc.numBuckets":{"type":"string","value":"{\"multiplicity\":\"{\\\"lower\\\":0,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":false,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"int\",\"name\":\"numBuckets\",\"isUnique\":false}"},"__type.hive_storagedesc.sortCols":{"type":"string","value":"{\"multiplicity\":\"{\\\"lower\\\":0,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":false,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"array\",\"name\":\"sortCols\",\"isUnique\":false}"},"__guid":{"type":"string","value" :"8b3f3741-3ba9-49f1-b545-43f12fa6fe29"},"__type.hive_storagedesc":{"type":"list","value":[{"type":"string","value":"table"},{"type":"string","value":"location"},{"type":"string","value":"inputFormat"},{"type":"string","value":"outputFormat"},{"type":"string","value":"compressed"},{"type":"string","value":"numBuckets"},{"type":"string","value":"serdeInfo"},{"type":"string","value":"bucketCols"},{"type":"string","value":"sortCols"},{"type":"string","value":"parameters"},{"type":"string","value":"storedAsSubDirectories"}]},"__version":{"type":"long","value":1},"__type.hive_storagedesc.inputFormat":{"type":"string","value":"{\"multiplicity\":\"{\\\"lower\\\":0,\\\"upper\\\":1,\\\"isUnique\\\":false}\",\"isIndexable\":false,\"isComposite\":false,\"reverseAttributeName\":null,\"dataType\":\"string\",\"name\":\"inputFormat\",\"isUnique\":false}"},"__type.category":{"type":"string","value":"CLASS"},"__type.version":{"type":"string","value":"1.0"},"__createdBy":{"type":"string","value":"roo
[7/7] atlas git commit: ATLAS-2712: Update v2 Audit API to handle v1 to v2 conversion
ATLAS-2712: Update v2 Audit API to handle v1 to v2 conversion Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/d343a486 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/d343a486 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/d343a486 Branch: refs/heads/master Commit: d343a4860df49e767eeefd46ab5fa2b147cc5cd3 Parents: 47ec9f7 Author: Sarath Subramanian <ssubraman...@hortonworks.com> Authored: Tue May 22 18:38:33 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Tue May 22 23:05:07 2018 -0700 -- .../atlas/model/audit/EntityAuditEventV2.java | 51 +-- .../AbstractStorageBasedAuditRepository.java| 19 ++- .../audit/CassandraBasedAuditRepository.java| 4 +- .../repository/audit/EntityAuditListener.java | 42 +- .../repository/audit/EntityAuditListenerV2.java | 76 +++--- .../audit/HBaseBasedAuditRepository.java| 151 --- .../converters/AtlasInstanceConverter.java | 28 ++-- .../graph/v1/AtlasEntityChangeNotifier.java | 8 +- .../audit/AuditRepositoryTestBase.java | 8 +- 9 files changed, 300 insertions(+), 87 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/d343a486/intg/src/main/java/org/apache/atlas/model/audit/EntityAuditEventV2.java -- diff --git a/intg/src/main/java/org/apache/atlas/model/audit/EntityAuditEventV2.java b/intg/src/main/java/org/apache/atlas/model/audit/EntityAuditEventV2.java index d14f6ae..787f5a9 100644 --- a/intg/src/main/java/org/apache/atlas/model/audit/EntityAuditEventV2.java +++ b/intg/src/main/java/org/apache/atlas/model/audit/EntityAuditEventV2.java @@ -32,6 +32,7 @@ import java.util.Objects; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; +import static org.apache.atlas.model.audit.EntityAuditEventV2.EntityAuditType.ENTITY_AUDIT_V2; /** * Structure of v2 entity audit event @@ -42,13 +43,15 @@ import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ @XmlRootElement @XmlAccessorType(XmlAccessType.PROPERTY) public class EntityAuditEventV2 implements Serializable { -public enum EntityAuditAction { +public enum EntityAuditType { ENTITY_AUDIT_V1, ENTITY_AUDIT_V2 } + +public enum EntityAuditActionV2 { ENTITY_CREATE, ENTITY_UPDATE, ENTITY_DELETE, ENTITY_IMPORT_CREATE, ENTITY_IMPORT_UPDATE, ENTITY_IMPORT_DELETE, CLASSIFICATION_ADD, CLASSIFICATION_DELETE, CLASSIFICATION_UPDATE, PROPAGATED_CLASSIFICATION_ADD, PROPAGATED_CLASSIFICATION_DELETE, PROPAGATED_CLASSIFICATION_UPDATE; -public static EntityAuditAction fromString(String strValue) { +public static EntityAuditActionV2 fromString(String strValue) { switch (strValue) { case "ENTITY_CREATE": return ENTITY_CREATE; @@ -79,28 +82,35 @@ public class EntityAuditEventV2 implements Serializable { return PROPAGATED_CLASSIFICATION_UPDATE; } -throw new IllegalArgumentException("No enum constant " + EntityAuditAction.class.getCanonicalName() + "." + strValue); +throw new IllegalArgumentException("No enum constant " + EntityAuditActionV2.class.getCanonicalName() + "." + strValue); } } -private StringentityId; -private long timestamp; -private Stringuser; -private EntityAuditAction action; -private Stringdetails; -private StringeventKey; -private AtlasEntity entity; +private String entityId; +private longtimestamp; +private String user; +private EntityAuditActionV2 action; +private String details; +private String eventKey; +private AtlasEntity entity; +private EntityAuditType type; public EntityAuditEventV2() { } -public EntityAuditEventV2(String entityId, long timestamp, String user, EntityAuditAction action, String details, +public EntityAuditEventV2(String entityId, long timestamp, String user, EntityAuditActionV2 action, String details, AtlasEntity entity) { +this(entityId, timestamp, user, action, details, entity, ENTITY_AUDIT_V2); +} + +public EntityAuditEventV2(String entityId, long timestamp, String user, EntityAuditActionV2 action, String details, + AtlasEntit
atlas git commit: ATLAS-2714: model updates - added relationship-def _AtlasUserProfile_savedsearches, updated few relationships to align end1/end2 with edge-direction, fixed cardinality of array attri
Repository: atlas Updated Branches: refs/heads/branch-1.0 0975f7d69 -> b44b6ed9e ATLAS-2714: model updates - added relationship-def _AtlasUserProfile_savedsearches, updated few relationships to align end1/end2 with edge-direction, fixed cardinality of array attributes from SINGLE to LIST/SET (cherry picked from commit 1616b3f9ea5f22968cf195b3327a59be8d26db64) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/b44b6ed9 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/b44b6ed9 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/b44b6ed9 Branch: refs/heads/branch-1.0 Commit: b44b6ed9e1ff5c2d1d285954cf6252eaffd538c7 Parents: 0975f7d Author: Madhan Neethiraj <mad...@apache.org> Authored: Wed May 23 12:36:06 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Wed May 23 17:11:00 2018 -0700 -- addons/models/-Area0/0010-base_model.json | 39 +++- addons/models/1000-Hadoop/1030-hive_model.json | 26 ++--- addons/models/1000-Hadoop/1060-hbase_model.json | 18 - .../migration/ComplexAttributesTest.java| 2 +- .../migration/HiveParititionTest.java | 6 +-- .../repository/migration/HiveStocksTest.java| 4 +- .../atlas/repository/migration/PathTest.java| 2 +- 7 files changed, 58 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/b44b6ed9/addons/models/-Area0/0010-base_model.json -- diff --git a/addons/models/-Area0/0010-base_model.json b/addons/models/-Area0/0010-base_model.json index fe80019..fe1eb65 100644 --- a/addons/models/-Area0/0010-base_model.json +++ b/addons/models/-Area0/0010-base_model.json @@ -84,7 +84,7 @@ { "name": "inputs", "typeName": "array", -"cardinality": "SINGLE", +"cardinality": "SET", "isIndexable": false, "isOptional": true, "isUnique": false @@ -92,7 +92,7 @@ { "name": "outputs", "typeName": "array", -"cardinality": "SINGLE", +"cardinality": "SET", "isIndexable": false, "isOptional": true, "isUnique": false @@ -125,7 +125,7 @@ { "name": "savedSearches", "typeName": "array<__AtlasUserSavedSearch>", -"cardinality": "LIST", +"cardinality": "SET", "isIndexable": false, "isOptional": true, "isUnique": false, @@ -201,19 +201,19 @@ "typeVersion": "1.0", "relationshipCategory": "AGGREGATION", "endDef1": { -"type": "DataSet", -"name": "inputToProcesses", -"isContainer": false, -"cardinality": "SET" -}, -"endDef2": { "type": "Process", "name": "inputs", "isContainer": true, "cardinality": "SET", "isLegacyAttribute": true }, -"propagateTags": "ONE_TO_TWO" +"endDef2": { +"type": "DataSet", +"name": "inputToProcesses", +"isContainer": false, +"cardinality": "SET" +}, +"propagateTags": "TWO_TO_ONE" }, { "name": "process_dataset_outputs", @@ -233,6 +233,25 @@ "cardinality": "SET" }, "propagateTags": "ONE_TO_TWO" +}, +{ + "name": "__AtlasUserProfile_savedsearches", + "typeVersion": "1.0", + "relationshipCategory": "COMPOSITION", + "endDef1": { +
atlas git commit: ATLAS-2713: Glossary UI: enable assign button only when correct object-type is selected
Repository: atlas Updated Branches: refs/heads/master 1616b3f9e -> c950c9bde ATLAS-2713: Glossary UI: enable assign button only when correct object-type is selected Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/c950c9bd Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/c950c9bd Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/c950c9bd Branch: refs/heads/master Commit: c950c9bdefc258d83dfbaed2087fb3e3cc062e62 Parents: 1616b3f Author: kevalbhatt <kbh...@apache.org> Authored: Wed May 23 17:37:37 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Wed May 23 17:16:21 2018 -0700 -- dashboardv2/public/js/views/glossary/AssignTermLayoutView.js | 8 +++- dashboardv2/public/js/views/glossary/GlossaryLayoutView.js | 7 ++- 2 files changed, 13 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/c950c9bd/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js -- diff --git a/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js b/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js index 69aa4d0..76c9bde 100644 --- a/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js +++ b/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js @@ -87,6 +87,7 @@ define(['require', "mainClass": "wizard-modal" }); this.modal.open(); +this.modal.$el.find('button.ok').attr("disabled", true); this.modal.on('closeModal', function() { that.modal.trigger('cancel'); if (that.assignTermError && that.hideLoader) { @@ -99,8 +100,13 @@ define(['require', this.modal.on('ok', function() { that.assignTerm(); }); +this.bindEvents(); +}, +bindEvents: function() { +this.listenTo(this.glossaryCollection, "node_selected", function(skip) { +this.modal.$el.find('button.ok').attr("disabled", false); +}, this); }, -bindEvents: function() {}, onRender: function() { this.renderGlossaryTree(); var that = this; http://git-wip-us.apache.org/repos/asf/atlas/blob/c950c9bd/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js -- diff --git a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js index cda2ea5..0dcd4a3 100644 --- a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js +++ b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js @@ -256,7 +256,11 @@ define(['require', var objGuid = options.objGuid, node = options.node, index = options.index; -if (!that.guid) { +if (that.isAssignView) { +return { +'opened': true +} +} else if (!that.guid) { that.query[that.viewType].isNodeNotFoundAtLoad = false; var selectedItem = { "type": "Glossary", @@ -461,6 +465,7 @@ define(['require', .on("select_node.jstree", function(e, data) { if (that.isAssignView) { that.glossary.selectedItem = data.node.original; + that.glossaryCollection.trigger("node_selected"); } else { var popoverClassName = (type == "term" ? '.termPopover' : '.categoryPopover'), currentClickedPopoverEl = "";
atlas git commit: ATLAS-2713: Glossary UI: enable assign button only when correct object-type is selected
Repository: atlas Updated Branches: refs/heads/branch-1.0 b44b6ed9e -> 66a770304 ATLAS-2713: Glossary UI: enable assign button only when correct object-type is selected Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit c950c9bdefc258d83dfbaed2087fb3e3cc062e62) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/66a77030 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/66a77030 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/66a77030 Branch: refs/heads/branch-1.0 Commit: 66a770304230050492d79b381fe55fad6a0d04bc Parents: b44b6ed Author: kevalbhatt <kbh...@apache.org> Authored: Wed May 23 17:37:37 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Wed May 23 17:16:46 2018 -0700 -- dashboardv2/public/js/views/glossary/AssignTermLayoutView.js | 8 +++- dashboardv2/public/js/views/glossary/GlossaryLayoutView.js | 7 ++- 2 files changed, 13 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/66a77030/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js -- diff --git a/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js b/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js index 69aa4d0..76c9bde 100644 --- a/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js +++ b/dashboardv2/public/js/views/glossary/AssignTermLayoutView.js @@ -87,6 +87,7 @@ define(['require', "mainClass": "wizard-modal" }); this.modal.open(); +this.modal.$el.find('button.ok').attr("disabled", true); this.modal.on('closeModal', function() { that.modal.trigger('cancel'); if (that.assignTermError && that.hideLoader) { @@ -99,8 +100,13 @@ define(['require', this.modal.on('ok', function() { that.assignTerm(); }); +this.bindEvents(); +}, +bindEvents: function() { +this.listenTo(this.glossaryCollection, "node_selected", function(skip) { +this.modal.$el.find('button.ok').attr("disabled", false); +}, this); }, -bindEvents: function() {}, onRender: function() { this.renderGlossaryTree(); var that = this; http://git-wip-us.apache.org/repos/asf/atlas/blob/66a77030/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js -- diff --git a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js index cda2ea5..0dcd4a3 100644 --- a/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js +++ b/dashboardv2/public/js/views/glossary/GlossaryLayoutView.js @@ -256,7 +256,11 @@ define(['require', var objGuid = options.objGuid, node = options.node, index = options.index; -if (!that.guid) { +if (that.isAssignView) { +return { +'opened': true +} +} else if (!that.guid) { that.query[that.viewType].isNodeNotFoundAtLoad = false; var selectedItem = { "type": "Glossary", @@ -461,6 +465,7 @@ define(['require', .on("select_node.jstree", function(e, data) { if (that.isAssignView) { that.glossary.selectedItem = data.node.original; + that.glossaryCollection.trigger("node_selected"); } else { var popoverClassName = (type == "term" ? '.termPopover' : '.categoryPopover'), currentClickedPopoverEl = "";
atlas git commit: ATLAS-2714: model updates - added relationship-def _AtlasUserProfile_savedsearches, updated few relationships to align end1/end2 with edge-direction, fixed cardinality of array attri
Repository: atlas Updated Branches: refs/heads/master 2bb7f7784 -> 1616b3f9e ATLAS-2714: model updates - added relationship-def _AtlasUserProfile_savedsearches, updated few relationships to align end1/end2 with edge-direction, fixed cardinality of array attributes from SINGLE to LIST/SET Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/1616b3f9 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/1616b3f9 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/1616b3f9 Branch: refs/heads/master Commit: 1616b3f9ea5f22968cf195b3327a59be8d26db64 Parents: 2bb7f77 Author: Madhan Neethiraj <mad...@apache.org> Authored: Wed May 23 12:36:06 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Wed May 23 13:27:17 2018 -0700 -- addons/models/-Area0/0010-base_model.json | 39 +++- addons/models/1000-Hadoop/1030-hive_model.json | 26 ++--- addons/models/1000-Hadoop/1060-hbase_model.json | 18 - .../migration/ComplexAttributesTest.java| 2 +- .../migration/HiveParititionTest.java | 6 +-- .../repository/migration/HiveStocksTest.java| 4 +- .../atlas/repository/migration/PathTest.java| 2 +- 7 files changed, 58 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/1616b3f9/addons/models/-Area0/0010-base_model.json -- diff --git a/addons/models/-Area0/0010-base_model.json b/addons/models/-Area0/0010-base_model.json index fe80019..fe1eb65 100644 --- a/addons/models/-Area0/0010-base_model.json +++ b/addons/models/-Area0/0010-base_model.json @@ -84,7 +84,7 @@ { "name": "inputs", "typeName": "array", -"cardinality": "SINGLE", +"cardinality": "SET", "isIndexable": false, "isOptional": true, "isUnique": false @@ -92,7 +92,7 @@ { "name": "outputs", "typeName": "array", -"cardinality": "SINGLE", +"cardinality": "SET", "isIndexable": false, "isOptional": true, "isUnique": false @@ -125,7 +125,7 @@ { "name": "savedSearches", "typeName": "array<__AtlasUserSavedSearch>", -"cardinality": "LIST", +"cardinality": "SET", "isIndexable": false, "isOptional": true, "isUnique": false, @@ -201,19 +201,19 @@ "typeVersion": "1.0", "relationshipCategory": "AGGREGATION", "endDef1": { -"type": "DataSet", -"name": "inputToProcesses", -"isContainer": false, -"cardinality": "SET" -}, -"endDef2": { "type": "Process", "name": "inputs", "isContainer": true, "cardinality": "SET", "isLegacyAttribute": true }, -"propagateTags": "ONE_TO_TWO" +"endDef2": { +"type": "DataSet", +"name": "inputToProcesses", +"isContainer": false, +"cardinality": "SET" +}, +"propagateTags": "TWO_TO_ONE" }, { "name": "process_dataset_outputs", @@ -233,6 +233,25 @@ "cardinality": "SET" }, "propagateTags": "ONE_TO_TWO" +}, +{ + "name": "__AtlasUserProfile_savedsearches", + "typeVersion": "1.0", + "relationshipCategory": "COMPOSITION", + "endDef1": { +"type": "__AtlasUserProfile", +&qu
atlas git commit: ATLAS-2721: rename attribute displayName as name in classes AtlasGlossary, AtlasGlossaryTerm, AtlasGlossaryCategory
Repository: atlas Updated Branches: refs/heads/master 84196cfc5 -> 54f5e16a7 ATLAS-2721: rename attribute displayName as name in classes AtlasGlossary, AtlasGlossaryTerm, AtlasGlossaryCategory Change-Id: I47b1a616f412a9540fb985677eadbe86d05391f6 Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/54f5e16a Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/54f5e16a Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/54f5e16a Branch: refs/heads/master Commit: 54f5e16a74ed83e841c0eb573c79ec5a190e3676 Parents: 84196cf Author: apoorvnaik <apoorvn...@apache.org> Authored: Thu May 24 23:17:02 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Fri May 25 07:24:54 2018 -0700 -- .../models/-Area0/0011-glossary_model.json | 6 ++-- dashboardv2/public/js/router/Router.js | 2 +- .../glossary/AssignTermLayoutView_tmpl.html | 2 +- .../CreateEditCategoryTermLayoutView_tmpl.html | 2 +- .../CreateEditGlossaryLayoutView_tmpl.html | 2 +- .../public/js/utils/CommonViewFunction.js | 8 ++--- dashboardv2/public/js/utils/Utils.js| 34 ++ .../views/audit/CreateAuditTableLayoutView.js | 6 +++- .../CreateEditCategoryTermLayoutView.js | 2 +- .../glossary/CreateEditGlossaryLayoutView.js| 2 +- .../views/glossary/GlossaryDetailLayoutView.js | 16 - .../js/views/glossary/GlossaryLayoutView.js | 12 +++ .../java/org/apache/atlas/AtlasErrorCode.java | 10 +++--- .../atlas/model/glossary/AtlasGlossary.java | 6 ++-- .../model/glossary/AtlasGlossaryBaseObject.java | 18 +- .../model/glossary/AtlasGlossaryCategory.java | 4 +-- .../atlas/model/glossary/AtlasGlossaryTerm.java | 6 ++-- .../atlas/glossary/GlossaryCategoryUtils.java | 32 - .../apache/atlas/glossary/GlossaryService.java | 36 ++-- .../atlas/glossary/GlossaryTermUtils.java | 6 ++-- .../ogm/glossary/AtlasGlossaryCategoryDTO.java | 4 +-- .../ogm/glossary/AtlasGlossaryDTO.java | 4 +-- .../ogm/glossary/AtlasGlossaryTermDTO.java | 4 +-- .../store/graph/v2/EntityGraphRetriever.java| 2 +- .../atlas/glossary/GlossaryServiceTest.java | 18 +- 25 files changed, 134 insertions(+), 110 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/54f5e16a/addons/models/-Area0/0011-glossary_model.json -- diff --git a/addons/models/-Area0/0011-glossary_model.json b/addons/models/-Area0/0011-glossary_model.json index 2e17e81..c529818 100644 --- a/addons/models/-Area0/0011-glossary_model.json +++ b/addons/models/-Area0/0011-glossary_model.json @@ -94,7 +94,7 @@ "isUnique": true }, { - "name": "displayName", + "name": "name", "typeName": "string", "cardinality": "SINGLE", "isIndexable": true, @@ -151,7 +151,7 @@ "isUnique": true }, { - "name": "displayName", + "name": "name", "typeName": "string", "cardinality": "SINGLE", "isIndexable": true, @@ -216,7 +216,7 @@ "isUnique": true }, { - "name": "displayName", + "name": "name", "typeName": "string", "cardinality": "SINGLE", "isIndexable": true, http://git-wip-us.apache.org/repos/asf/atlas/blob/54f5e16a/dashboardv2/public/js/router/Router.js -- diff --git a/dashboardv2/public/js/router/Router.js b/dashboardv2/public/js/router/Router.js index 1f1bd40..230ca9b 100644 --- a/dashboardv2/public/js/router/Router.js +++ b/dashboardv2/public/js/router/Router.js @@ -49,7 +49,7 @@ define([ this.searchVent = new Backbone.Wreqr.EventAggregator(); this.glossaryCollection = new VGlossaryList([], { comparator: function(item) { -return item.get("displayName"); +return item.get("name"); } }); this.preFetchedCollectionLists = { http://git-wip-us.apache.org/repos/asf/atlas/blob/54f5e16a/dashboardv2/public/js/templates/glossary/AssignTermLayoutView_tmpl.html -
[31/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/adapters/igc/v2/repositoryconnector/IGCV2OMRSRepositoryConnectorProvider.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/adapters/igc/v2/repositoryconnector/IGCV2OMRSRepositoryConnectorProvider.java b/omrs/src/main/java/org/apache/atlas/omrs/adapters/igc/v2/repositoryconnector/IGCV2OMRSRepositoryConnectorProvider.java deleted file mode 100644 index 717f99d..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/adapters/igc/v2/repositoryconnector/IGCV2OMRSRepositoryConnectorProvider.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.adapters.igc.v2.repositoryconnector; - -import org.apache.atlas.omrs.adapters.igc.v1.repositoryconnector.IGCOMRSRepositoryConnector; -import org.apache.atlas.omrs.metadatacollection.repositoryconnector.OMRSRepositoryConnectorProviderBase; - -/** - * In the Open Connector Framework (OCF), a ConnectorProvider is a factory for a specific type of connector. - * The IGCV2OMRSRepositoryConnectorProvider is the connector provider for the IGCV2OMRSRepositoryConnector. - * It extends OMRSRepositoryConnectorProviderBase which in turn extends the OCF ConnectorProviderBase. - * ConnectorProviderBase supports the creation of connector instances. - * - * The IGCV2OMRSRepositoryConnectorProvider must initialize ConnectorProviderBase with the Java class - * name of the OMRS Connector implementation (by calling super.setConnectorClassName(className)). - * Then the connector provider will work. - */ -public class IGCV2OMRSRepositoryConnectorProvider extends OMRSRepositoryConnectorProviderBase -{ -/** - * Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific - * OMRS Connector implementation. - */ -public IGCV2OMRSRepositoryConnectorProvider() -{ -ClassconnectorClass = IGCV2OMRSRepositoryConnector.class; - -super.setConnectorClassName(connectorClass.getName()); -} -} \ No newline at end of file
[05/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryValidator.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryValidator.java b/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryValidator.java deleted file mode 100644 index 3873e39..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryValidator.java +++ /dev/null @@ -1,3299 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.localrepository.repositorycontentmanager; - -import org.apache.atlas.omrs.ffdc.OMRSErrorCode; -import org.apache.atlas.omrs.ffdc.exception.*; -import org.apache.atlas.omrs.metadatacollection.properties.MatchCriteria; -import org.apache.atlas.omrs.metadatacollection.properties.instances.*; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Date; -import java.util.Iterator; -import java.util.List; - -/** - * OMRSRepositoryValidator provides methods to validate TypeDefs and Instances returned from - * an open metadata repository. It is typically used by OMRS repository connectors and - * repository event mappers. - */ -public class OMRSRepositoryValidator implements OMRSTypeDefValidator, OMRSInstanceValidator -{ -private static OMRSRepositoryContentManager defaultRepositoryContentManager = null; - -privateOMRSRepositoryContentManagerrepositoryContentManager; - -private static final Logger log = LoggerFactory.getLogger(OMRSRepositoryValidator.class); - - - -/** - * Default constructor - deprecated as a repository connector should get its repository validator - * from its superclass. - */ -@Deprecated -public OMRSRepositoryValidator() -{ -repositoryContentManager = defaultRepositoryContentManager; -} - - -/** - * Typical constructor used by the OMRS to create a repository validator for a repository connector. - * - * @param repositoryContentManager - holds details of valid types and provides the implementation of - * the repository validator methods - */ -public OMRSRepositoryValidator(OMRSRepositoryContentManager repositoryContentManager) -{ -this.repositoryContentManager = repositoryContentManager; -} - -/** - * Set up the local repository's content manager. This maintains a cache of the local repository's type - * definitions and rules to provide helpers and validators for TypeDefs and instances that are - * exchanged amongst the open metadata repositories and open metadata access services (OMAS). - * - * @param repositoryContentManager - link to repository content manager. - */ -public static synchronized void setRepositoryContentManager(OMRSRepositoryContentManager repositoryContentManager) -{ - OMRSRepositoryHelper.setRepositoryContentManager(repositoryContentManager); -} - - -/** - * Return a boolean flag indicating whether the list of TypeDefs passed are compatible with the - * all known typedefs. - * - * A valid TypeDef is one that matches name, GUID and version to the full list of TypeDefs. - * If a new TypeDef is present, it is added to the enterprise list. - * - * @param sourceName - source of the request (used for logging) - * @param typeDefs - list of TypeDefs. - * @throws RepositoryErrorException - a conflicting or invalid TypeDef has been returned - */ -public void validateEnterpriseTypeDefs(StringsourceName, - List typeDefs, - StringmethodName) throws RepositoryErrorException -{ -validateRepositoryContentManager(methodName); - -repositoryContentManager.validateEnterpriseTypeDefs(sourceName, typeDefs, methodName);
[19/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSEventPublisher.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSEventPublisher.java b/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSEventPublisher.java deleted file mode 100644 index 12be782..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSEventPublisher.java +++ /dev/null @@ -1,1955 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.eventmanagement; - -import org.apache.atlas.ocf.properties.beans.Connection; -import org.apache.atlas.omrs.admin.properties.OpenMetadataEventProtocolVersion; -import org.apache.atlas.omrs.auditlog.*; -import org.apache.atlas.omrs.eventmanagement.events.*; -import org.apache.atlas.omrs.ffdc.OMRSErrorCode; -import org.apache.atlas.omrs.ffdc.exception.OMRSLogicErrorException; -import org.apache.atlas.omrs.metadatacollection.properties.instances.EntityDetail; -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceProvenanceType; -import org.apache.atlas.omrs.metadatacollection.properties.instances.Relationship; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.AttributeTypeDef; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.TypeDef; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.TypeDefPatch; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.TypeDefSummary; -import org.apache.atlas.omrs.topicconnectors.OMRSTopicConnector; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - - -/** - * OMRSEventPublisher publishes OMRS Events to the supplied OMRSTopicConnector. - */ -public class OMRSEventPublisher implements OMRSRegistryEventProcessor, OMRSTypeDefEventProcessor, OMRSInstanceEventProcessor -{ -private static final OMRSAuditLog auditLog = new OMRSAuditLog(OMRSAuditingComponent.EVENT_PUBLISHER); - -private static final Logger log = LoggerFactory.getLogger(OMRSEventPublisher.class); - -private String publisherName= null; -private OMRSTopicConnector omrsTopicConnector = null; -private OpenMetadataEventProtocolVersion eventProtocolVersion = null; - - -/** - * Typical constructor sets up the local metadata collection id for events. - * - * @param publisherName - name of the cohort (or enterprise virtual repository) that this event publisher - * is sending events to. - * @param localProtocolVersion - protocol version to use - * @param topicConnector - OMRS Topic to send requests on - */ -public OMRSEventPublisher(String publisherName, - OpenMetadataEventProtocolVersion localProtocolVersion, - OMRSTopicConnector topicConnector) -{ -String actionDescription = "Initialize event publisher"; - -/* - * Save the publisherName and protocol version - */ -this.eventProtocolVersion = localProtocolVersion; -this.publisherName = publisherName; - -/* - * The topic connector is needed to publish events. - */ -if (topicConnector == null) -{ -if (log.isDebugEnabled()) -{ -log.debug("Null topic connector"); -} - -OMRSErrorCode errorCode = OMRSErrorCode.NULL_TOPIC_CONNECTOR; -StringerrorMessage = errorCode.getErrorMessageId() - + errorCode.getFormattedErrorMessage(publisherName); - -throw new OMRSLogicErrorException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - actionDescription, - errorMessage, -
[16/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventProcessor.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventProcessor.java b/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventProcessor.java deleted file mode 100644 index 126f137..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventProcessor.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.eventmanagement; - - -import org.apache.atlas.omrs.eventmanagement.events.OMRSInstanceEventProcessor; -import org.apache.atlas.omrs.eventmanagement.events.OMRSTypeDefEventProcessor; - -/** - * OMRSRepositoryEventProcessor describes the interface of a component that can process both TypeDef and Instance - * events from an open metadata repository. - */ -public interface OMRSRepositoryEventProcessor extends OMRSTypeDefEventProcessor, OMRSInstanceEventProcessor -{ -} http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/events/OMRSEvent.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/events/OMRSEvent.java b/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/events/OMRSEvent.java deleted file mode 100644 index 9a591e2..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/events/OMRSEvent.java +++ /dev/null @@ -1,581 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.eventmanagement.events; - - -import org.apache.atlas.ocf.properties.beans.Connection; -import org.apache.atlas.omrs.eventmanagement.events.v1.OMRSEventV1; -import org.apache.atlas.omrs.eventmanagement.events.v1.OMRSEventV1ErrorSection; -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceProvenanceType; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.AttributeTypeDef; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.TypeDef; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.TypeDefSummary; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Date; - -/** - * OMRSEvent defines the common content of a message that is sent through the OMRSTopicConnector to all metadata - * repositories registered in the open metadata repository cohort. It supports a category enum for the three - * main categories of event and provides specialized structures for processing each category of event. - */ -public abstract class OMRSEvent -{ -/* - * Basic event header information. - */ -protected Date eventTimestamp = null; -protected OMRSEventDirection eventDirection = null; - -/* - * The category of the event. - */ -protected OMRSEventCategory eventCategory= OMRSEventCategory.UNKNOWN; - -/* - * Information about the originator of the event. - */ -protected OMRSEventOriginator eventOriginator = null; - -/* - * Specific variables only used in error reporting - */ -protected OMRSEventErrorCode
[29/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/adapters/inmemory/repositoryconnector/InMemoryOMRSMetadataStore.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/adapters/inmemory/repositoryconnector/InMemoryOMRSMetadataStore.java b/omrs/src/main/java/org/apache/atlas/omrs/adapters/inmemory/repositoryconnector/InMemoryOMRSMetadataStore.java deleted file mode 100644 index 3d54344..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/adapters/inmemory/repositoryconnector/InMemoryOMRSMetadataStore.java +++ /dev/null @@ -1,615 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.adapters.inmemory.repositoryconnector; - -import org.apache.atlas.omrs.metadatacollection.properties.instances.EntityDetail; -import org.apache.atlas.omrs.metadatacollection.properties.instances.EntityProxy; -import org.apache.atlas.omrs.metadatacollection.properties.instances.Relationship; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.AttributeTypeDef; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.TypeDef; - -import java.util.*; - -/** - * InMemoryOMRSMetadataStore provides the in memory stores for the InMemoryRepositoryConnector - */ -public class InMemoryOMRSMetadataStore -{ -private StringrepositoryName = null; -private HashMaptypeDefStore = new HashMap<>(); -private HashMap attributeTypeDefStore= new HashMap<>(); -private HashMap entityStore = new HashMap<>(); -private HashMap entityProxyStore = new HashMap<>(); -private ListentityHistoryStore = new ArrayList<>(); -private HashMap relationshipStore= new HashMap<>(); -private ListrelationshipHistoryStore = new ArrayList<>(); - - -/** - * Default constructor - */ -public InMemoryOMRSMetadataStore() -{ -} - - -/** - * Set up the name of the repository for logging. - * - * @param repositoryName - String name - */ -protected void setRepositoryName(StringrepositoryName) -{ -this.repositoryName = repositoryName; -} - - -/** - * Return a list of all of the defined AttributeTypeDefs. - * - * @return list of attribute type definitions - */ -protected List getAttributeTypeDefs() -{ -return new ArrayList<>(attributeTypeDefStore.values()); -} - - -/** - * Return the AttributeTypeDef identified by the supplied guid. - * - * @param guid - unique identifier for the AttributeTypeDef - * @return attribute type definition - */ -protected AttributeTypeDef getAttributeTypeDef(String guid) -{ -return attributeTypeDefStore.get(guid); -} - - -/** - * Add an AttributeDefType to the store. - * - * @param attributeTypeDef - type to add - */ -protected void putAttributeTypeDef(AttributeTypeDef attributeTypeDef) -{ -attributeTypeDefStore.put(attributeTypeDef.getGUID(), attributeTypeDef); -} - - -/** - * Return a list of all of the defined TypeDefs. - * - * @return list of type definitions - */ -protected List getTypeDefs() -{ -return new ArrayList<>(typeDefStore.values()); -} - - -/** - * Return the type definition identified by the guid. - * - * @param guid - unique identifier for type definition - * @return type definition - */ -protected TypeDef getTypeDef(String guid) -{ -return typeDefStore.get(guid); -} - - -/** - * Add a type definition (TypeDef) to the store. - * - * @param typeDef - type definition - */ -protected void putTypeDef(TypeDef typeDef) -{ -typeDefStore.put(typeDef.getGUID(), typeDef); -} - - -/** - * Return a list of entities from the store that are at the latest level. - * - * @return
[07/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryContentManager.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryContentManager.java b/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryContentManager.java deleted file mode 100644 index 8f8e50c..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryContentManager.java +++ /dev/null @@ -1,2357 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.localrepository.repositorycontentmanager; - -import org.apache.atlas.omrs.auditlog.OMRSAuditCode; -import org.apache.atlas.omrs.auditlog.OMRSAuditLog; -import org.apache.atlas.omrs.auditlog.OMRSAuditingComponent; -import org.apache.atlas.omrs.eventmanagement.*; -import org.apache.atlas.omrs.eventmanagement.events.OMRSTypeDefEventProcessor; -import org.apache.atlas.omrs.ffdc.OMRSErrorCode; -import org.apache.atlas.omrs.ffdc.exception.*; -import org.apache.atlas.omrs.localrepository.repositoryconnector.LocalOMRSRepositoryConnector; -import org.apache.atlas.omrs.metadatacollection.OMRSMetadataCollection; -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceStatus; -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceType; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.*; -import org.apache.atlas.omrs.metadatacollection.repositoryconnector.OMRSRepositoryConnector; -import org.apache.atlas.omrs.rest.server.OMRSRepositoryRESTServices; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.*; - -/** - * OMRSRepositoryContentManager supports an in-memory cache of TypeDefs for the local server. It is used by the OMRS - * components for constructing metadata instances with valid types. It ensures that the TypeDefs used in other - * members of the open metadata repository cohorts that the local server is also a member of are consistent with the - * local repository. - * - * OMRSRepositoryContentManager plays a central role in ensuring the integrity of the metadata in the local repository. - * It is called from multiple components at different points in the processing. It presents a different interface - * to each of these components that is specialized to their needs. - * - * - * OMRSTypeDefEventProcessor - processes inbound events from remote members of the open metadata - * repository cohorts that the local repository is connected to. These incoming TypeDef events need to - * be validated against the types used locally and either saved or discarded depending on the exchange rule - * setting. - * - * - * OMRSTypeDefManager - provides maintenance methods for managing the TypeDefs in the local cache. - * - * - * OMRSTypeDefHelper - provides methods to help OMRS connectors and adapters manage TypeDefs. - * - * - * OMRSTypeDefValidator - provides methods to validate TypeDefs. - * - * - * OMRSInstanceValidator - provides methods to help validate instances. - * - * - */ -public class OMRSRepositoryContentManager implements OMRSTypeDefEventProcessor, - OMRSTypeDefManager, - OMRSTypeDefHelper, - OMRSTypeDefValidator -{ -private LocalOMRSRepositoryConnector localRepositoryConnector = null; -private OMRSRepositoryEventManageroutboundRepositoryEventManager = null; -private OMRSRepositoryConnector realLocalConnector = null; -private OMRSRepositoryEventExchangeRule saveExchangeRule = null; -private StringopenTypesOriginGUID= null; -private HashMapknownTypeDefGUIDs
[06/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryHelper.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryHelper.java b/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryHelper.java deleted file mode 100644 index e8f4662..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositorycontentmanager/OMRSRepositoryHelper.java +++ /dev/null @@ -1,1782 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.localrepository.repositorycontentmanager; - - -import org.apache.atlas.omrs.ffdc.OMRSErrorCode; -import org.apache.atlas.omrs.ffdc.exception.*; -import org.apache.atlas.omrs.metadatacollection.properties.instances.*; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.*; - -import java.util.*; - -/** - * OMRSRepositoryHelper provides methods to repository connectors and repository event mappers to help - * them build valid type definitions (TypeDefs), entities and relationships. It is a facade to the - * repository content manager which holds an in memory cache of all the active TypeDefs in the local server. - * OMRSRepositoryHelper's purpose is to create a object that the repository connectors and event mappers can - * create, use and discard without needing to know how to connect to the repository content manager. - */ -public class OMRSRepositoryHelper implements OMRSTypeDefHelper, OMRSInstanceHelper -{ -private static OMRSRepositoryContentManager defaultRepositoryContentManager = null; - -private OMRSRepositoryContentManager repositoryContentManager; - - -/** - * Set up the default local repository's content manager. This maintains a cache of the local repository's type - * definitions and rules to provide helpers and validators for TypeDefs and instances that are - * exchanged amongst the open metadata repositories and open metadata access services (OMAS). - * - * @param repositoryContentManager - link to repository content manager. - */ -public static synchronized void setRepositoryContentManager(OMRSRepositoryContentManager repositoryContentManager) -{ -OMRSRepositoryHelper.defaultRepositoryContentManager = repositoryContentManager; -} - - -/** - * Default constructor uses the default repository content manager. Repository connectors should use the - * repository helper from their superclass. - */ -@Deprecated -public OMRSRepositoryHelper() -{ -this.repositoryContentManager = defaultRepositoryContentManager; -} - - -/** - * Creates a repository helper linked to the supplied repository content manager. - * - * @param repositoryContentManager - object associated with the local repository. - */ -public OMRSRepositoryHelper(OMRSRepositoryContentManager repositoryContentManager) -{ -this.repositoryContentManager = repositoryContentManager; -} - - -/* - * - * OMRSTypeDefHelper - */ - -/** - * Return the list of typedefs active in the local repository. - * - * @return TypeDef gallery - */ -public TypeDefGallery getActiveTypeDefGallery() -{ -final String methodName = "getActiveTypeDefGallery"; - -validateRepositoryContentManager(methodName); - -return repositoryContentManager.getActiveTypeDefGallery(); -} - - -/** - * Return the list of typedefs known by the local repository. - * - * @return TypeDef gallery - */ -public TypeDefGallery getKnownTypeDefGallery() -{ -final String methodName = "getKnownTypeDefGallery"; - -validateRepositoryContentManager(methodName); - -return repositoryContentManager.getKnownTypeDefGallery(); -} - - -/** - * Return the TypeDef identified by the name supplied by the caller. This is used in the connectors when - * validating the actual types of the
[41/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omag-api/src/main/java/org/apache/atlas/omag/ffdc/exception/OMAGInvalidParameterException.java -- diff --git a/omag-api/src/main/java/org/apache/atlas/omag/ffdc/exception/OMAGInvalidParameterException.java b/omag-api/src/main/java/org/apache/atlas/omag/ffdc/exception/OMAGInvalidParameterException.java deleted file mode 100644 index ecaec18..000 --- a/omag-api/src/main/java/org/apache/atlas/omag/ffdc/exception/OMAGInvalidParameterException.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.atlas.omag.ffdc.exception; - -/** - * OMAGInvalidParameterException is used when invalid parameters are passed on an OMAG call. - */ -public class OMAGInvalidParameterException extends OMAGCheckedExceptionBase -{ -/** - * This is the typical constructor used for creating a OMAGInvalidParameterException. - * - * @param httpCode - http response code to use if this exception flows over a REST call - * @param className - name of class reporting error - * @param actionDescription - description of function it was performing when error detected - * @param errorMessage - description of error - * @param systemAction - actions of the system as a result of the error - * @param userAction - instructions for correcting the error - */ -public OMAGInvalidParameterException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) -{ -super(httpCode, className, actionDescription, errorMessage, systemAction, userAction); -} - - -/** - * This is the constructor used for creating a OMAGInvalidParameterException that resulted from a previous error. - * - * @param httpCode - http response code to use if this exception flows over a REST call - * @param className - name of class reporting error - * @param actionDescription - description of function it was performing when error detected - * @param errorMessage - description of error - * @param systemAction - actions of the system as a result of the error - * @param userAction - instructions for correcting the error - * @param caughtError - the error that resulted in this exception. - * */ -public OMAGInvalidParameterException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) -{ -super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtError); -} -} http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omag-api/src/main/java/org/apache/atlas/omag/ffdc/exception/OMAGNotAuthorizedException.java -- diff --git a/omag-api/src/main/java/org/apache/atlas/omag/ffdc/exception/OMAGNotAuthorizedException.java b/omag-api/src/main/java/org/apache/atlas/omag/ffdc/exception/OMAGNotAuthorizedException.java deleted file mode 100644 index 2400f0c..000 --- a/omag-api/src/main/java/org/apache/atlas/omag/ffdc/exception/OMAGNotAuthorizedException.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.atlas.omag.ffdc.exception; - -/** - *
[20/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/enterprise/repositoryconnector/EnterpriseOMRSRepositoryConnector.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/enterprise/repositoryconnector/EnterpriseOMRSRepositoryConnector.java b/omrs/src/main/java/org/apache/atlas/omrs/enterprise/repositoryconnector/EnterpriseOMRSRepositoryConnector.java deleted file mode 100644 index 996ca27..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/enterprise/repositoryconnector/EnterpriseOMRSRepositoryConnector.java +++ /dev/null @@ -1,473 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.enterprise.repositoryconnector; - -import org.apache.atlas.ocf.Connector; -import org.apache.atlas.ocf.ffdc.ConnectorCheckedException; -import org.apache.atlas.omrs.auditlog.OMRSAuditCode; -import org.apache.atlas.omrs.auditlog.OMRSAuditLog; -import org.apache.atlas.omrs.auditlog.OMRSAuditingComponent; -import org.apache.atlas.omrs.enterprise.connectormanager.OMRSConnectorConsumer; -import org.apache.atlas.omrs.enterprise.connectormanager.OMRSConnectorManager; -import org.apache.atlas.omrs.ffdc.exception.RepositoryErrorException; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryHelper; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryValidator; -import org.apache.atlas.omrs.metadatacollection.OMRSMetadataCollection; -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceHeader; -import org.apache.atlas.omrs.metadatacollection.repositoryconnector.OMRSRepositoryConnector; -import org.apache.atlas.omrs.ffdc.OMRSErrorCode; -import org.apache.atlas.omrs.ffdc.exception.OMRSRuntimeException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -/** - * EnterpriseOMRSRepositoryConnector supports federating calls to multiple metadata repositories. As a result, - * its OMRSMetadataCollection (EnterpriseOMRSMetadataCollection) returns metadata from all repositories in the - * connected open metadata repository cohort(s). - * - * An instance of the EnterpriseOMRSRepositoryConnector is created by each Open Metadata Access Service (OMAS) - * using the OCF ConnectorBroker. They use its metadata collection to retrieve and send the metadata they need. - * - * - * Each EnterpriseOMRSRepositoryConnector instance needs to maintain an up to date list of OMRS Connectors to all of the - * repositories in the connected open metadata repository cohort(s). It does by registering as an OMRSConnectorConsumer - * with the OMRSConnectorManager to be notified when connectors to new open metadata repositories are available. - * - */ -public class EnterpriseOMRSRepositoryConnector extends OMRSRepositoryConnector implements OMRSConnectorConsumer -{ -private OMRSConnectorManager connectorManager = null; -private String connectorConsumerId = null; - -private FederatedConnector localCohortConnector = null; -private ArrayListremoteCohortConnectors = new ArrayList<>(); - -private String accessServiceName = null; - -private static final Logger log = LoggerFactory.getLogger(EnterpriseOMRSRepositoryConnector.class); -private static final OMRSAuditLog auditLog = new OMRSAuditLog(OMRSAuditingComponent.ENTERPRISE_REPOSITORY_CONNECTOR); - - -/** - * Constructor used by the EnterpriseOMRSConnectorProvider. - * - * @param connectorManager - provides notifications as repositories register and unregister with the - * cohorts. - */ -public EnterpriseOMRSRepositoryConnector(OMRSConnectorManager connectorManager) -{ -super(); - -String methodName = "constructor"; - -this.connectorManager = connectorManager; - -if (connectorManager != null) -{ -
[18/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventExchangeRule.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventExchangeRule.java b/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventExchangeRule.java deleted file mode 100644 index 90402d9..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventExchangeRule.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.eventmanagement; - -import org.apache.atlas.omrs.admin.properties.OpenMetadataExchangeRule; -import org.apache.atlas.omrs.ffdc.OMRSErrorCode; -import org.apache.atlas.omrs.ffdc.exception.OMRSLogicErrorException; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryContentManager; -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceHeader; -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceType; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.TypeDef; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.TypeDefSummary; - -import java.util.HashMap; -import java.util.List; - -/** - * OMRSRepositoryEventExchangeRule determines if particular types of events should be exchanged on the OMRS Topic. - */ -public class OMRSRepositoryEventExchangeRule -{ -private String sourceName; -private OMRSRepositoryContentManager repositoryContentManager; -private OpenMetadataExchangeRule exchangeRule; -private HashMapselectedTypesToProcess = new HashMap<>(); - - -/** - * Constructor provides all of the objects used in the event exchange decision. - * - * @param sourceName - name of the caller - * @param repositoryContentManager - local manager of the type definitions (TypeDefs) used by the local repository. - * @param exchangeRule - enum detailing the types of events to process. - * @param selectedTypesToProcess - supplementary list to support selective processing of events. - */ -public OMRSRepositoryEventExchangeRule(String sourceName, - OMRSRepositoryContentManager repositoryContentManager, - OpenMetadataExchangeRule exchangeRule, - List selectedTypesToProcess) -{ -final String methodName = "OMRSRepositoryEventExchangeRule constructor"; - -/* - * Validate the supplied parameters. - */ -if (sourceName == null) -{ -OMRSErrorCode errorCode = OMRSErrorCode.NULL_SOURCE_NAME; - -String errorMessage = errorCode.getErrorMessageId() -+ errorCode.getFormattedErrorMessage(methodName); - -throw new OMRSLogicErrorException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), - errorCode.getUserAction()); -} -if (repositoryContentManager == null) -{ -OMRSErrorCode errorCode = OMRSErrorCode.NULL_CONTENT_MANAGER; -StringerrorMessage = errorCode.getErrorMessageId() - + errorCode.getFormattedErrorMessage(methodName); - -throw new OMRSLogicErrorException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, - errorCode.getSystemAction(), -
[03/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/metadatacollection/OMRSMetadataCollection.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/metadatacollection/OMRSMetadataCollection.java b/omrs/src/main/java/org/apache/atlas/omrs/metadatacollection/OMRSMetadataCollection.java deleted file mode 100644 index ef3c3d7..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/metadatacollection/OMRSMetadataCollection.java +++ /dev/null @@ -1,2139 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.metadatacollection; - -import org.apache.atlas.omrs.ffdc.*; -import org.apache.atlas.omrs.ffdc.exception.*; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryHelper; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryValidator; -import org.apache.atlas.omrs.metadatacollection.properties.MatchCriteria; -import org.apache.atlas.omrs.metadatacollection.properties.SequencingOrder; -import org.apache.atlas.omrs.metadatacollection.properties.instances.*; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.*; -import org.apache.atlas.omrs.metadatacollection.repositoryconnector.OMRSRepositoryConnector; - -import java.util.List; -import java.util.Date; - -/** - * - * OMRSMetadataCollection is the common interface for working with the contents of a metadata repository. - * Within a metadata collection are the type definitions (TypeDefs) and metadata instances (Entities and - * Relationships). - * - * The methods on OMRSMetadataCollection are in the following major groups: - * - * - * Methods to retrieve information about the metadata repository - - * Used to retrieve or confirm the identity of the metadata repository - * - * Methods for working with typedefs - - * Typedefs are used to define the type model for open metadata. - * The open metadata support had a comprehensive set of typedefs implemented, and these can be augmented by - * different vendors or applications. The typedefs can be queried, created, updated and deleted though the - * metadata collection. - * - * - * Methods for querying Entities and Relationships - - * The metadata repository stores instances of the typedefs as metadata instances. - * Principally these are entities (nodes in the graph) and relationships (links between nodes). - * Both the entities and relationships can have properties. - * The entity may also have structured properties called structs and classifications attached. - * This second group of methods supports a range of queries to retrieve these instances. - * - * - * Methods for maintaining the instances - - * The fourth group of methods supports the maintenance of the metadata instances. Each instance as a status - * (see InstanceStatus) that allows an instance to be proposed, drafted and approved before it becomes - * active. The instances can also be soft-deleted and restored or purged from the metadata - * collection. - * - * - * Methods for repairing the metadata collections of the cohort - - * The fifth group of methods are for editing the control information of entities and relationships to - * manage changes in the cohort. These methods are advanced methods and are rarely used. - * - * - * Methods for local maintenance of a metadata collection - * The final group of methods are for removing reference copies of the metadata instances. These updates - * are not broadcast to the rest of the Cohort as events. - * - * - */ -public abstract class OMRSMetadataCollection -{ -static final private String defaultRepositoryName = "Open Metadata Repository"; - -protected String metadataCollectionId; /* Initialized in constructor */ -protected OMRSRepositoryHelperrepositoryHelper= null; /*
[17/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventManager.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventManager.java b/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventManager.java deleted file mode 100644 index 2deeddb..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/OMRSRepositoryEventManager.java +++ /dev/null @@ -1,1631 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.eventmanagement; - -import org.apache.atlas.omrs.auditlog.OMRSAuditLog; -import org.apache.atlas.omrs.auditlog.OMRSAuditingComponent; -import org.apache.atlas.omrs.eventmanagement.events.OMRSInstanceEventProcessor; -import org.apache.atlas.omrs.eventmanagement.events.OMRSTypeDefEventProcessor; -import org.apache.atlas.omrs.ffdc.OMRSErrorCode; -import org.apache.atlas.omrs.ffdc.exception.OMRSLogicErrorException; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryValidator; -import org.apache.atlas.omrs.metadatacollection.properties.instances.EntityDetail; -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceProvenanceType; -import org.apache.atlas.omrs.metadatacollection.properties.instances.Relationship; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; - -/** - * OMRSRepositoryEventManager is responsible for managing the distribution of TypeDef and instance events. - * There is one OMRSRepositoryEventManager for each cohort that the local server is registered with and one for - * the local repository. - * - * Since OMRSRepositoryEventManager sits at the crossroads of the flow of events between the cohorts, - * the local repository and the enterprise access components, it performs detailed error checking of the - * event contents to help assure the integrity of the open metadata ecosystem. - */ -public class OMRSRepositoryEventManager implements OMRSRepositoryEventProcessor -{ -private ArrayList typeDefEventConsumers = new ArrayList<>(); -private ArrayList instanceEventConsumers = new ArrayList<>(); -private OMRSRepositoryValidator repositoryValidator; /* set in constructor */ -private OMRSRepositoryEventExchangeRule exchangeRule; /* set in constructor */ - -/* - * The audit log provides a verifiable record of the open metadata archives that have been loaded into - * the open metadata repository. The Logger is for standard debug. - */ -private static final OMRSAuditLog auditLog = new OMRSAuditLog(OMRSAuditingComponent.REPOSITORY_EVENT_MANAGER); -private static final Logger log = LoggerFactory.getLogger(OMRSRepositoryEventManager.class); - -/** - * Constructor to initialize a repository event manager - * - * @param exchangeRule - this is the rule that determines which events are processed. - * @param repositoryValidator - validator class for checking open metadata repository objects and parameters. - */ -public OMRSRepositoryEventManager(OMRSRepositoryEventExchangeRule exchangeRule, - OMRSRepositoryValidator repositoryValidator) -{ -final String methodName = "OMRSRepositoryEventManager"; -/* - * If the exchangeRule is null, throw exception - */ -if (exchangeRule == null) -{ -OMRSErrorCode errorCode = OMRSErrorCode.NULL_EXCHANGE_RULE; -StringerrorMessage = errorCode.getErrorMessageId() + errorCode.getFormattedErrorMessage(methodName); - -throw new OMRSLogicErrorException(errorCode.getHTTPErrorCode(), - this.getClass().getName(), - methodName, - errorMessage, -
[15/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/events/OMRSInstanceEventProcessor.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/events/OMRSInstanceEventProcessor.java b/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/events/OMRSInstanceEventProcessor.java deleted file mode 100644 index fea400b..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/eventmanagement/events/OMRSInstanceEventProcessor.java +++ /dev/null @@ -1,659 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.eventmanagement.events; - -import org.apache.atlas.omrs.metadatacollection.properties.instances.EntityDetail; -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceProvenanceType; -import org.apache.atlas.omrs.metadatacollection.properties.instances.Relationship; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.TypeDefSummary; - -/** - * OMRSInstanceEventProcessor is an interface implemented by a component that is able to process incoming - * metadata instance events for an Open Metadata Repository. Instance events are used to replicate metadata - * instances across an Open Metadata Repository Cohort. - */ -public interface OMRSInstanceEventProcessor -{ -/** - * A new entity has been created. - * - * @param sourceName - name of the source of the event. It may be the cohort name for incoming events or the - * local repository, or event mapper name. - * @param originatorMetadataCollectionId - unique identifier for the metadata collection hosted by the server that - * sent the event. - * @param originatorServerName - name of the server that the event came from. - * @param originatorServerType - type of server that the event came from. - * @param originatorOrganizationName - name of the organization that owns the server that sent the event. - * @param entity - details of the new entity - */ -void processNewEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - EntityDetail entity); - - -/** - * An existing entity has been updated. - * - * @param sourceName - name of the source of the event. It may be the cohort name for incoming events or the - * local repository, or event mapper name. - * @param originatorMetadataCollectionId - unique identifier for the metadata collection hosted by the server that - * sent the event. - * @param originatorServerName - name of the server that the event came from. - * @param originatorServerType - type of server that the event came from. - * @param originatorOrganizationName - name of the organization that owns the server that sent the event. - * @param entity - details of the new version of the entity. - */ -void processUpdatedEntityEvent(String sourceName, - String originatorMetadataCollectionId, - String originatorServerName, - String originatorServerType, - String originatorOrganizationName, - EntityDetail entity); - - -/** - * An update to an entity has been undone. - * - * @param sourceName - name of the source of the event. It may be the cohort name for incoming events or the - * local repository, or event mapper name. - * @param originatorMetadataCollectionId - unique identifier for the metadata collection hosted by the server that - * sent the event. - * @param
[27/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/admin/properties/OpenMetadataExchangeRule.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/admin/properties/OpenMetadataExchangeRule.java b/omrs/src/main/java/org/apache/atlas/omrs/admin/properties/OpenMetadataExchangeRule.java deleted file mode 100644 index c49e5fc..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/admin/properties/OpenMetadataExchangeRule.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.admin.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * OpenMetadataExchangeRule controls the sending/receiving of metadata instances on the metadata highway. - * - * - * REGISTRATION_ONLY means do not send/receive reference metadata - just perform the minimal registration - * exchanges. - * - * - * JUST_TYPEDEFS - means only send/receive/validate type definitions (TypeDefs). - * - * - * SELECTED_TYPES means that in addition to TypeDefs events, only metadata instances of the types - * supplied in the related list of TypeDefs (see typesToSend, typesToSave and typesToFederate) should be processed. - * - * - * LEARNED_TYPES means that the local repository requests reference copies of metadata based on the requests of - * the local user community. - * - * - * ALL means send/receive all types of metadata that are supported by the local repository. - * - * - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum OpenMetadataExchangeRule -{ -REGISTRATION_ONLY (0, "Registration Only", "Only registration exchange; no TypeDefs or metadata instances."), -JUST_TYPEDEFS (1, "Just TypeDefs", "Only registration and type definitions (TypeDefs) exchange."), -SELECTED_TYPES(2, "Selected Types","Registration plus all type definitions (TypeDefs) and metadata " + -"instances (Entities and Relationships) of selected types."), -LEARNED_TYPES (3, "Learned Types", "Registration plus all type definitions (TypeDefs) and metadata " + -"instances (Entities and Relationships) of types " + -"requested by local users to this server."), -ALL (99, "All", "Registration plus all type definitions (TypeDefs) and metadata " + -"instances (Entities and Relationships)."); - -private int replicationRuleCode; -private String replicationRuleName; -private String replicationRuleDescription; - -/** - * Constructor for the metadata instance replication rule. - * - * @param replicationRuleCode - the code number of this metadata instance replication rule. - * @param replicationRuleName - the name of this metadata instance replication rule. - * @param replicationRuleDescription - the description of this metadata instance replication rule. - */ -OpenMetadataExchangeRule(int replicationRuleCode, String replicationRuleName, String replicationRuleDescription) -{ -this.replicationRuleCode = replicationRuleCode; -this.replicationRuleName = replicationRuleName; -this.replicationRuleDescription = replicationRuleDescription; -} - - -/** - * Return the code number of this metadata instance replication rule. - * - * @return int replication rule code number - */ -public int
[13/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/OMRSErrorCode.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/OMRSErrorCode.java b/omrs/src/main/java/org/apache/atlas/omrs/ffdc/OMRSErrorCode.java deleted file mode 100644 index 9d84f36..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/ffdc/OMRSErrorCode.java +++ /dev/null @@ -1,780 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.ffdc; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.text.MessageFormat; -import java.util.Arrays; - -/** - * The OMRSErrorCode is used to define first failure data capture (FFDC) for errors that occur within the OMRS - * It is used in conjunction with all OMRS Exceptions, both Checked and Runtime (unchecked). - * - * The 5 fields in the enum are: - * - * HTTP Error Code - for translating between REST and JAVA - Typically the numbers used are: - * - * 500 - internal error - * 501 - not implemented - * 503 - Service not available - * 400 - invalid parameters - * 401 - unauthorized - * 404 - not found - * 405 - method not allowed - * 409 - data conflict errors - eg item already defined - * - * Error Message Id - to uniquely identify the message - * Error Message Text - includes placeholder to allow additional values to be captured - * SystemAction - describes the result of the error - * UserAction - describes how a user should correct the error - * - */ -public enum OMRSErrorCode -{ -TYPEDEF_IN_USE(400, "OMRS-REPOSITORY-400-001 ", -"Unable to delete the TypeDef \"{0}\" (guid = {1}) since it is still in use in the open metadata repository {2}", -"The system is unable to delete the TypeDef because there are still instances in the metadata repository that are using it.", -"Remove the existing instances from the open metadata repositories and try the delete again."), -ATTRIBUTE_TYPEDEF_IN_USE(400, "OMRS-REPOSITORY-400-002 ", -"Unable to delete the AttributeTypeDef \"{0}\" (guid = {1}) since it is still in use in the open metadata repository {2}", -"The system is unable to delete the AttributeTypeDef because there are still instances in the metadata repository that are using it.", -"Remove the existing instances from the open metadata repositories and try the delete again."), -TYPEDEF_ALREADY_DEFINED(400, "OMRS-REPOSITORY-400-003 ", -"Unable to add the TypeDef \"{0}\" (guid = {1}) since it is already defined in the open metadata repository {2}", -"The system is unable to add the TypeDef to its repository because it is already defined.", -"Validate that the existing definition is as required. It is possible to patch the TypeDef, or delete it and re-define it."), -ATTRIBUTE_TYPEDEF_ALREADY_DEFINED(400, "OMRS-REPOSITORY-400-004 ", -"Unable to add the AttributeTypeDef \"{0}\" (guid = {1}) since it is already defined in the open metadata repository {2}", -"The system is unable to delete the AttributeTypeDef because there are still instances in the metadata repository that are using it.", -"Validate that the existing definition is as required. It is possible to patch the TypeDef, or delete it and re-define it."), -UNKNOWN_CLASSIFICATION(400, "OMRS-REPOSITORY-400-005 ", -"Classification \"{0}\" is not a recognized classification type by open metadata repository {1}", -"The system is unable to create a new classification for an entity because the open metadata repository does not recognize the classification type.", -"Create a ClassificationDef for the classification and retry the request."), -INVALID_CLASSIFICATION_FOR_ENTITY(400, "OMRS-REPOSITORY-400-006 ", -"Open metadata repository {0} is unable to assign a classification of type \"{0}\" to an entity of type \"{1}\" because the classification type is not valid for this type of entity", -
[38/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/server/AssetConsumerRESTServices.java -- diff --git a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/server/AssetConsumerRESTServices.java b/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/server/AssetConsumerRESTServices.java deleted file mode 100644 index 967be5a..000 --- a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/server/AssetConsumerRESTServices.java +++ /dev/null @@ -1,1057 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omas.assetconsumer.server; - - -import org.apache.atlas.ocf.properties.CommentType; -import org.apache.atlas.omag.admin.server.OMAGAccessServiceRegistration; -import org.apache.atlas.omag.configuration.registration.AccessServiceDescription; -import org.apache.atlas.omag.configuration.registration.AccessServiceOperationalStatus; -import org.apache.atlas.omag.configuration.registration.AccessServiceRegistration; -import org.apache.atlas.omas.assetconsumer.admin.AssetConsumerAdmin; -import org.apache.atlas.omas.assetconsumer.ffdc.AssetConsumerErrorCode; -import org.apache.atlas.omas.assetconsumer.ffdc.exceptions.*; -import org.apache.atlas.omas.assetconsumer.server.properties.AssetConsumerOMASAPIResponse; -import org.apache.atlas.omas.assetconsumer.server.properties.ConnectionResponse; -import org.apache.atlas.omas.assetconsumer.server.properties.GUIDResponse; -import org.apache.atlas.omas.assetconsumer.server.properties.VoidResponse; -import org.apache.atlas.ocf.properties.StarRating; -import org.apache.atlas.omrs.metadatacollection.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.bind.annotation.*; - - -/** - * The AssetConsumerRESTServices provides the server-side implementation of the AssetConsumer Open Metadata - * Assess Service (OMAS). This interface provides connections to assets and APIs for adding feedback - * on the asset. - */ -@RestController -@RequestMapping("/omag/omas/asset-consumer") -public class AssetConsumerRESTServices -{ -static private String accessServiceName = null; -static private OMRSRepositoryConnectorrepositoryConnector = null; - -private static final Logger log = LoggerFactory.getLogger(AssetConsumerRESTServices.class); - -/** - * Provide a connector to the REST Services. - * - * @param accessServiceName - name of this access service - * @param repositoryConnector - OMRS Repository Connector to the property server. - */ -static public void setRepositoryConnector(String accessServiceName, - OMRSRepositoryConnector repositoryConnector) -{ -AssetConsumerRESTServices.accessServiceName = accessServiceName; -AssetConsumerRESTServices.repositoryConnector = repositoryConnector; -} - -/** - * Default constructor - */ -public AssetConsumerRESTServices() -{ -AccessServiceDescription myDescription = AccessServiceDescription.ASSET_CONSUMER_OMAS; -AccessServiceRegistration myRegistration = new AccessServiceRegistration(myDescription.getAccessServiceCode(), - myDescription.getAccessServiceName(), - myDescription.getAccessServiceDescription(), - myDescription.getAccessServiceWiki(), - AccessServiceOperationalStatus.ENABLED, - AssetConsumerAdmin.class.getName()); -OMAGAccessServiceRegistration.registerAccessService(myRegistration); -} - - - -/** - * Returns the connection object corresponding to the
[28/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/admin/OMRSOperationalServices.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/admin/OMRSOperationalServices.java b/omrs/src/main/java/org/apache/atlas/omrs/admin/OMRSOperationalServices.java deleted file mode 100644 index e72d783..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/admin/OMRSOperationalServices.java +++ /dev/null @@ -1,1012 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.admin; - -import org.apache.atlas.ocf.Connector; -import org.apache.atlas.ocf.ConnectorBroker; -import org.apache.atlas.ocf.properties.beans.Connection; -import org.apache.atlas.omrs.admin.properties.CohortConfig; -import org.apache.atlas.omrs.admin.properties.EnterpriseAccessConfig; -import org.apache.atlas.omrs.admin.properties.LocalRepositoryConfig; -import org.apache.atlas.omrs.admin.properties.RepositoryServicesConfig; -import org.apache.atlas.omrs.archivemanager.OMRSArchiveManager; -import org.apache.atlas.omrs.archivemanager.store.OpenMetadataArchiveStoreConnector; -import org.apache.atlas.omrs.auditlog.OMRSAuditCode; -import org.apache.atlas.omrs.auditlog.OMRSAuditLog; -import org.apache.atlas.omrs.auditlog.OMRSAuditingComponent; -import org.apache.atlas.omrs.auditlog.store.OMRSAuditLogStore; -import org.apache.atlas.omrs.enterprise.connectormanager.OMRSConnectionConsumer; -import org.apache.atlas.omrs.enterprise.connectormanager.OMRSEnterpriseConnectorManager; -import org.apache.atlas.omrs.enterprise.repositoryconnector.EnterpriseOMRSConnection; -import org.apache.atlas.omrs.enterprise.repositoryconnector.EnterpriseOMRSRepositoryConnector; -import org.apache.atlas.omrs.eventmanagement.OMRSRepositoryEventExchangeRule; -import org.apache.atlas.omrs.eventmanagement.OMRSRepositoryEventManager; -import org.apache.atlas.omrs.eventmanagement.repositoryeventmapper.OMRSRepositoryEventMapperConnector; -import org.apache.atlas.omrs.ffdc.exception.OMRSConfigErrorException; -import org.apache.atlas.omrs.ffdc.OMRSErrorCode; -import org.apache.atlas.omrs.ffdc.exception.OMRSLogicErrorException; -import org.apache.atlas.omrs.ffdc.exception.OMRSRuntimeException; -import org.apache.atlas.omrs.enterprise.repositoryconnector.EnterpriseOMRSConnectorProvider; -import org.apache.atlas.omrs.localrepository.repositoryconnector.LocalOMRSConnectorProvider; -import org.apache.atlas.omrs.localrepository.repositoryconnector.LocalOMRSRepositoryConnector; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryContentManager; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryHelper; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryValidator; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSTypeDefValidator; -import org.apache.atlas.omrs.metadatacollection.repositoryconnector.OMRSRepositoryConnector; -import org.apache.atlas.omrs.metadatahighway.OMRSMetadataHighwayManager; -import org.apache.atlas.omrs.rest.server.OMRSRepositoryRESTServices; -import org.apache.atlas.omrs.topicconnectors.OMRSTopicConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - -/** - * OMRSOperationalServices provides the OMAG Server with access to the OMRS capabilities. - * This includes managing the local metadata repository, connecting and disconnecting from the metadata - * highway and supporting administrative - * actions captured through the OMAG REST interface. - * - * Examples of the types of capabilities offered by the OMRS Manager include: - * - * Initialize and Shutdown the OMRS - * See the state of the cluster - * see the state of the connectors - * View the audit log - * Load new connector JARs - * Connect/disconnect from the metadata highway - * - */ -public class OMRSOperationalServices -{ -/* - * The audit log provides a verifiable record of the membership of the open metadata repository cohort and the - *
[45/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/RelatedAssetProperties.java -- diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/RelatedAssetProperties.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/RelatedAssetProperties.java deleted file mode 100644 index 2ed017e..000 --- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/RelatedAssetProperties.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.ocf.properties; - - -import org.apache.atlas.ocf.ffdc.PropertyServerException; - - -/** - * RelatedAssetProperties returns detailed information about an asset that is related to a connected asset. - * - * It is a generic interface for all types of open metadata assets. However, it assumes the asset's metadata model - * inherits from Asset (see model 0010 in Area 0). - * - * The RelatedAssetProperties returns metadata about the asset at three levels of detail: - * - * assetSummary - used for displaying details of the asset in summary lists or hover text - * assetDetail - used to display all of the information known about the asset with summaries - * of the relationships to other metadata entities - * assetUniverse - used to define the broader context for the asset - * - * - * RelatedAssetProperties is a base class for the asset information that returns null, - * for the asset's properties. Metadata repository implementations extend this class to add their - * implementation of the refresh() method that calls to the metadata repository to populate the metadata properties. - */ -public abstract class RelatedAssetProperties extends PropertyBase -{ -/* - * AssetUniverse extends AssetDetails which extends AssetSummary. The interaction with the metadata repository - * pulls the asset universe in one single network interaction and the caller can then explore the metadata - * property by property without incurring many network interactions (unless there are too many instances - * of a particular type of property and one of the iterators is forced to use paging). - * - * If null is returned, the caller is not linked to a metadata repository. - */ -protected AssetUniverse assetProperties = null; -protected AssetDescriptor connectedAsset = null; -protected RelatedAsset relatedAsset = null; - - -/** - * Typical constructor. - * - * @param connectedAsset - original top-level asset - * @param relatedAsset - asset to extract the full set of properties. - */ -public RelatedAssetProperties(AssetDescriptor connectedAsset, RelatedAsset relatedAsset) -{ -/* - * Remember the parent asset and details of the related asset to be retrieved. - */ -this.connectedAsset = connectedAsset; -this.relatedAsset = relatedAsset; -} - - -/** - * Copy/clone constructor* - * - * @param templateProperties - template to copy - */ -public RelatedAssetProperties(RelatedAssetProperties templateProperties) -{ -if (templateProperties != null) -{ -AssetUniverse templateAssetUniverse = templateProperties.getAssetUniverse(); -if (templateAssetUniverse != null) -{ -assetProperties = new AssetUniverse(templateAssetUniverse); -connectedAsset = templateProperties.connectedAsset; -relatedAsset = templateProperties.relatedAsset; -} -} -} - - -/** - * Returns the summary information organized in the assetSummary structure. - * - * @return AssetSummary - summary object - */ -public AssetSummary getAssetSummary() { return assetProperties; } - - - -/** - * Returns detailed information about the asset organized in the assetDetail structure. - * - * @return AssetDetail - detail object - */ -public AssetDetail getAssetDetail() { return assetProperties; } - - -/** - * Returns all of the detail of
[26/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/OMRSArchiveHelper.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/OMRSArchiveHelper.java b/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/OMRSArchiveHelper.java deleted file mode 100644 index 7994b08..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/OMRSArchiveHelper.java +++ /dev/null @@ -1,619 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.archivemanager; - -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceStatus; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.*; - -import java.util.ArrayList; -import java.util.Date; - -/** - * OMRSArchiveHelper provides utility methods to help in the construction of open metadata archives. - */ -public class OMRSArchiveHelper -{ -private OMRSArchiveBuilderarchiveBuilder; -private StringarchiveGUID; -private StringoriginatorName; -private Date creationDate; -private long versionNumber; -private StringversionName; - - -/** - * Constructor receives information about the archive being built. - * - * @param archiveBuilder - archive builder with the archive contents in it. - * @param archiveGUID - unique identifier for the archive. - * @param originatorName - name of the person / process creating the archive. - * @param creationDate - date that the archive was first built. - * @param versionNumber - version number of the archive. - * @param versionName - version name for the archive. - */ -public OMRSArchiveHelper(OMRSArchiveBuilder archiveBuilder, - String archiveGUID, - String originatorName, - Date creationDate, - long versionNumber, - String versionName) -{ -this.archiveBuilder = archiveBuilder; -this.archiveGUID = archiveGUID; -this.originatorName = originatorName; -this.creationDate = creationDate; -this.versionNumber = versionNumber; -this.versionName = versionName; -} - - -/** - * Set up an individual primitive definition - * - * @param primitiveDefCategory - category of the primitive def defines the unique - * information about this primitive type. - * @return initialized PrimitiveDef object ready for the archive - */ -public PrimitiveDef getPrimitiveDef(PrimitiveDefCategory primitiveDefCategory) -{ -PrimitiveDef primitiveDef = new PrimitiveDef(primitiveDefCategory); - -primitiveDef.setGUID(primitiveDefCategory.getGUID()); -primitiveDef.setName(primitiveDefCategory.getName()); -primitiveDef.setVersion(versionNumber); -primitiveDef.setVersionName(versionName); - -return primitiveDef; -} - - -/** - * Create a CollectionDef for an Array. A new CollectionDef is required for each combination of primitive types - * used to initialize the collection. Each CollectionDef has its own unique identifier (guid) and - * its name is a combination of the collection type and the primitives use to initialize it. - * - * @param guid - unique identifier for the CollectionDef - * @param description - short default description of the enum type - * @param descriptionGUID - guid of the glossary term describing this collection type - * @param arrayType - type of the array. - * @return Filled out CollectionDef - */ -public CollectionDef getArrayCollectionDef(Stringguid, - String description, - String descriptionGUID, -
[35/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/AnnotationStatus.java -- diff --git a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/AnnotationStatus.java b/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/AnnotationStatus.java deleted file mode 100644 index 61b49b0..000 --- a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/AnnotationStatus.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omas.connectedasset.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * An AnnotationStatus defines the current status for an annotation plus some default descriptive text. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum AnnotationStatus implements Serializable -{ -NEW_ANNOTATION(0, "New", "Annotation has been created but not reviewed"), -REVIEWED_ANNOTATION(1, "Reviewed", "Annotation has been reviewed by no decision has been made"), -APPROVED_ANNOTATION(2, "Approved", "Annotation has been approved"), -ACTIONED_ANNOTATION(3, "Actioned", "Annotation has been approved and insight has been added to Asset's metadata"), -INVALID_ANNOTATION(4, "Invalid", "Annotation has been reviewed and declared invalid"), -IGNORE_ANNOTATION(5, "Ignore", "Annotation is invalid and should be ignored"), -OTHER_STATUS(98, "Other", "Annotation's status stored in additional properties"), -UNKNOWN_STATUS(99, "Unknown", "Annotation has not had a status assigned"); - -private static final long serialVersionUID = 1L; - -private intstatusCode = 99; -private String statusName = ""; -private String statusDescription = ""; - - -/** - * Typical Constructor - */ -AnnotationStatus(int statusCode, String statusName, String statusDescription) -{ -/* - * Save the values supplied - */ -this.statusCode = statusCode; -this.statusName = statusName; -this.statusDescription = statusDescription; -} - - -/** - * Return the status code for this enum instance - * - * @return int - status code - */ -public int getStatusCode() -{ -return statusCode; -} - - -/** - * Return the default name for the status for this enum instance. - * - * @return String - default status name - */ -public String getStatusName() -{ -return statusName; -} - - -/** - * REturn the default description for the status for this enum instance. - * - * @return String - default status description - */ -public String getStatusDescription() -{ -return statusDescription; -} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/AssetDescriptor.java -- diff --git a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/AssetDescriptor.java b/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/AssetDescriptor.java deleted file mode 100644 index 0927e3b..000 --- a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/AssetDescriptor.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license
[32/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/SchemaElement.java -- diff --git a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/SchemaElement.java b/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/SchemaElement.java deleted file mode 100644 index f85d55e..000 --- a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/SchemaElement.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.atlas.omas.connectedasset.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * - * The SchemaElement object provides a base class for the pieces that make up a schema for a data asset. - * A schema provides information about how the data is structured in the asset. Schemas are typically - * described as nested structures of linked schema elements. Schemas can also be reused in other schemas. - * - * SchemaElement is an abstract class - used to enable the most accurate and precise mapping of the - * elements in a schema to the asset. - * - * PrimitiveSchemaElement is for a leaf element in a schema. - * Schema is a complex structure of nested schema elements. - * MapSchemaElement is for an attribute of type Map - * - * Most assets will be linked to a Schema. - * - * Schema elements can be linked to one another using SchemaLink. - * - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public abstract class SchemaElement extends Referenceable -{ -private String versionNumber = null; -private String author = null; -private String usage = null; -private String encodingStandard = null; - - -/** - * Default constructor - */ -public SchemaElement() -{ -super(); -} - - -/** - * Copy/clone Constructor - the parentAsset is passed separately to the template because it is also - * likely to be being cloned in the same operation and we want the definitions clone to point to the - * asset clone and not the original asset. - * - * @param templateSchema - template object to copy. - */ -public SchemaElement(SchemaElement templateSchema) -{ -super(templateSchema); - -if (templateSchema != null) -{ -versionNumber = templateSchema.getVersionNumber(); -author = templateSchema.getAuthor(); -usage = templateSchema.getUsage(); -encodingStandard = templateSchema.getEncodingStandard(); -} -} - - -/** - * Return a clone of the this schema element. This method is needed because schema element - * is abstract. - * - * @return Either a Schema or a PrimitiveSchemaElement depending on the type of the template. - */ -public abstract SchemaElement cloneSchemaElement(); - - -/** - * Return the version number of the schema element - null means no version number. - * - * @return String version number - */ -public String getVersionNumber() { return versionNumber; } - - -/** - * Set up the version number of the schema element - null means no version number. - * - * @param versionNumber - String - */ -public void setVersionNumber(String versionNumber) { this.versionNumber = versionNumber; } - - -/** - * Return the name of the author of the schema element. Null means the author is unknown. - * - * @return String author name - */ -public String
[33/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/Lineage.java -- diff --git a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/Lineage.java b/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/Lineage.java deleted file mode 100644 index adf97ea..000 --- a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/Lineage.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.atlas.omas.connectedasset.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * Lineage shows the origin of the connected asset. It covers: - * - * Design lineage - the known data movement and data stores that can supply data to this asset. - * Operational lineage - showing the jobs that ran to create this asset - * - * - * Currently lineage is not implemented in the ConnectedAssetProperties interface because more design work is needed. - * This class is therefore a placeholder for lineage information. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class Lineage extends PropertyBase -{ -/** - * Default constructor. - */ -public Lineage() -{ -super(); -} - - -/** - * Copy/clone constructor - - the parentAsset is passed separately to the template because it is also - * likely to be being cloned in the same operation and we want the lineage clone to point to the - * asset clone and not the original asset. - * - * @param templateLineage - lineage object to copy. - */ -public Lineage(Lineage templateLineage) -{ -super(templateLineage); - -/* - * The open lineage design is still in progress so for the time being, this object does not do anything - * useful - */ -} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/Location.java -- diff --git a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/Location.java b/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/Location.java deleted file mode 100644 index 8f4556a..000 --- a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/Location.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omas.connectedasset.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static
[39/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/ffdc/README.md -- diff --git a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/ffdc/README.md b/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/ffdc/README.md deleted file mode 100644 index ae9feac..000 --- a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/ffdc/README.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# AssetConsumer OMAS FFDC - -Package org.apache.atlas.omas.assetconsumer.ffdc provides the -first failure data capture support for the AssetConsumer OMAS module. -This includes an error code enum, -a runtime exception, a base class for checked exceptions plus -implementation of each specific checked exception. - -The error code enum (AssetConsumerErrorCode) has an entry for each unique situation -where an exception is returned. Each entry defines: - -* A unique id for the error -* An HTTP error code for rest calls -* A unique message Id -* Message text with place holders for specific values -* A description of the cause of the error and system action as a result. -* A description of how to correct the error (if known) - -Each exception (whether a checked or runtime exception) has two constructors. - -* The first constructor is used when a new error has been detected. - -* The second constructor is used when another exception has been caught. -This caught exception is passed on the constructor so it is effectively -embedded in the AssetConsumer OMAS exception. - -Both constructors take the values from the AssetConsumerErrorCode -enum to define the cause and resolution. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/ffdc/exceptions/AmbiguousConnectionNameException.java -- diff --git a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/ffdc/exceptions/AmbiguousConnectionNameException.java b/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/ffdc/exceptions/AmbiguousConnectionNameException.java deleted file mode 100644 index 1215eda..000 --- a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/ffdc/exceptions/AmbiguousConnectionNameException.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omas.assetconsumer.ffdc.exceptions; - - -/** - * The AmbiguousConnectionNameException is thrown by the Asset Consumer OMAS when a connection name used (typically the - * displayName) to request a connector instance is not unique and so the Asset Consumer OMAS is not able to determine - * which connection to use. - */ -public class AmbiguousConnectionNameException extends AssetConsumerCheckedExceptionBase -{ -/** - * This is the typical constructor used for creating a AmbiguousConnectionNameException. - * - * @param httpCode - http response code to use if this exception flows over a rest call - * @param className - name of class reporting error - * @param actionDescription - description of function it was performing when error detected - * @param errorMessage - description of error - * @param systemAction - actions of the system as a result of the error - * @param userAction - instructions for correcting the error - */ -public AmbiguousConnectionNameException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) -{ -super(httpCode, className, actionDescription, errorMessage, systemAction, userAction); -} - - -/** - * This is the constructor used for creating a AmbiguousConnectionNameException that resulted from a previous error. - * - * @param httpCode - http response code to use if this exception flows over a rest call - * @param className - name of class reporting error - * @param actionDescription - description of function it was performing
[44/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/StarRating.java -- diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/StarRating.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/StarRating.java deleted file mode 100644 index 26017d4..000 --- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/StarRating.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.ocf.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.io.Serializable; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * A StarRating defines the rating that a user has placed against an asset. This ranges from not recommended - * through to five stars (excellent). - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public enum StarRating implements Serializable -{ -NOT_RECOMMENDED (0, "X", "Not recommended"), -ONE_STAR(1, "*", "Poor"), -TWO_STARS (2, "**", "Usable"), -THREE_STARS (3, "***", "Good"), -FOUR_STARS (4, "", "Very Good"), -FIVE_STARS (5, "*", "Excellent"); - -private static final long serialVersionUID = 1L; - -private intstarRatingCode; -private String starRatingSymbol; -private String starRatingDescription; - - -/** - * Typical Constructor - */ -StarRating(int starRatingCode, String starRatingSymbol, String starRatingDescription) -{ -/* - * Save the values supplied - */ -this.starRatingCode = starRatingCode; -this.starRatingSymbol = starRatingSymbol; -this.starRatingDescription = starRatingDescription; -} - - -/** - * Return the code for this enum instance - * - * @return int - star rating code - */ -public int getStarRatingCode() -{ -return starRatingCode; -} - - -/** - * Return the default symbol for this enum instance. - * - * @return String - default symbol - */ -public String getStarRatingSymbol() -{ -return starRatingSymbol; -} - - -/** - * Return the default description for the star rating for this enum instance. - * - * @return String - default description - */ -public String getStarRatingDescription() -{ -return starRatingDescription; -} - - -/** - * Standard toString method. - * - * @return print out of variables in a JSON-style - */ -@Override -public String toString() -{ -return "StarRating{" + -"starRatingCode=" + starRatingCode + -", starRatingSymbol='" + starRatingSymbol + '\'' + -", starRatingDescription='" + starRatingDescription + '\'' + -'}'; -} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/VirtualConnection.java -- diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/VirtualConnection.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/VirtualConnection.java deleted file mode 100644 index 5deb6eb..000 --- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/VirtualConnection.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache
[51/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
ATLAS-2722: moved unused code from branch-1.0 Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/b0ecc36a Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/b0ecc36a Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/b0ecc36a Branch: refs/heads/branch-1.0 Commit: b0ecc36ac9498f2e2f08d1b5e8c6b81ac76a5954 Parents: eb4c3d9 Author: Madhan Neethiraj <mad...@apache.org> Authored: Fri May 25 07:20:08 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Fri May 25 12:13:34 2018 -0700 -- om-fwk-ocf/README.md|85 - om-fwk-ocf/pom.xml |82 - .../java/org/apache/atlas/ocf/Connector.java| 130 - .../org/apache/atlas/ocf/ConnectorBase.java | 296 - .../org/apache/atlas/ocf/ConnectorBroker.java | 357 - .../org/apache/atlas/ocf/ConnectorProvider.java |49 - .../apache/atlas/ocf/ConnectorProviderBase.java | 323 - .../ocf/ffdc/ConnectionCheckedException.java|78 - .../ocf/ffdc/ConnectorCheckedException.java |76 - .../atlas/ocf/ffdc/OCFCheckedExceptionBase.java | 178 - .../org/apache/atlas/ocf/ffdc/OCFErrorCode.java | 270 - .../atlas/ocf/ffdc/OCFRuntimeException.java | 190 - .../atlas/ocf/ffdc/PropertyServerException.java |77 - .../java/org/apache/atlas/ocf/ffdc/README.md|46 - .../ocf/properties/AdditionalProperties.java| 156 - .../apache/atlas/ocf/properties/Annotation.java | 377 - .../atlas/ocf/properties/AnnotationStatus.java | 114 - .../atlas/ocf/properties/Annotations.java | 128 - .../atlas/ocf/properties/AssetDescriptor.java | 166 - .../atlas/ocf/properties/AssetDetail.java | 332 - .../atlas/ocf/properties/AssetPropertyBase.java | 139 - .../properties/AssetPropertyIteratorBase.java | 107 - .../atlas/ocf/properties/AssetSummary.java | 253 - .../atlas/ocf/properties/AssetUniverse.java | 338 - .../atlas/ocf/properties/Certification.java | 303 - .../atlas/ocf/properties/Certifications.java| 128 - .../atlas/ocf/properties/Classification.java| 175 - .../atlas/ocf/properties/Classifications.java | 128 - .../apache/atlas/ocf/properties/Comment.java| 177 - .../atlas/ocf/properties/CommentType.java | 112 - .../apache/atlas/ocf/properties/Comments.java | 127 - .../properties/ConnectedAssetProperties.java| 137 - .../apache/atlas/ocf/properties/Connection.java | 365 - .../atlas/ocf/properties/Connections.java | 127 - .../atlas/ocf/properties/ConnectorType.java | 221 - .../ocf/properties/DerivedSchemaElement.java| 169 - .../atlas/ocf/properties/ElementHeader.java | 161 - .../atlas/ocf/properties/ElementOrigin.java | 144 - .../atlas/ocf/properties/ElementType.java | 187 - .../ocf/properties/EmbeddedConnection.java | 131 - .../ocf/properties/EmbeddedConnections.java | 127 - .../apache/atlas/ocf/properties/Endpoint.java | 296 - .../ocf/properties/ExternalIdentifier.java | 215 - .../ocf/properties/ExternalIdentifiers.java | 127 - .../atlas/ocf/properties/ExternalReference.java | 193 - .../ocf/properties/ExternalReferences.java | 127 - .../apache/atlas/ocf/properties/Feedback.java | 192 - .../atlas/ocf/properties/InformalTag.java | 196 - .../atlas/ocf/properties/InformalTags.java | 127 - .../apache/atlas/ocf/properties/KeyPattern.java | 114 - .../apache/atlas/ocf/properties/License.java| 299 - .../apache/atlas/ocf/properties/Licenses.java | 127 - .../org/apache/atlas/ocf/properties/Like.java | 102 - .../org/apache/atlas/ocf/properties/Likes.java | 127 - .../apache/atlas/ocf/properties/Lineage.java|77 - .../apache/atlas/ocf/properties/Location.java | 124 - .../apache/atlas/ocf/properties/Locations.java | 127 - .../atlas/ocf/properties/MapSchemaElement.java | 170 - .../apache/atlas/ocf/properties/Meaning.java| 123 - .../apache/atlas/ocf/properties/Meanings.java | 127 - .../org/apache/atlas/ocf/properties/Note.java | 155 - .../apache/atlas/ocf/properties/NoteLog.java| 161 - .../apache/atlas/ocf/properties/NoteLogs.java | 127 - .../org/apache/atlas/ocf/properties/Notes.java | 127 - .../atlas/ocf/properties/PagingIterator.java| 337 - .../ocf/properties/PrimitiveSchemaElement.java | 150 - .../atlas/ocf/properties/PropertyBase.java | 113 - .../org/apache/atlas/ocf/properties/Rating.java | 142 - .../apache/atlas/ocf/properties/Ratings.java| 128 - .../atlas/ocf/properties/Referenceable.java | 176 - .../atlas/ocf/properties/RelatedAsset.java | 167 - .../ocf/properties/RelatedAssetProperties.java | 143 - .../atlas/ocf/properties/RelatedAssets.java | 127 - .../oc
[09/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSMetadataCollection.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSMetadataCollection.java b/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSMetadataCollection.java deleted file mode 100644 index 5fe86a0..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSMetadataCollection.java +++ /dev/null @@ -1,4678 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.localrepository.repositoryconnector; - -import org.apache.atlas.omrs.eventmanagement.OMRSRepositoryEventProcessor; -import org.apache.atlas.omrs.ffdc.*; -import org.apache.atlas.omrs.ffdc.exception.*; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryHelper; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryValidator; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSTypeDefManager; -import org.apache.atlas.omrs.metadatacollection.OMRSMetadataCollection; -import org.apache.atlas.omrs.metadatacollection.properties.MatchCriteria; -import org.apache.atlas.omrs.metadatacollection.properties.SequencingOrder; -import org.apache.atlas.omrs.metadatacollection.properties.instances.*; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.*; - -import java.util.List; -import java.util.Date; - -/** - * LocalOMRSMetadataCollection provides a wrapper around the metadata collection for the real local repository. - * Its role is to manage outbound repository events and audit logging/debug for the real local repository. - */ -public class LocalOMRSMetadataCollection extends OMRSMetadataCollection -{ -private OMRSMetadataCollection realMetadataCollection; -private String localServerName; -private String localServerType; -private String localOrganizationName; -private OMRSRepositoryEventProcessor outboundRepositoryEventProcessor; -private OMRSTypeDefManager localTypeDefManager; - - - -/** - * Constructor used by LocalOMRSRepositoryConnector - * - * @param parentConnector - connector that this metadata collection supports. The connector has the information - *to call the metadata repository. - * @param repositoryName - name of the repository - used for logging. - * @param repositoryHelper - class used to build type definitions and instances. - * @param repositoryValidator - class used to validate type definitions and instances. - * @param metadataCollectionId - unique Identifier of the metadata collection Id. - * @param localServerName - name of the local server. - * @param localServerType - type of the local server. - * @param localOrganizationName - name of the organization that owns the local server. - * @param realMetadataCollection - metadata collection of the real local connector. - * @param outboundRepositoryEventProcessor - outbound event processor - * (may be null if a repository event mapper is deployed). - * @param typeDefManager - manager of in-memory cache of type definitions (TypeDefs). - */ - LocalOMRSMetadataCollection(LocalOMRSRepositoryConnector parentConnector, - String repositoryName, - OMRSRepositoryHelper repositoryHelper, - OMRSRepositoryValidator repositoryValidator, - String metadataCollectionId, - String localServerName, - String localServerType, - String localOrganizationName, -
[24/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/properties/OpenMetadataArchive.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/properties/OpenMetadataArchive.java b/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/properties/OpenMetadataArchive.java deleted file mode 100644 index 35e3a85..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/properties/OpenMetadataArchive.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.archivemanager.properties; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * OpenMetadataArchive defines the structure of the properties inside of an open metadata archive. - * There are 3 sections: - * - * - * ArchiveProperties - provides details of the source and contents of the archive. - * - * - * TypeStore - a list of new TypeDefs and patches to existing TypeDefs. - * - * - * InstanceStore - a list of new metadata instances (Entities and Relationships). - * - * - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class OpenMetadataArchive -{ -private OpenMetadataArchivePropertiesarchiveProperties= null; -private OpenMetadataArchiveTypeStore archiveTypeStore = null; -private OpenMetadataArchiveInstanceStore archiveInstanceStore = null; - - -/** - * Default constructor relies on the initialization of variables in their type declaration. - */ -public OpenMetadataArchive() -{ -} - - -/** - * Return details of the archive. - * - * @return OpenMetadataArchiveProperties object - */ -public OpenMetadataArchiveProperties getArchiveProperties() -{ -return archiveProperties; -} - - -/** - * Set the archive properties for a new archive. - * - * @param archiveProperties - the descriptive properties of the archive - */ -public void setArchiveProperties(OpenMetadataArchiveProperties archiveProperties) -{ -this.archiveProperties = archiveProperties; -} - - -/** - * Return the TypeStore for this archive. The TypeStore contains TypeDefs and TypeDef patches. - * - * @return OpenMetadataArchiveTypeStore object - */ -public OpenMetadataArchiveTypeStore getArchiveTypeStore() -{ -return archiveTypeStore; -} - - -/** - * Set up the TypeStore for this archive. The TypeStore contains TypeDefs and TypeDef patches. - * - * @param archiveTypeStore - OpenMetadataArchiveTypeStore object - */ -public void setArchiveTypeStore(OpenMetadataArchiveTypeStore archiveTypeStore) -{ -this.archiveTypeStore = archiveTypeStore; -} - - -/** - * Return the InstanceStore for this archive. The InstanceStore contains entity and relationship metadata - * instances. - * - * @return OpenMetadataArchiveInstanceStore object - */ -public OpenMetadataArchiveInstanceStore getArchiveInstanceStore() -{ -return archiveInstanceStore; -} - - -/** - * Set up the InstanceStore for this archive. The InstanceStore contains entity and relationship metadata - * instances. - * - * @param archiveInstanceStore - OpenMetadataArchiveInstanceStore object - */ -public void setArchiveInstanceStore(OpenMetadataArchiveInstanceStore archiveInstanceStore) -{ -this.archiveInstanceStore = archiveInstanceStore; -} -}
[10/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSInstanceEventProcessor.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSInstanceEventProcessor.java b/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSInstanceEventProcessor.java deleted file mode 100644 index e7cc6f7..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/localrepository/repositoryconnector/LocalOMRSInstanceEventProcessor.java +++ /dev/null @@ -1,1500 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.localrepository.repositoryconnector; - -import org.apache.atlas.ocf.properties.Connection; -import org.apache.atlas.omrs.auditlog.OMRSAuditCode; -import org.apache.atlas.omrs.auditlog.OMRSAuditLog; -import org.apache.atlas.omrs.auditlog.OMRSAuditingComponent; -import org.apache.atlas.omrs.eventmanagement.*; -import org.apache.atlas.omrs.eventmanagement.events.OMRSInstanceEventProcessor; -import org.apache.atlas.omrs.ffdc.OMRSErrorCode; -import org.apache.atlas.omrs.ffdc.exception.*; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryHelper; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryValidator; -import org.apache.atlas.omrs.metadatacollection.OMRSMetadataCollection; -import org.apache.atlas.omrs.metadatacollection.properties.instances.EntityDetail; -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceProvenanceType; -import org.apache.atlas.omrs.metadatacollection.properties.instances.InstanceType; -import org.apache.atlas.omrs.metadatacollection.properties.instances.Relationship; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.TypeDefSummary; -import org.apache.atlas.omrs.metadatacollection.repositoryconnector.OMRSRepositoryConnector; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; - - -/** - * LocalOMRSInstanceEventProcessor processes incoming metadata instance events that describe changes to the - * entities and relationships in other repositories in the connected cohorts. - * It uses the save exchange rule to decide which events to process and which to ignore. - * Events that are to be processed are converted into reference copies of their respective entities and - * relationships and stored in the local repository. - */ -public class LocalOMRSInstanceEventProcessor implements OMRSInstanceEventProcessor, OMRSInstanceRetrievalEventProcessor -{ -private String localMetadataCollectionId; -private String localServerName; -private OMRSRepositoryConnector realLocalConnector; -private OMRSRepositoryHelperrepositoryHelper; -private OMRSRepositoryValidator repositoryValidator; -private OMRSRepositoryEventExchangeRule saveExchangeRule; -private String realRepositoryName = "Local Repository"; -private OMRSMetadataCollection realMetadataCollection = null; -private OMRSRepositoryEventProcessoroutboundRepositoryEventProcessor = null; - - - -/* - * The audit log provides a verifiable record of the open metadata archives that have been loaded into - * the open metadata repository. The Logger is for standard debug. - */ -private static final OMRSAuditLog auditLog = new OMRSAuditLog(OMRSAuditingComponent.INSTANCE_EVENT_PROCESSOR); -private static final Logger log = LoggerFactory.getLogger(LocalOMRSInstanceEventProcessor.class); - - -/** - * Constructor saves all of the information necessary to process incoming instance events. It is intolerant - * of nulls in any of its parameters and will throw a logic error exception is it finds any. - * - * @param localMetadataCollectionId - local metadata collection identifier - * @param localServerName - name of the local server - for logging -
[25/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/opentypes/OpenMetadataTypesArchive.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/opentypes/OpenMetadataTypesArchive.java b/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/opentypes/OpenMetadataTypesArchive.java deleted file mode 100644 index 3fe4d34..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/archivemanager/opentypes/OpenMetadataTypesArchive.java +++ /dev/null @@ -1,17114 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.atlas.omrs.archivemanager.opentypes; - - -import org.apache.atlas.omrs.archivemanager.OMRSArchiveBuilder; -import org.apache.atlas.omrs.archivemanager.OMRSArchiveHelper; -import org.apache.atlas.omrs.archivemanager.properties.OpenMetadataArchive; -import org.apache.atlas.omrs.archivemanager.properties.OpenMetadataArchiveType; -import org.apache.atlas.omrs.ffdc.OMRSErrorCode; -import org.apache.atlas.omrs.ffdc.exception.OMRSLogicErrorException; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.*; - -import java.util.ArrayList; -import java.util.Date; - -/** - * OpenMetadataTypesArchive builds an open metadata archive containing all of the standard open metadata types. - * These types have hardcoded dates and guids so that however many times this archive is rebuilt, it will - * produce the same content. - * - * Details of the open metadata types are documented on the wiki: - * https://cwiki.apache.org/confluence/display/ATLAS/Building+out+the+Open+Metadata+Typesystem;>Building out the Open Metadata Typesystem - * - * - * There are 8 areas, each covering a different topic area of metadata. The module breaks down the process of creating - * the models into the areas and then the individual models to simplify the maintenance of this class - * - */ -public class OpenMetadataTypesArchive -{ -/* - * This is the header information for the archive. - */ -private static final String archiveGUID= "bce3b0a0-662a-4f87-b8dc-844078a11a6e"; -private static final String archiveName= "Open Metadata Types"; -private static final String archiveDescription = "Standard types for open metadata repositories."; -private static final OpenMetadataArchiveType archiveType= OpenMetadataArchiveType.CONTENT_PACK; -private static final String originatorName = "Apache Atlas (OMRS)"; -private static final DatecreationDate = new Date(1516313040008L); - -/* - * Specific values for initializing TypeDefs - */ -private static final long versionNumber = 1L; -private static final String versionName = "1.0"; - - -private OMRSArchiveBuilder archiveBuilder; -private OMRSArchiveHelper archiveHelper; - - -/** - * Default constructor sets up the archive builder. This in turn sets up the header for the archive. - */ -public OpenMetadataTypesArchive() -{ -this.archiveBuilder = new OMRSArchiveBuilder(archiveGUID, - archiveName, - archiveDescription, - archiveType, - originatorName, - creationDate, - null); - -this.archiveHelper = new OMRSArchiveHelper(archiveBuilder, - archiveGUID, - originatorName, - creationDate, - versionNumber, - versionName); -} - - -/** - * Return the unique identifier for this archive. - * - * @return String guid - */ -public String getArchiveGUID() -{ -
[37/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/server/ErrorHandler.java -- diff --git a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/server/ErrorHandler.java b/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/server/ErrorHandler.java deleted file mode 100644 index cfde2cc..000 --- a/omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/server/ErrorHandler.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omas.assetconsumer.server; - -import org.apache.atlas.omas.assetconsumer.ffdc.AssetConsumerErrorCode; -import org.apache.atlas.omas.assetconsumer.ffdc.exceptions.InvalidParameterException; -import org.apache.atlas.omas.assetconsumer.ffdc.exceptions.PropertyServerException; -import org.apache.atlas.omas.assetconsumer.ffdc.exceptions.UserNotAuthorizedException; -import org.apache.atlas.omrs.metadatacollection.OMRSMetadataCollection; -import org.apache.atlas.omrs.metadatacollection.repositoryconnector.OMRSRepositoryConnector; - -/** - * ErrorHandler provides common validation routines for the other handler classes - */ -public class ErrorHandler -{ -private OMRSRepositoryConnector repositoryConnector; - - -/** - * Typical constructor providing access to the repository connector for this access service. - * - * @param repositoryConnector - connector object - */ -public ErrorHandler(OMRSRepositoryConnector repositoryConnector) -{ -this.repositoryConnector = repositoryConnector; -} - - -/** - * Throw an exception if the supplied userId is null - * - * @param userId - user name to validate - * @param methodName - name of the method making the call. - * @throws InvalidParameterException - the userId is null - */ -public void validateUserId(String userId, -String methodName) throws InvalidParameterException -{ -if (userId == null) -{ -AssetConsumerErrorCode errorCode = AssetConsumerErrorCode.NULL_USER_ID; -String errorMessage = errorCode.getErrorMessageId() -+ errorCode.getFormattedErrorMessage(methodName); - -throw new InvalidParameterException(errorCode.getHTTPErrorCode(), -this.getClass().getName(), -methodName, -errorMessage, -errorCode.getSystemAction(), -errorCode.getUserAction()); -} -} - - -/** - * Throw an exception if the supplied unique identifier is null - * - * @param guid - unique identifier to validate - * @param parameterName - name of the parameter that passed the guid. - * @param methodName - name of the method making the call. - * @throws InvalidParameterException - the guid is null - */ -public void validateGUID(String guid, - String parameterName, - String methodName) throws InvalidParameterException -{ -if (guid == null) -{ -AssetConsumerErrorCode errorCode= AssetConsumerErrorCode.NULL_GUID; -String errorMessage = errorCode.getErrorMessageId() -+ errorCode.getFormattedErrorMessage(parameterName, methodName); - -throw new InvalidParameterException(errorCode.getHTTPErrorCode(), -this.getClass().getName(), -methodName, -errorMessage, -errorCode.getSystemAction(), -errorCode.getUserAction()); -} -} - - -/** -
[30/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omrs/src/main/java/org/apache/atlas/omrs/adapters/inmemory/repositoryconnector/InMemoryOMRSMetadataCollection.java -- diff --git a/omrs/src/main/java/org/apache/atlas/omrs/adapters/inmemory/repositoryconnector/InMemoryOMRSMetadataCollection.java b/omrs/src/main/java/org/apache/atlas/omrs/adapters/inmemory/repositoryconnector/InMemoryOMRSMetadataCollection.java deleted file mode 100644 index 0ab1a4e..000 --- a/omrs/src/main/java/org/apache/atlas/omrs/adapters/inmemory/repositoryconnector/InMemoryOMRSMetadataCollection.java +++ /dev/null @@ -1,4913 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omrs.adapters.inmemory.repositoryconnector; - -import org.apache.atlas.omrs.ffdc.OMRSErrorCode; -import org.apache.atlas.omrs.ffdc.exception.*; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryHelper; -import org.apache.atlas.omrs.localrepository.repositorycontentmanager.OMRSRepositoryValidator; -import org.apache.atlas.omrs.metadatacollection.OMRSMetadataCollection; -import org.apache.atlas.omrs.metadatacollection.properties.MatchCriteria; -import org.apache.atlas.omrs.metadatacollection.properties.SequencingOrder; -import org.apache.atlas.omrs.metadatacollection.properties.instances.*; -import org.apache.atlas.omrs.metadatacollection.properties.typedefs.*; - -import java.util.*; - -/** - * The InMemoryOMRSMetadataCollection represents a metadata repository that supports an in-memory repository. - * Requests to this metadata collection work with the hashmaps used to manage metadata types and instances. - */ -public class InMemoryOMRSMetadataCollection extends OMRSMetadataCollection -{ -private InMemoryOMRSMetadataStore repositoryStore = new InMemoryOMRSMetadataStore(); - - -/** - * Constructor ensures the metadata collection is linked to its connector and knows its metadata collection Id. - * - * @param parentConnector - connector that this metadata collection supports. The connector has the information - *to call the metadata repository. - * @param repositoryName - name of the repository - used for logging. - * @param repositoryHelper - class used to build type definitions and instances. - * @param repositoryValidator - class used to validate type definitions and instances. - * @param metadataCollectionId - unique Identifier of the metadata collection Id. - */ -public InMemoryOMRSMetadataCollection(InMemoryOMRSRepositoryConnector parentConnector, - String repositoryName, - OMRSRepositoryHelper repositoryHelper, - OMRSRepositoryValidator repositoryValidator, - String metadataCollectionId) -{ -/* - * The metadata collection Id is the unique identifier for the metadata collection. It is managed by the super class. - */ -super(parentConnector, repositoryName, metadataCollectionId, repositoryHelper, repositoryValidator); - -/* - * Set up the repository name in the repository store - */ -this.repositoryStore.setRepositoryName(repositoryName); -} - - -/* == - * Group 1: Confirm the identity of the metadata repository being called. - */ - -/** - * Returns the identifier of the metadata repository. This is the identifier used to register the - * metadata repository with the metadata repository cohort. It is also the identifier used to - * identify the home repository of a metadata instance. - * - * @return String - metadata collection id. - * @throws RepositoryErrorException - there is a problem communicating with the metadata repository. - */ -public String getMetadataCollectionId() throws RepositoryErrorException -{ -final String
[34/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/ConnectorType.java -- diff --git a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/ConnectorType.java b/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/ConnectorType.java deleted file mode 100644 index 3c0e8c2..000 --- a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/properties/ConnectorType.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.omas.connectedasset.properties; - - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; -import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY; - -/** - * The ConnectorType describe the implementation details of a particular type of OCF connector. - * The properties for a connector type are defined in model 0201. - * They include: - * - * - * - * guid - Globally unique identifier for the connector type. - * - * - * url - External link address for the connector type properties in the metadata repository. This URL can be - * stored as a property in another entity to create an explicit link to this connector type. - * - * - * qualifiedName - The official (unique) name for the connector type. This is often defined by the IT - * systems management organization and should be used (when available) on audit logs and error messages. - * - * - * displayName - A consumable name for the connector type. Often a shortened form of the qualifiedName for use - * on user interfaces and messages. The displayName should be only be used for audit logs and error messages - * if the qualifiedName is not set. - * - * - * description - A full description of the connector type covering details of the assets it connects to - * along with usage and versioning information. - * - * - * connectorProviderClassName - The connector provider is the factory for a particular type of connector. - * This property defines the class name for the connector provider that the Connector Broker should use to request - * new connector instances. - * - * - * additionalProperties - Any additional properties that the connector provider needs to know in order to - * create connector instances. - * - * - * - * The connectorTypeProperties class is simply used to cache the properties for an connector type. - * It is used by other classes to exchange this information between a metadata repository and a consumer. - */ -@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown=true) -public class ConnectorType extends Referenceable -{ -/* - * Attributes of a connector type - */ -private String displayName = null; -private String description = null; -private String connectorProviderClassName = null; - -/** - * Default Constructor - this is used when Connector Type is used inside a connection object which is itself - * not yet connected to an asset. In this case the ParentAsset is null. - */ -public ConnectorType() -{ -super(); -} - - -/** - * Copy/clone constructor for a connectorType that is connected to an asset (either directly or indirectly). - * - * @param templateConnectorType - template object to copy. - */ -public ConnectorType(ConnectorType templateConnectorType) -{ -super(templateConnectorType); - -/* - * All properties are initialised as null so only change their default
[36/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/ConnectedAssetInterface.java -- diff --git a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/ConnectedAssetInterface.java b/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/ConnectedAssetInterface.java deleted file mode 100644 index a87740c..000 --- a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/ConnectedAssetInterface.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.atlas.omas.connectedasset; - -import org.apache.atlas.omas.connectedasset.ffdc.exceptions.InvalidParameterException; -import org.apache.atlas.omas.connectedasset.ffdc.exceptions.PropertyServerException; -import org.apache.atlas.omas.connectedasset.ffdc.exceptions.UnrecognizedConnectionGUIDException; -import org.apache.atlas.omas.connectedasset.ffdc.exceptions.UserNotAuthorizedException; -import org.apache.atlas.omas.connectedasset.properties.AssetUniverse; - -/** - * ConnectedAssetInterface is the OMAS client interface of the Connected Asset OMAS. - * - */ -public interface ConnectedAssetInterface -{ -/** - * Returns a comprehensive collection of properties about the requested asset. - * - * @param userId - String - userId of user making request. - * @param assetGUID - String - unique id for asset. - * - * @return AssetUniverse - a comprehensive collection of properties about the asset. - - * @throws InvalidParameterException - one of the parameters is null or invalid. - * @throws PropertyServerException - There is a problem retrieving the asset properties from - * the property server. - * @throws UserNotAuthorizedException - the requesting user is not authorized to issue this request. - */ -AssetUniverse getAssetProperties(String userId, - String assetGUID) throws InvalidParameterException, - PropertyServerException, - UserNotAuthorizedException; - - -/** - * Returns a comprehensive collection of properties about the asset linked to the supplied connection. - * - * @param userId - identifier for calling user - * @param connectionGUID - uniqueId for the connection. - * @return AssetUniverse - a comprehensive collection of properties about the connected asset. - * @throws InvalidParameterException - one of the parameters is null or invalid. - * @throws PropertyServerException - There is a problem retrieving the connected asset properties from - * the property server. - * @throws UnrecognizedConnectionGUIDException - the supplied GUID is not recognized by the property server. - */ -AssetUniverse getAssetPropertiesByConnection(String userId, - String connectionGUID) throws InvalidParameterException, - UnrecognizedConnectionGUIDException, - PropertyServerException; -} http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/admin/ConnectedAssetAdmin.java -- diff --git a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/admin/ConnectedAssetAdmin.java b/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/admin/ConnectedAssetAdmin.java deleted file mode 100644 index 4d467a6..000 --- a/omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/admin/ConnectedAssetAdmin.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license
[47/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifier.java -- diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifier.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifier.java deleted file mode 100644 index 90b7e23..000 --- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifier.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.atlas.ocf.properties; - -/** - * ExternalIdentifier stores information about an identifier for the asset that is used in an external system. - * This is used for correlating information about the asset across different systems. - */ -public class ExternalIdentifier extends Referenceable -{ -/* - * Attributes of an external identifier - */ -private Stringidentifier = null; -private Stringdescription = null; -private Stringusage = null; -private Stringsource = null; -private KeyPatternkeyPattern = null; -private Referenceable scope = null; -private StringscopeDescription = null; - - -/** - * Typical Constructor - * - * @param parentAsset - descriptor for parent asset - * @param type - details of the metadata type for this properties object - * @param guid - String - unique id - * @param url - String - URL - * @param classifications - enumeration of classifications - * @param qualifiedName - unique name - * @param additionalProperties - additional properties for the referenceable object. - * @param meanings - list of glossary terms (summary) - * @param identifier - the external identifier for the asset. - * @param description - the description of the external identifier. - * @param usage - usage guidance for this external identifier. - * @param source - source description for this external identifier. - * @param keyPattern enum - name of the key pattern used for this external identifier. - * @param scope - Referenceable scope of this external identifier. This depends on the key pattern. - * It may be a server definition, a reference data set or glossary term. - * @param scopeDescription - description of the scope for this external identifier. - */ -public ExternalIdentifier(AssetDescriptor parentAsset, - ElementType type, - String guid, - String url, - Classifications classifications, - String qualifiedName, - AdditionalProperties additionalProperties, - Meanings meanings, - String identifier, - String description, - String usage, - String source, - KeyPattern keyPattern, - Referenceablescope, - String scopeDescription) -{ -super(parentAsset, type, guid, url, classifications, qualifiedName, additionalProperties, meanings); - -this.identifier = identifier; -this.description = description; -this.usage = usage; -this.source = source; -this.keyPattern = keyPattern; -this.scope = scope; -this.scopeDescription = scopeDescription; -} - -/** - * Copy/clone constructor. - * - * @param parentAsset - descriptor for parent asset - * @param templateExternalIdentifier - element to copy - */ -public ExternalIdentifier(AssetDescriptor parentAsset, ExternalIdentifier templateExternalIdentifier) -{ -/* - * Initialize the super class. - */ -
[48/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectedAssetProperties.java -- diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectedAssetProperties.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectedAssetProperties.java deleted file mode 100644 index b9c8db1..000 --- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectedAssetProperties.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.ocf.properties; - -import org.apache.atlas.ocf.ffdc.PropertyServerException; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * ConnectedAssetProperties is associated with a Connector. Connectors provide access to - * assets. ConnectedAssetProperties returns properties (metadata) about the connector's asset. - * - * It is a generic interface for all types of open metadata assets. However, it assumes the asset's metadata model - * inherits from Asset (see model 0010 in Area 0). - * - * The ConnectedAssetProperties returns metadata about the asset at three levels of detail: - * - * assetSummary - used for displaying details of the asset in summary lists or hover text - * assetDetail - used to display all of the information known about the asset with summaries - * of the relationships to other metadata entities - * assetUniverse - used to define the broader context for the asset - * - * - * ConnectedAssetProperties is a base class for the connector's metadata API that returns null, - * for the asset's properties. Metadata repository implementations extend this class to add their - * implementation of the refresh() method that calls to the metadata repository to populate the metadata properties. - */ -public abstract class ConnectedAssetProperties extends PropertyBase -{ -/* - * AssetUniverse extends AssetDetails which extends AssetSummary. The interaction with the metadata repository - * pulls the asset universe in one single network interaction and the caller can then explore the metadata - * property by property without incurring many network interactions (unless there are too many instances - * of a particular type of property and one of the iterators is forced to use paging). - * - * If null is returned, the connector is not linked to a metadata repository. - */ -protected AssetUniverse assetProperties = null; - -private static final Logger log = LoggerFactory.getLogger(ConnectedAssetProperties.class); - -/** - * Typical constructor. - */ -public ConnectedAssetProperties() -{ -/* - * Nothing to do except initialize superclass. - */ -super(); -} - - -/** - * Copy/clone constructor. - * - * @param templateProperties - template to copy. - */ -public ConnectedAssetProperties(ConnectedAssetProperties templateProperties) -{ -super(templateProperties); - -if (templateProperties != null) -{ -AssetUniverse templateAssetUniverse = templateProperties.getAssetUniverse(); -if (templateAssetUniverse != null) -{ -assetProperties = new AssetUniverse(templateAssetUniverse); -} -} -} - - -/** - * Returns the summary information organized in the assetSummary structure. - * - * @return AssetSummary - summary object - */ -public AssetSummary getAssetSummary() { return assetProperties; } - - - -/** - * Returns detailed information about the asset organized in the assetDetail structure. - * - * @return AssetDetail - detail object - */ -public AssetDetail getAssetDetail() { return assetProperties; } - - -/** - * Returns all of the detail of the asset and information connected to it in organized in the assetUniverse - * structure. - * - * @return AssetUniverse - universe object - */ -public AssetUniverse getAssetUniverse() { return assetProperties; } - - -
[50/51] [partial] atlas git commit: ATLAS-2722: moved unused code from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/ConnectionCheckedException.java -- diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/ConnectionCheckedException.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/ConnectionCheckedException.java deleted file mode 100644 index ef28352..000 --- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/ConnectionCheckedException.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.ocf.ffdc; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * ConnectionCheckedException provides a checked exception for reporting errors found in connection objects. - * Typically these errors are configuration errors that can be fixed by an administrator or power user. - * The connection object has a complex structure and the aim of this exception, in conjunction with - * OCFErrorCode, is to identify exactly what is wrong with the contents of the connection object - * and the consequences of this error. - */ -public class ConnectionCheckedException extends OCFCheckedExceptionBase -{ -private static final Logger log = LoggerFactory.getLogger(ConnectionCheckedException.class); - -/** - * This is the typical constructor for creating a ConnectionCheckedException. It captures the essential details - * about the error, where it occurred and how to fix it. - * - * @param httpCode code to use across a REST interface - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param errorMessage description of error - * @param systemAction actions of the system as a result of the error - * @param userAction instructions for correcting the error - */ -public ConnectionCheckedException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) -{ -super(httpCode, className, actionDescription, errorMessage, systemAction, userAction); - -if (log.isDebugEnabled()) -{ -log.debug(httpCode + ", " + className + ", " + actionDescription); -} -} - - -/** - * This constructor is used when an unexpected exception has been caught that needs to be wrapped in a - * ConnectionCheckedException in order to add the essential details about the error, where it occurred and - * how to fix it. - * - * @param httpCode code to use across a REST interface - * @param className name of class reporting error - * @param actionDescription description of function it was performing when error detected - * @param errorMessage description of error - * @param systemAction actions of the system as a result of the error - * @param userAction instructions for correcting the error - * @param caughtError the exception/error that caused this exception to be raised - */ -public ConnectionCheckedException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) -{ -super(httpCode, className, actionDescription, errorMessage, systemAction, userAction, caughtError); - -if (log.isDebugEnabled()) -{ -log.debug(httpCode + ", " + className + ", " + actionDescription + ", " + caughtError.toString()); -} -} -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/ConnectorCheckedException.java -- diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/ConnectorCheckedException.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/ConnectorCheckedException.java deleted file mode 100644 index d45e944..000 --- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/ffdc/ConnectorCheckedException.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - *
[1/2] atlas git commit: ATLAS-2717: updated migration-import to handle legacy types that reference classification
Repository: atlas Updated Branches: refs/heads/branch-1.0 d6797f611 -> 64fa8576b http://git-wip-us.apache.org/repos/asf/atlas/blob/64fa8576/repository/src/test/resources/legacy-typesdef.json -- diff --git a/repository/src/test/resources/legacy-typesdef.json b/repository/src/test/resources/legacy-typesdef.json new file mode 100644 index 000..5f169d3 --- /dev/null +++ b/repository/src/test/resources/legacy-typesdef.json @@ -0,0 +1,150 @@ +{ + "enumDefs": [ + ], + "structDefs": [ +{ + "category": "STRUCT", + "guid": "42d9a0d1-8aba-406a-9437-9c2155d8fe02", + "createdBy": "root", + "updatedBy": "root", + "createTime": 1522693757121, + "updateTime": 1522693757121, + "version": 1, + "name": "order", + "description": "order", + "typeVersion": "1.0", + "attributeDefs": [ +{ + "name": "order", + "typeName": "int", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +} + ] +} + ], + "classificationDefs": [ +{ + "category": "CLASSIFICATION", + "guid": "c21bfb98-fdbd-4ae6-9dd8-0818079da4be", + "createdBy": "admin", + "updatedBy": "admin", + "createTime": 1526902192324, + "updateTime": 1526902192324, + "version": 1, + "name": "traitprayivofx4", + "description": "traitprayivofx4", + "typeVersion": "1.0", + "attributeDefs": [], + "superTypes": [], + "subTypes": [] +}, +{ + "category": "CLASSIFICATION", + "guid": "c21bfb98-fdbd-4ae6-9dd8-0818079da444", + "createdBy": "admin", + "updatedBy": "admin", + "createTime": 1526902192324, + "updateTime": 1526902192324, + "version": 1, + "name": "PII", + "description": "PII", + "typeVersion": "1.0", + "attributeDefs": [], + "superTypes": [], + "subTypes": [] +}, +{ + "category": "CLASSIFICATION", + "guid": "c21bfb98-fdbd-4ae6-9dd8-0818079da555", + "createdBy": "admin", + "updatedBy": "admin", + "createTime": 1526902192324, + "updateTime": 1526902192324, + "version": 1, + "name": "VENDOR_PII", + "description": "VENDOR_PII", + "typeVersion": "1.0", + "attributeDefs": [], + "superTypes": [], + "subTypes": [] +}, +{ + "category": "CLASSIFICATION", + "guid": "c21bfb98-fdbd-4ae6-9dd8-0818079da666", + "createdBy": "admin", + "updatedBy": "admin", + "createTime": 1526902192324, + "updateTime": 1526902192324, + "version": 1, + "name": "FINANCE", + "description": "FINANCE", + "typeVersion": "1.0", + "attributeDefs": [], + "superTypes": [], + "subTypes": [] +} + ], + "entityDefs": [ +{ + "category": "ENTITY", + "guid": "2f9b17b6-8a7d-495f-9778-8676912cb621", + "createdBy": "admin", + "updatedBy": "admin", + "createTime": 1526902193007, + "updateTime": 1526902193007, + "version": 1, + "name": "createComplexTraitTypeTestprayivofx4", + "description": "createComplexTraitTypeTestprayivofx4", + "typeVersion": "1.0", + "attributeDefs": [ +{ + "name": "complexTrait", + "typeName": "traitprayivofx4", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +}, +{ + "name": "vendors", + "typeName": "array", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +}, +{ + "name": "finance_assets", + "typeName": "map", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +}, +{ + "name": "description", + "typeName": "string", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +} + ], + "superTypes": [], + "subTypes": [] +} + ] +}
[1/2] atlas git commit: ATLAS-2717: updated migration-import to handle legacy types that reference classification
Repository: atlas Updated Branches: refs/heads/master 5dfbd08ba -> 76a201708 http://git-wip-us.apache.org/repos/asf/atlas/blob/76a20170/repository/src/test/resources/legacy-typesdef.json -- diff --git a/repository/src/test/resources/legacy-typesdef.json b/repository/src/test/resources/legacy-typesdef.json new file mode 100644 index 000..5f169d3 --- /dev/null +++ b/repository/src/test/resources/legacy-typesdef.json @@ -0,0 +1,150 @@ +{ + "enumDefs": [ + ], + "structDefs": [ +{ + "category": "STRUCT", + "guid": "42d9a0d1-8aba-406a-9437-9c2155d8fe02", + "createdBy": "root", + "updatedBy": "root", + "createTime": 1522693757121, + "updateTime": 1522693757121, + "version": 1, + "name": "order", + "description": "order", + "typeVersion": "1.0", + "attributeDefs": [ +{ + "name": "order", + "typeName": "int", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +} + ] +} + ], + "classificationDefs": [ +{ + "category": "CLASSIFICATION", + "guid": "c21bfb98-fdbd-4ae6-9dd8-0818079da4be", + "createdBy": "admin", + "updatedBy": "admin", + "createTime": 1526902192324, + "updateTime": 1526902192324, + "version": 1, + "name": "traitprayivofx4", + "description": "traitprayivofx4", + "typeVersion": "1.0", + "attributeDefs": [], + "superTypes": [], + "subTypes": [] +}, +{ + "category": "CLASSIFICATION", + "guid": "c21bfb98-fdbd-4ae6-9dd8-0818079da444", + "createdBy": "admin", + "updatedBy": "admin", + "createTime": 1526902192324, + "updateTime": 1526902192324, + "version": 1, + "name": "PII", + "description": "PII", + "typeVersion": "1.0", + "attributeDefs": [], + "superTypes": [], + "subTypes": [] +}, +{ + "category": "CLASSIFICATION", + "guid": "c21bfb98-fdbd-4ae6-9dd8-0818079da555", + "createdBy": "admin", + "updatedBy": "admin", + "createTime": 1526902192324, + "updateTime": 1526902192324, + "version": 1, + "name": "VENDOR_PII", + "description": "VENDOR_PII", + "typeVersion": "1.0", + "attributeDefs": [], + "superTypes": [], + "subTypes": [] +}, +{ + "category": "CLASSIFICATION", + "guid": "c21bfb98-fdbd-4ae6-9dd8-0818079da666", + "createdBy": "admin", + "updatedBy": "admin", + "createTime": 1526902192324, + "updateTime": 1526902192324, + "version": 1, + "name": "FINANCE", + "description": "FINANCE", + "typeVersion": "1.0", + "attributeDefs": [], + "superTypes": [], + "subTypes": [] +} + ], + "entityDefs": [ +{ + "category": "ENTITY", + "guid": "2f9b17b6-8a7d-495f-9778-8676912cb621", + "createdBy": "admin", + "updatedBy": "admin", + "createTime": 1526902193007, + "updateTime": 1526902193007, + "version": 1, + "name": "createComplexTraitTypeTestprayivofx4", + "description": "createComplexTraitTypeTestprayivofx4", + "typeVersion": "1.0", + "attributeDefs": [ +{ + "name": "complexTrait", + "typeName": "traitprayivofx4", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +}, +{ + "name": "vendors", + "typeName": "array", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +}, +{ + "name": "finance_assets", + "typeName": "map", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +}, +{ + "name": "description", + "typeName": "string", + "isOptional": false, + "cardinality": "SINGLE", + "valuesMinCount": 1, + "valuesMaxCount": 1, + "isUnique": false, + "isIndexable": false +} + ], + "superTypes": [], + "subTypes": [] +} + ] +}
[2/2] atlas git commit: ATLAS-2717: updated migration-import to handle legacy types that reference classification
ATLAS-2717: updated migration-import to handle legacy types that reference classification Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 76a201708127de1e13d536fe9fba1208dde00ba2) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/64fa8576 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/64fa8576 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/64fa8576 Branch: refs/heads/branch-1.0 Commit: 64fa8576b96df5ef06f4ccb2d3dc4844ad36a01c Parents: d6797f6 Author: Ashutosh Mestry <ames...@hortonworks.com> Authored: Fri May 25 14:23:23 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Fri May 25 18:04:48 2018 -0700 -- .../atlas/repository/graphdb/AtlasGraph.java| 7 - .../repository/graphdb/GraphDBMigrator.java | 34 +++ .../graphdb/janus/AtlasJanusGraph.java | 13 -- .../graphdb/janus/AtlasJanusGraphDatabase.java | 39 .../janus/migration/ElementProcessors.java | 66 -- .../migration/GraphDBGraphSONMigrator.java | 84 .../janus/migration/GraphSONUtility.java| 15 +- .../janus/migration/TypesDefScrubber.java | 212 +++ .../graphdb/janus/migration/BaseUtils.java | 2 +- .../janus/migration/GraphSONUtilityTest.java| 81 +-- .../test/resources/entity-with-trait-type.json | 38 .../impexp/MigrationProgressService.java| 21 +- .../migration/DataMigrationService.java | 17 +- .../test/java/org/apache/atlas/TestModules.java | 3 + .../migration/ComplexAttributesTest.java| 5 +- .../migration/HiveParititionTest.java | 5 +- .../repository/migration/HiveStocksTest.java| 5 +- .../migration/MigrationBaseAsserts.java | 16 +- .../migration/MigrationProgressServiceTest.java | 17 +- .../atlas/repository/migration/PathTest.java| 5 +- .../migration/TypesDefScrubberTest.java | 113 ++ .../migration/TypesWithClassificationTest.java | 61 ++ .../TypesWithCollectionsFinderTest.java | 5 +- .../atlas-migration-data.json | 163 ++ .../atlas-migration-typesdef.json | 150 + .../src/test/resources/legacy-typesdef.json | 150 + 26 files changed, 1187 insertions(+), 140 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/64fa8576/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java -- diff --git a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java index e5316d8..31d2085 100644 --- a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java +++ b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java @@ -18,7 +18,6 @@ package org.apache.atlas.repository.graphdb; import java.io.IOException; -import java.io.InputStream; import java.io.OutputStream; import java.util.Map; import java.util.Set; @@ -28,9 +27,7 @@ import javax.script.ScriptException; import org.apache.atlas.exception.AtlasBaseException; import org.apache.atlas.groovy.GroovyExpression; -import org.apache.atlas.model.impexp.MigrationStatus; import org.apache.atlas.type.AtlasType; -import org.apache.atlas.type.AtlasTypeRegistry; /** * Represents a graph. @@ -320,8 +317,4 @@ public interface AtlasGraph<V, E> { * @return */ boolean isMultiProperty(String name); - -void importLegacyGraphSON(AtlasTypeRegistry typeRegistry, InputStream fs) throws AtlasBaseException; - -MigrationStatus getMigrationStatus(); } http://git-wip-us.apache.org/repos/asf/atlas/blob/64fa8576/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/GraphDBMigrator.java -- diff --git a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/GraphDBMigrator.java b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/GraphDBMigrator.java new file mode 100644 index 000..2fdec92 --- /dev/null +++ b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/GraphDBMigrator.java @@ -0,0 +1,34 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://w
[3/3] atlas git commit: ATLAS-2696: updated kafka_topic with addition of attributes, avro_schema link
ATLAS-2696: updated kafka_topic with addition of attributes, avro_schema link Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/82bf78cc Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/82bf78cc Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/82bf78cc Branch: refs/heads/master Commit: 82bf78ccacfe10e11b191f225bd184872820b455 Parents: c2df13c Author: Barbara Eckman <barbara_eck...@cable.comcast.com> Authored: Fri May 25 23:22:21 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Fri May 25 23:22:30 2018 -0700 -- addons/models/1000-Hadoop/1070-kafka_model.json | 165 +++ 1 file changed, 165 insertions(+) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/82bf78cc/addons/models/1000-Hadoop/1070-kafka_model.json -- diff --git a/addons/models/1000-Hadoop/1070-kafka_model.json b/addons/models/1000-Hadoop/1070-kafka_model.json index b5a5965..2640028 100644 --- a/addons/models/1000-Hadoop/1070-kafka_model.json +++ b/addons/models/1000-Hadoop/1070-kafka_model.json @@ -26,6 +26,150 @@ "isIndexable": false, "isOptional": false, "isUnique": false +}, +{ +"name": "avroSchema", +"typeName": "array", +"isOptional": true, +"cardinality": "LIST", +"isUnique": false, +"isIndexable": true +}, +{ +"name": "replicationFactorNational", +"typeName": "int", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "replicationFactorLocal", +"typeName": "int", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "retentionBytesNational", +"typeName": "long", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "segmentBytesNational", +"typeName": "long", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "segmentBytesLocal", +"typeName": "long", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "contactInfo", +"typeName": "string", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "type", +"typeName": "string", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "partitionCountLocal", +"typeName": "int", +"isOptional": true, +"cardinality": "SINGLE", +&
[1/3] atlas git commit: ATLAS-2709: added model for RDBMS types
Repository: atlas Updated Branches: refs/heads/branch-1.0 64fa8576b -> ff07cf492 ATLAS-2709: added model for RDBMS types Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 5f503c157cb626b24be99e87648f7efd0d50d2e5) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/211da5af Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/211da5af Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/211da5af Branch: refs/heads/branch-1.0 Commit: 211da5afca52bf32d7f4125f49066a6f53d08af7 Parents: 64fa857 Author: Barbara Eckman <barbara_eck...@cable.comcast.com> Authored: Fri May 25 16:45:31 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Fri May 25 23:23:49 2018 -0700 -- addons/models/2000-RDBMS/2010-rdbms_model.json | 597 1 file changed, 597 insertions(+) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/211da5af/addons/models/2000-RDBMS/2010-rdbms_model.json -- diff --git a/addons/models/2000-RDBMS/2010-rdbms_model.json b/addons/models/2000-RDBMS/2010-rdbms_model.json new file mode 100644 index 000..7d1747b --- /dev/null +++ b/addons/models/2000-RDBMS/2010-rdbms_model.json @@ -0,0 +1,597 @@ +{ +"enumDefs": [], +"structDefs": [], +"classificationDefs": [], +"entityDefs": [ +{ +"name": "rdbms_instance", +"description": "Instance that the rdbms server is running on", +"superTypes": ["DataSet", "Asset"], +"typeVersion": "1.0", +"attributeDefs": [ +{ +"name": "rdbms_type", +"typeName": "string", +"isOptional": false, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": true +}, +{ +"name": "platform", +"typeName": "string", +"isOptional": false, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": true +}, +{ +"name": "cloudOrOnPrem", +"typeName": "string", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "hostname", +"typeName": "string", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "port", +"typeName": "int", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "protocol", +"typeName": "string", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "contact_info", +"typeName": "string", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "comment", +"typeName": "string", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexa
[2/3] atlas git commit: ATLAS-2694: updated avro models with relationshipDefs (#2)
ATLAS-2694: updated avro models with relationshipDefs (#2) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/c2df13c5 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/c2df13c5 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/c2df13c5 Branch: refs/heads/master Commit: c2df13c5947787f8642c03a1ac3b3d35749adb78 Parents: 5f503c1 Author: Madhan Neethiraj <mad...@apache.org> Authored: Fri May 25 23:21:55 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Fri May 25 23:21:55 2018 -0700 -- addons/models/1000-Hadoop/1065-avro_model.json | 279 addons/models/1000-Hadoop/1090-avro_model.json | 220 --- 2 files changed, 279 insertions(+), 220 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/c2df13c5/addons/models/1000-Hadoop/1065-avro_model.json -- diff --git a/addons/models/1000-Hadoop/1065-avro_model.json b/addons/models/1000-Hadoop/1065-avro_model.json new file mode 100644 index 000..3eaddfb --- /dev/null +++ b/addons/models/1000-Hadoop/1065-avro_model.json @@ -0,0 +1,279 @@ +{ +"enumDefs": [], +"structDefs": [], +"classificationDefs": [], +"entityDefs": [ +{ +"name": "avro_type", +"description": "Atlas Type representing Abstract Avro Type", +"superTypes": [ +"DataSet", "Asset" +], +"typeVersion": "1.0", +"attributeDefs": [ +] +}, +{ +"name": "avro_field", +"description": "Atlas Type representing an Avro Field", +"superTypes": [ +"avro_type" +], +"typeVersion": "1.0", +"attributeDefs": [ +{ +"name": "type", +"typeName": "array", +"cardinality": "LIST", +"isIndexable": true, +"isOptional": false, +"isUnique": false +}, +{ +"name": "doc", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": true, +"isUnique": false +}, +{ +"name": "default", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": false, +"isOptional": true, +"isUnique": false +} +] +}, +{ +"name": "avro_record", +"description": "Atlas Type representing Abstract Avro Schema", +"superTypes": [ +"avro_type" +], +"typeVersion": "1.0", +"attributeDefs": [ +{ +"name": "type", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": false, +"isUnique": false +}, +{ +"name": "doc", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": true, +"isUnique": false +}, +{ +"name": "fields", +"typeName": "array", +"cardinality": "LIST", +"isIndexable": true, +"isOptional": true, +"isUnique": false, +"constraints": [ +{ +"type": "
atlas git commit: ATLAS-2694: added Avro schema typedef and support for Avro schema evolution
Repository: atlas Updated Branches: refs/heads/master 9aca852b0 -> 5dfbd08ba ATLAS-2694: added Avro schema typedef and support for Avro schema evolution Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/5dfbd08b Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/5dfbd08b Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/5dfbd08b Branch: refs/heads/master Commit: 5dfbd08ba60cc191da5adc941f2001fb7d68e30f Parents: 9aca852 Author: Barbara Eckman <barbara_eck...@cable.comcast.com> Authored: Fri May 25 14:21:07 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Fri May 25 14:21:17 2018 -0700 -- addons/models/1000-Hadoop/1090-avro_model.json | 220 1 file changed, 220 insertions(+) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/5dfbd08b/addons/models/1000-Hadoop/1090-avro_model.json -- diff --git a/addons/models/1000-Hadoop/1090-avro_model.json b/addons/models/1000-Hadoop/1090-avro_model.json new file mode 100644 index 000..882c39c --- /dev/null +++ b/addons/models/1000-Hadoop/1090-avro_model.json @@ -0,0 +1,220 @@ +{ +"enumDefs": [], +"structDefs": [], +"classificationDefs": [], +"entityDefs": [ +{ +"name": "avro_type", +"description": "Atlas Type representing Abstract Avro Type", +"superTypes": [ +"DataSet", "Asset" +], +"typeVersion": "1.0", +"attributeDefs": [ +] +}, +{ +"name": "avro_field", +"description": "Atlas Type representing an Avro Field", +"superTypes": [ +"avro_type" +], +"typeVersion": "1.0", +"attributeDefs": [ +{ +"name": "type", +"typeName": "array", +"cardinality": "LIST", +"isIndexable": true, +"isOptional": false, +"isUnique": false +}, +{ +"name": "doc", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": true, +"isUnique": false +}, +{ +"name": "default", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": false, +"isOptional": true, +"isUnique": false +} +] +}, +{ +"name": "avro_record", +"description": "Atlas Type representing Abstract Avro Schema", +"superTypes": [ +"avro_type" +], +"typeVersion": "1.0", +"attributeDefs": [ +{ +"name": "type", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": false, +"isUnique": false +}, +{ +"name": "doc", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": true, +"isUnique": false +}, +{ +"name": "fields", +"typeName": "array", +"cardinality": "LIST", +"isIndexable": true, +"isOptional": true, +"isUnique": false, +"constra
atlas git commit: ATLAS-2694: added Avro schema typedef and support for Avro schema evolution
Repository: atlas Updated Branches: refs/heads/branch-1.0 b0ecc36ac -> d6797f611 ATLAS-2694: added Avro schema typedef and support for Avro schema evolution Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 5dfbd08ba60cc191da5adc941f2001fb7d68e30f) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/d6797f61 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/d6797f61 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/d6797f61 Branch: refs/heads/branch-1.0 Commit: d6797f611607b534f6b8233ec982cc4d1af00cec Parents: b0ecc36 Author: Barbara Eckman <barbara_eck...@cable.comcast.com> Authored: Fri May 25 14:21:07 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Fri May 25 14:26:27 2018 -0700 -- addons/models/1000-Hadoop/1090-avro_model.json | 220 1 file changed, 220 insertions(+) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/d6797f61/addons/models/1000-Hadoop/1090-avro_model.json -- diff --git a/addons/models/1000-Hadoop/1090-avro_model.json b/addons/models/1000-Hadoop/1090-avro_model.json new file mode 100644 index 000..882c39c --- /dev/null +++ b/addons/models/1000-Hadoop/1090-avro_model.json @@ -0,0 +1,220 @@ +{ +"enumDefs": [], +"structDefs": [], +"classificationDefs": [], +"entityDefs": [ +{ +"name": "avro_type", +"description": "Atlas Type representing Abstract Avro Type", +"superTypes": [ +"DataSet", "Asset" +], +"typeVersion": "1.0", +"attributeDefs": [ +] +}, +{ +"name": "avro_field", +"description": "Atlas Type representing an Avro Field", +"superTypes": [ +"avro_type" +], +"typeVersion": "1.0", +"attributeDefs": [ +{ +"name": "type", +"typeName": "array", +"cardinality": "LIST", +"isIndexable": true, +"isOptional": false, +"isUnique": false +}, +{ +"name": "doc", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": true, +"isUnique": false +}, +{ +"name": "default", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": false, +"isOptional": true, +"isUnique": false +} +] +}, +{ +"name": "avro_record", +"description": "Atlas Type representing Abstract Avro Schema", +"superTypes": [ +"avro_type" +], +"typeVersion": "1.0", +"attributeDefs": [ +{ +"name": "type", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": false, +"isUnique": false +}, +{ +"name": "doc", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": true, +"isUnique": false +}, +{ +"name": "fields", +"typeName": "array", +"cardinality": "LIST", +"isIndexable": true, +"isOptional": t
[3/3] atlas git commit: ATLAS-2696: updated kafka_topic with addition of attributes, avro_schema link
ATLAS-2696: updated kafka_topic with addition of attributes, avro_schema link Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 82bf78ccacfe10e11b191f225bd184872820b455) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/ff07cf49 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/ff07cf49 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/ff07cf49 Branch: refs/heads/branch-1.0 Commit: ff07cf492aa8b6bc8d4be8462cfedd78e44c30cc Parents: c79900b Author: Barbara Eckman <barbara_eck...@cable.comcast.com> Authored: Fri May 25 23:22:21 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Fri May 25 23:24:06 2018 -0700 -- addons/models/1000-Hadoop/1070-kafka_model.json | 165 +++ 1 file changed, 165 insertions(+) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/ff07cf49/addons/models/1000-Hadoop/1070-kafka_model.json -- diff --git a/addons/models/1000-Hadoop/1070-kafka_model.json b/addons/models/1000-Hadoop/1070-kafka_model.json index b5a5965..2640028 100644 --- a/addons/models/1000-Hadoop/1070-kafka_model.json +++ b/addons/models/1000-Hadoop/1070-kafka_model.json @@ -26,6 +26,150 @@ "isIndexable": false, "isOptional": false, "isUnique": false +}, +{ +"name": "avroSchema", +"typeName": "array", +"isOptional": true, +"cardinality": "LIST", +"isUnique": false, +"isIndexable": true +}, +{ +"name": "replicationFactorNational", +"typeName": "int", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "replicationFactorLocal", +"typeName": "int", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "retentionBytesNational", +"typeName": "long", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "segmentBytesNational", +"typeName": "long", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "segmentBytesLocal", +"typeName": "long", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "contactInfo", +"typeName": "string", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "type", +"typeName": "string", +"isOptional": true, +"cardinality": "SINGLE", +"isUnique": false, +"isIndexable": false +}, +{ +"name": "partitionCountLocal", +"typeName": "int", +"isOptional": true, +"cardinality":
[2/3] atlas git commit: ATLAS-2694: updated avro models with relationshipDefs (#2)
ATLAS-2694: updated avro models with relationshipDefs (#2) (cherry picked from commit c2df13c5947787f8642c03a1ac3b3d35749adb78) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/c79900bb Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/c79900bb Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/c79900bb Branch: refs/heads/branch-1.0 Commit: c79900bb17111f11a938456b109e44b25a14081a Parents: 211da5a Author: Madhan Neethiraj <mad...@apache.org> Authored: Fri May 25 23:21:55 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Fri May 25 23:23:57 2018 -0700 -- addons/models/1000-Hadoop/1065-avro_model.json | 279 addons/models/1000-Hadoop/1090-avro_model.json | 220 --- 2 files changed, 279 insertions(+), 220 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/c79900bb/addons/models/1000-Hadoop/1065-avro_model.json -- diff --git a/addons/models/1000-Hadoop/1065-avro_model.json b/addons/models/1000-Hadoop/1065-avro_model.json new file mode 100644 index 000..3eaddfb --- /dev/null +++ b/addons/models/1000-Hadoop/1065-avro_model.json @@ -0,0 +1,279 @@ +{ +"enumDefs": [], +"structDefs": [], +"classificationDefs": [], +"entityDefs": [ +{ +"name": "avro_type", +"description": "Atlas Type representing Abstract Avro Type", +"superTypes": [ +"DataSet", "Asset" +], +"typeVersion": "1.0", +"attributeDefs": [ +] +}, +{ +"name": "avro_field", +"description": "Atlas Type representing an Avro Field", +"superTypes": [ +"avro_type" +], +"typeVersion": "1.0", +"attributeDefs": [ +{ +"name": "type", +"typeName": "array", +"cardinality": "LIST", +"isIndexable": true, +"isOptional": false, +"isUnique": false +}, +{ +"name": "doc", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": true, +"isUnique": false +}, +{ +"name": "default", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": false, +"isOptional": true, +"isUnique": false +} +] +}, +{ +"name": "avro_record", +"description": "Atlas Type representing Abstract Avro Schema", +"superTypes": [ +"avro_type" +], +"typeVersion": "1.0", +"attributeDefs": [ +{ +"name": "type", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": false, +"isUnique": false +}, +{ +"name": "doc", +"typeName": "string", +"cardinality": "SINGLE", +"isIndexable": true, +"isOptional": true, +"isUnique": false +}, +{ +"name": "fields", +"typeName": "array", +"cardinality": "LIST", +"isIndexable": true, +"isOptional": true, +"isUnique": false, +"constraints"
[1/2] atlas git commit: ATLAS-2716 : Update UI to include term value while saving search
Repository: atlas Updated Branches: refs/heads/branch-1.0 4b5aa7d01 -> 4964d3f1d ATLAS-2716 : Update UI to include term value while saving search Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 4c121c4dc6a49a93f3946785da917d4691841136) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/185757c7 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/185757c7 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/185757c7 Branch: refs/heads/branch-1.0 Commit: 185757c7f52a82ad38b3887f971f9d3a803b8fb4 Parents: 4b5aa7d Author: kevalbhatt <kbh...@apache.org> Authored: Thu May 24 18:00:04 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu May 24 07:48:28 2018 -0700 -- dashboardv2/public/js/utils/Enums.js | 3 ++- dashboardv2/public/js/views/search/SearchResultLayoutView.js | 2 +- dashboardv2/public/js/views/search/save/SaveSearchView.js| 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/185757c7/dashboardv2/public/js/utils/Enums.js -- diff --git a/dashboardv2/public/js/utils/Enums.js b/dashboardv2/public/js/utils/Enums.js index 81de527..b5e8a6d 100644 --- a/dashboardv2/public/js/utils/Enums.js +++ b/dashboardv2/public/js/utils/Enums.js @@ -73,7 +73,8 @@ define(['require'], function(require) { "excludeSC": "includeSubClassifications", "tagFilters": "tagFilters", "entityFilters": "entityFilters", -"attributes": "attributes" +"attributes": "attributes", +"term": "termName" }, "uiParameters": "uiParameters" } http://git-wip-us.apache.org/repos/asf/atlas/blob/185757c7/dashboardv2/public/js/views/search/SearchResultLayoutView.js -- diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js index 1cb2075..7fa088b 100644 --- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js +++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js @@ -716,7 +716,7 @@ define(['require', }) }; this.getTagCol({ 'col': col, 'columnToShow': columnToShow }); -if ((!_.contains(["classification", "glossary"], this.fromView))) { +if ((!_.contains(["glossary"], this.fromView))) { this.getTermCol({ 'col': col, 'columnToShow': columnToShow }); } http://git-wip-us.apache.org/repos/asf/atlas/blob/185757c7/dashboardv2/public/js/views/search/save/SaveSearchView.js -- diff --git a/dashboardv2/public/js/views/search/save/SaveSearchView.js b/dashboardv2/public/js/views/search/save/SaveSearchView.js index 5d135ce..ae940e1 100644 --- a/dashboardv2/public/js/views/search/save/SaveSearchView.js +++ b/dashboardv2/public/js/views/search/save/SaveSearchView.js @@ -96,7 +96,7 @@ define(['require', }, saveAs: function(e) { var value = this.getValue(); -if (value && (value.type || value.tag || value.query)) { +if (value && (value.type || value.tag || value.query || value.term)) { this.callSaveModalLayoutView({ 'collection': this.collection, 'getValue': this.getValue,
atlas git commit: ATLAS-2716 : Update UI to include term value while saving search
Repository: atlas Updated Branches: refs/heads/master 1deb8c16e -> 4c121c4dc ATLAS-2716 : Update UI to include term value while saving search Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/4c121c4d Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/4c121c4d Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/4c121c4d Branch: refs/heads/master Commit: 4c121c4dc6a49a93f3946785da917d4691841136 Parents: 1deb8c1 Author: kevalbhatt <kbh...@apache.org> Authored: Thu May 24 18:00:04 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu May 24 07:46:04 2018 -0700 -- dashboardv2/public/js/utils/Enums.js | 3 ++- dashboardv2/public/js/views/search/SearchResultLayoutView.js | 2 +- dashboardv2/public/js/views/search/save/SaveSearchView.js| 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/4c121c4d/dashboardv2/public/js/utils/Enums.js -- diff --git a/dashboardv2/public/js/utils/Enums.js b/dashboardv2/public/js/utils/Enums.js index 81de527..b5e8a6d 100644 --- a/dashboardv2/public/js/utils/Enums.js +++ b/dashboardv2/public/js/utils/Enums.js @@ -73,7 +73,8 @@ define(['require'], function(require) { "excludeSC": "includeSubClassifications", "tagFilters": "tagFilters", "entityFilters": "entityFilters", -"attributes": "attributes" +"attributes": "attributes", +"term": "termName" }, "uiParameters": "uiParameters" } http://git-wip-us.apache.org/repos/asf/atlas/blob/4c121c4d/dashboardv2/public/js/views/search/SearchResultLayoutView.js -- diff --git a/dashboardv2/public/js/views/search/SearchResultLayoutView.js b/dashboardv2/public/js/views/search/SearchResultLayoutView.js index 1cb2075..7fa088b 100644 --- a/dashboardv2/public/js/views/search/SearchResultLayoutView.js +++ b/dashboardv2/public/js/views/search/SearchResultLayoutView.js @@ -716,7 +716,7 @@ define(['require', }) }; this.getTagCol({ 'col': col, 'columnToShow': columnToShow }); -if ((!_.contains(["classification", "glossary"], this.fromView))) { +if ((!_.contains(["glossary"], this.fromView))) { this.getTermCol({ 'col': col, 'columnToShow': columnToShow }); } http://git-wip-us.apache.org/repos/asf/atlas/blob/4c121c4d/dashboardv2/public/js/views/search/save/SaveSearchView.js -- diff --git a/dashboardv2/public/js/views/search/save/SaveSearchView.js b/dashboardv2/public/js/views/search/save/SaveSearchView.js index 5d135ce..ae940e1 100644 --- a/dashboardv2/public/js/views/search/save/SaveSearchView.js +++ b/dashboardv2/public/js/views/search/save/SaveSearchView.js @@ -96,7 +96,7 @@ define(['require', }, saveAs: function(e) { var value = this.getValue(); -if (value && (value.type || value.tag || value.query)) { +if (value && (value.type || value.tag || value.query || value.term)) { this.callSaveModalLayoutView({ 'collection': this.collection, 'getValue': this.getValue,
atlas git commit: ATLAS-2718: Documentation for Atlas Ranger authorization
Repository: atlas Updated Branches: refs/heads/master 4c121c4dc -> 633f37b68 ATLAS-2718: Documentation for Atlas Ranger authorization Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/633f37b6 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/633f37b6 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/633f37b6 Branch: refs/heads/master Commit: 633f37b68e0f39a06a4de6b8619d56eb18e32fb1 Parents: 4c121c4 Author: nixonrodrigues <ni...@apache.org> Authored: Thu May 24 20:20:15 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu May 24 13:43:12 2018 -0700 -- .../resources/images/twiki/ranger-audit.png | Bin 0 -> 115948 bytes .../images/twiki/ranger-policy-admin.png| Bin 0 -> 227632 bytes .../images/twiki/ranger-policy-entities.png | Bin 0 -> 303316 bytes .../images/twiki/ranger-policy-types.png| Bin 0 -> 253200 bytes .../site/twiki/Atlas-Authorization-Model.twiki | 2 +- .../Atlas-Authorization-Ranger-Authorizer.twiki | 63 +++ .../Atlas-Authorization-Simple-Authorizer.twiki | 2 +- docs/src/site/twiki/index.twiki | 3 +- 8 files changed, 67 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/633f37b6/docs/src/site/resources/images/twiki/ranger-audit.png -- diff --git a/docs/src/site/resources/images/twiki/ranger-audit.png b/docs/src/site/resources/images/twiki/ranger-audit.png new file mode 100644 index 000..17abfad Binary files /dev/null and b/docs/src/site/resources/images/twiki/ranger-audit.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/633f37b6/docs/src/site/resources/images/twiki/ranger-policy-admin.png -- diff --git a/docs/src/site/resources/images/twiki/ranger-policy-admin.png b/docs/src/site/resources/images/twiki/ranger-policy-admin.png new file mode 100644 index 000..6121c33 Binary files /dev/null and b/docs/src/site/resources/images/twiki/ranger-policy-admin.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/633f37b6/docs/src/site/resources/images/twiki/ranger-policy-entities.png -- diff --git a/docs/src/site/resources/images/twiki/ranger-policy-entities.png b/docs/src/site/resources/images/twiki/ranger-policy-entities.png new file mode 100644 index 000..0dc2675 Binary files /dev/null and b/docs/src/site/resources/images/twiki/ranger-policy-entities.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/633f37b6/docs/src/site/resources/images/twiki/ranger-policy-types.png -- diff --git a/docs/src/site/resources/images/twiki/ranger-policy-types.png b/docs/src/site/resources/images/twiki/ranger-policy-types.png new file mode 100644 index 000..8169cbe Binary files /dev/null and b/docs/src/site/resources/images/twiki/ranger-policy-types.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/633f37b6/docs/src/site/twiki/Atlas-Authorization-Model.twiki -- diff --git a/docs/src/site/twiki/Atlas-Authorization-Model.twiki b/docs/src/site/twiki/Atlas-Authorization-Model.twiki index 4a6a729..ee09935 100644 --- a/docs/src/site/twiki/Atlas-Authorization-Model.twiki +++ b/docs/src/site/twiki/Atlas-Authorization-Model.twiki @@ -100,7 +100,7 @@ atlas.authorizer.impl=ranger Apache Ranger Authorizer requires configuration files to be setup, for example to specify Apache Ranger admin server URL, -name of the service containing authorization policies, etc. For more details on this, please refer to Apache Ranger documentation. +name of the service containing authorization policies, etc. For more details please see, [[Atlas-Authorization-Ranger-Authorizer][Setting up Atlas to use Ranger Authorizer]]. ---+++ None authorizer http://git-wip-us.apache.org/repos/asf/atlas/blob/633f37b6/docs/src/site/twiki/Atlas-Authorization-Ranger-Authorizer.twiki -- diff --git a/docs/src/site/twiki/Atlas-Authorization-Ranger-Authorizer.twiki b/docs/src/site/twiki/Atlas-Authorization-Ranger-Authorizer.twiki new file mode 100644 index 000..33447b9 --- /dev/null +++ b/docs/src/site/twiki/Atlas-Authorization-Ranger-Authorizer.twiki @@ -0,0 +1,63 @@ +---+++ Setting up Apache Atlas to use Apache Ranger Authorization + +As detailed in [[Atlas-Authorization-Model][Atlas Authorization Model]], Apache Atlas supports pluggable authorizati
atlas git commit: ATLAS-2718: Documentation for Atlas Ranger authorization
Repository: atlas Updated Branches: refs/heads/branch-1.0 4964d3f1d -> a6a0348e6 ATLAS-2718: Documentation for Atlas Ranger authorization Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 633f37b68e0f39a06a4de6b8619d56eb18e32fb1) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/a6a0348e Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/a6a0348e Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/a6a0348e Branch: refs/heads/branch-1.0 Commit: a6a0348e642ef48dd00a95d2114e686963add9d5 Parents: 4964d3f Author: nixonrodrigues <ni...@apache.org> Authored: Thu May 24 20:20:15 2018 +0530 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu May 24 13:43:35 2018 -0700 -- .../resources/images/twiki/ranger-audit.png | Bin 0 -> 115948 bytes .../images/twiki/ranger-policy-admin.png| Bin 0 -> 227632 bytes .../images/twiki/ranger-policy-entities.png | Bin 0 -> 303316 bytes .../images/twiki/ranger-policy-types.png| Bin 0 -> 253200 bytes .../site/twiki/Atlas-Authorization-Model.twiki | 2 +- .../Atlas-Authorization-Ranger-Authorizer.twiki | 63 +++ .../Atlas-Authorization-Simple-Authorizer.twiki | 2 +- docs/src/site/twiki/index.twiki | 3 +- 8 files changed, 67 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/a6a0348e/docs/src/site/resources/images/twiki/ranger-audit.png -- diff --git a/docs/src/site/resources/images/twiki/ranger-audit.png b/docs/src/site/resources/images/twiki/ranger-audit.png new file mode 100644 index 000..17abfad Binary files /dev/null and b/docs/src/site/resources/images/twiki/ranger-audit.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/a6a0348e/docs/src/site/resources/images/twiki/ranger-policy-admin.png -- diff --git a/docs/src/site/resources/images/twiki/ranger-policy-admin.png b/docs/src/site/resources/images/twiki/ranger-policy-admin.png new file mode 100644 index 000..6121c33 Binary files /dev/null and b/docs/src/site/resources/images/twiki/ranger-policy-admin.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/a6a0348e/docs/src/site/resources/images/twiki/ranger-policy-entities.png -- diff --git a/docs/src/site/resources/images/twiki/ranger-policy-entities.png b/docs/src/site/resources/images/twiki/ranger-policy-entities.png new file mode 100644 index 000..0dc2675 Binary files /dev/null and b/docs/src/site/resources/images/twiki/ranger-policy-entities.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/a6a0348e/docs/src/site/resources/images/twiki/ranger-policy-types.png -- diff --git a/docs/src/site/resources/images/twiki/ranger-policy-types.png b/docs/src/site/resources/images/twiki/ranger-policy-types.png new file mode 100644 index 000..8169cbe Binary files /dev/null and b/docs/src/site/resources/images/twiki/ranger-policy-types.png differ http://git-wip-us.apache.org/repos/asf/atlas/blob/a6a0348e/docs/src/site/twiki/Atlas-Authorization-Model.twiki -- diff --git a/docs/src/site/twiki/Atlas-Authorization-Model.twiki b/docs/src/site/twiki/Atlas-Authorization-Model.twiki index 4a6a729..ee09935 100644 --- a/docs/src/site/twiki/Atlas-Authorization-Model.twiki +++ b/docs/src/site/twiki/Atlas-Authorization-Model.twiki @@ -100,7 +100,7 @@ atlas.authorizer.impl=ranger Apache Ranger Authorizer requires configuration files to be setup, for example to specify Apache Ranger admin server URL, -name of the service containing authorization policies, etc. For more details on this, please refer to Apache Ranger documentation. +name of the service containing authorization policies, etc. For more details please see, [[Atlas-Authorization-Ranger-Authorizer][Setting up Atlas to use Ranger Authorizer]]. ---+++ None authorizer http://git-wip-us.apache.org/repos/asf/atlas/blob/a6a0348e/docs/src/site/twiki/Atlas-Authorization-Ranger-Authorizer.twiki -- diff --git a/docs/src/site/twiki/Atlas-Authorization-Ranger-Authorizer.twiki b/docs/src/site/twiki/Atlas-Authorization-Ranger-Authorizer.twiki new file mode 100644 index 000..33447b9 --- /dev/null +++ b/docs/src/site/twiki/Atlas-Authorization-Ranger-Authorizer.twiki @@ -0,0 +1,63 @@ +---+++ Setting up Apache Atlas to use Apache Ranger Authorization + +As detailed in [[Atlas-Authorization
atlas git commit: ATLAS-2720: Documentation - what's new in Atlas 1.0
Repository: atlas Updated Branches: refs/heads/master 6820cb785 -> 85e08c28b ATLAS-2720: Documentation - what's new in Atlas 1.0 Signed-off-by: Madhan Neethiraj <mad...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/85e08c28 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/85e08c28 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/85e08c28 Branch: refs/heads/master Commit: 85e08c28b460b2439ef2fe06ee6cfb24d2307b2e Parents: 6820cb7 Author: apoorvnaik <apoorvn...@apache.org> Authored: Wed May 23 23:21:44 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu May 24 16:04:07 2018 -0700 -- docs/src/site/markdown/WhatsNew-1.0.md | 73 + docs/src/site/twiki/index.twiki| 1 + 2 files changed, 74 insertions(+) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/85e08c28/docs/src/site/markdown/WhatsNew-1.0.md -- diff --git a/docs/src/site/markdown/WhatsNew-1.0.md b/docs/src/site/markdown/WhatsNew-1.0.md new file mode 100644 index 000..17b6873 --- /dev/null +++ b/docs/src/site/markdown/WhatsNew-1.0.md @@ -0,0 +1,73 @@ + + +# What's new in Apache Atlas 1.0? + +## Features + +* Introduction of relationships as a first-class type +* Support for propagation of classifications along entity relationships – like lineage +* Fine-grained metadata security, which enables access controls up to entity instance level +* Introduction of Glossary feature +* Introduction of V2 style notifications +* Introduction of Atlas hook for HBase +* Support for Cassandra and Elasticsearch (tech-preview) + +## Updates + +* Graph store has been updated from Titan 0.5.4 to JanusGraph 0.2.0 +* DSL rewrite, to replace use of Scala based implementation with ANTLR +* Performance improvements in Atlas Hooks, by switching to use V2 style notifications +* Significant updates in Atlas Web UI + +## Changes + +### DSL search + +With DSL rewrite and simplification, some older constructs may not work. Here's a list of behavior changes from previous +releases. More DSL related changes can be found [here](Search-Advanced.html). + + * When filtering or narrowing results using string attribute, the value **MUST** be enclosed in double quotes + * Table name="Table1" + * Table where name="Table1" + * Join queries are no longer supported e.g. hive_table, hive_db + * Select clauses only work with immediate entity attributes or a single referred (entity) type. + * Table select name, owner + * Table select Columns + * Table select name, owner, Columns _*(won't work)*_ + * OrderBy clause can only be used with a _*single primitive*_ attribute. + * GroupBy clause can only be used with a _*single primitive*_ attribute. + * Table groupby name + * Table groupby Columns (won't work) + * Typename can't have multiple aliases + * Table as t (OK) + * Table as t1, t2 (won't work) + * Has clause only works with primitive attributes. + * Table has name + * Table has Columns or Table has DB (NOT supported) + * Aggregator clause can only be used with a _*single primitive*_ attribute. + * Table select min(name) + * Table select max(name) + * Table select sum(createTime) + * Table select min(Columns) (won't work) + * Table select max(Columns) (won't work) + * Table select sum(Columns) (won't work) + * Aggregator clause can't be repeated with different _*primitive attribute*_, the clause appearing last would take preference. + * Table select min(name), min(createTime) will ignore _*min(name)*_ + * Limit and offset are not applicable when using aggregator clauses (min, max, sum) + * Table select min(name) limit 10 offset 5 - min(name) is computed over **ALL** entities of type Asset \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/85e08c28/docs/src/site/twiki/index.twiki -- diff --git a/docs/src/site/twiki/index.twiki b/docs/src/site/twiki/index.twiki index 29fc83f..ed14615 100755 --- a/docs/src/site/twiki/index.twiki +++ b/docs/src/site/twiki/index.twiki @@ -44,6 +44,7 @@ capabilities around these data assets for data scientists, analysts and the data ---++ Getting Started + * [[WhatsNew-1.0][What's new in Apache Atlas 1.0?]] * [[InstallationSteps][Build & Install]] * [[QuickStart][Quick Start]]
atlas git commit: ATLAS-2720: Documentation - what's new in Atlas 1.0
Repository: atlas Updated Branches: refs/heads/branch-1.0 40804017b -> ff132de0d ATLAS-2720: Documentation - what's new in Atlas 1.0 Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 85e08c28b460b2439ef2fe06ee6cfb24d2307b2e) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/ff132de0 Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/ff132de0 Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/ff132de0 Branch: refs/heads/branch-1.0 Commit: ff132de0d8babcb11efba663420ee395f9091ea8 Parents: 4080401 Author: apoorvnaik <apoorvn...@apache.org> Authored: Wed May 23 23:21:44 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu May 24 16:04:58 2018 -0700 -- docs/src/site/markdown/WhatsNew-1.0.md | 73 + docs/src/site/twiki/index.twiki| 1 + 2 files changed, 74 insertions(+) -- http://git-wip-us.apache.org/repos/asf/atlas/blob/ff132de0/docs/src/site/markdown/WhatsNew-1.0.md -- diff --git a/docs/src/site/markdown/WhatsNew-1.0.md b/docs/src/site/markdown/WhatsNew-1.0.md new file mode 100644 index 000..17b6873 --- /dev/null +++ b/docs/src/site/markdown/WhatsNew-1.0.md @@ -0,0 +1,73 @@ + + +# What's new in Apache Atlas 1.0? + +## Features + +* Introduction of relationships as a first-class type +* Support for propagation of classifications along entity relationships – like lineage +* Fine-grained metadata security, which enables access controls up to entity instance level +* Introduction of Glossary feature +* Introduction of V2 style notifications +* Introduction of Atlas hook for HBase +* Support for Cassandra and Elasticsearch (tech-preview) + +## Updates + +* Graph store has been updated from Titan 0.5.4 to JanusGraph 0.2.0 +* DSL rewrite, to replace use of Scala based implementation with ANTLR +* Performance improvements in Atlas Hooks, by switching to use V2 style notifications +* Significant updates in Atlas Web UI + +## Changes + +### DSL search + +With DSL rewrite and simplification, some older constructs may not work. Here's a list of behavior changes from previous +releases. More DSL related changes can be found [here](Search-Advanced.html). + + * When filtering or narrowing results using string attribute, the value **MUST** be enclosed in double quotes + * Table name="Table1" + * Table where name="Table1" + * Join queries are no longer supported e.g. hive_table, hive_db + * Select clauses only work with immediate entity attributes or a single referred (entity) type. + * Table select name, owner + * Table select Columns + * Table select name, owner, Columns _*(won't work)*_ + * OrderBy clause can only be used with a _*single primitive*_ attribute. + * GroupBy clause can only be used with a _*single primitive*_ attribute. + * Table groupby name + * Table groupby Columns (won't work) + * Typename can't have multiple aliases + * Table as t (OK) + * Table as t1, t2 (won't work) + * Has clause only works with primitive attributes. + * Table has name + * Table has Columns or Table has DB (NOT supported) + * Aggregator clause can only be used with a _*single primitive*_ attribute. + * Table select min(name) + * Table select max(name) + * Table select sum(createTime) + * Table select min(Columns) (won't work) + * Table select max(Columns) (won't work) + * Table select sum(Columns) (won't work) + * Aggregator clause can't be repeated with different _*primitive attribute*_, the clause appearing last would take preference. + * Table select min(name), min(createTime) will ignore _*min(name)*_ + * Limit and offset are not applicable when using aggregator clauses (min, max, sum) + * Table select min(name) limit 10 offset 5 - min(name) is computed over **ALL** entities of type Asset \ No newline at end of file http://git-wip-us.apache.org/repos/asf/atlas/blob/ff132de0/docs/src/site/twiki/index.twiki -- diff --git a/docs/src/site/twiki/index.twiki b/docs/src/site/twiki/index.twiki index 29fc83f..ed14615 100755 --- a/docs/src/site/twiki/index.twiki +++ b/docs/src/site/twiki/index.twiki @@ -44,6 +44,7 @@ capabilities around these data assets for data scientists, analysts and the data ---++ Getting Started + * [[WhatsNew-1.0][What's new in Apache Atlas 1.0?]] * [[InstallationSteps][Build & Install]] * [[QuickStart][Quick Start]]
[20/20] atlas git commit: ATLAS-2490: updates to make usage of v1/v2 in class names consistent
ATLAS-2490: updates to make usage of v1/v2 in class names consistent Signed-off-by: Madhan Neethiraj <mad...@apache.org> (cherry picked from commit 3d5b4880f3e3a35e9c441010096ede729204af43) Project: http://git-wip-us.apache.org/repos/asf/atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/4823c8ed Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/4823c8ed Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/4823c8ed Branch: refs/heads/branch-1.0 Commit: 4823c8ed4eca08c60587cd175c5184a5544ef4e5 Parents: ff132de Author: apoorvnaik <apoorvn...@apache.org> Authored: Sun May 13 23:11:41 2018 -0700 Committer: Madhan Neethiraj <mad...@apache.org> Committed: Thu May 24 21:47:22 2018 -0700 -- .../authorize/AtlasAuthorizationUtils.java |8 +- .../ClassificationSearchProcessor.java |6 +- .../atlas/discovery/EntityDiscoveryService.java |6 +- .../atlas/discovery/EntityLineageService.java | 12 +- .../discovery/FullTextSearchProcessor.java |6 +- .../apache/atlas/discovery/SearchContext.java |4 +- .../apache/atlas/discovery/SearchProcessor.java |6 +- .../apache/atlas/glossary/GlossaryService.java | 12 +- .../repository/audit/EntityAuditListener.java |4 +- .../repository/audit/EntityAuditListenerV2.java | 10 +- .../converters/AtlasInstanceConverter.java |6 +- .../converters/TypeConverterUtil.java |4 +- .../repository/graph/FullTextMapperV2.java |6 +- .../graph/GraphBackedSearchIndexer.java |3 +- .../atlas/repository/graph/GraphHelper.java | 44 +- .../atlas/repository/impexp/ExportService.java |2 +- .../atlas/repository/impexp/ZipSource.java |2 +- .../apache/atlas/repository/ogm/DataAccess.java |2 +- .../store/graph/AtlasEntityStore.java |2 +- .../repository/store/graph/BulkImporter.java|2 +- .../store/graph/EntityGraphDiscovery.java |4 - .../graph/EntityGraphDiscoveryContext.java |2 +- .../store/graph/v1/AtlasAbstractDefStoreV1.java | 111 -- .../graph/v1/AtlasClassificationDefStoreV1.java | 364 .../graph/v1/AtlasEntityChangeNotifier.java | 478 - .../store/graph/v1/AtlasEntityDefStoreV1.java | 358 .../graph/v1/AtlasEntityGraphDiscoveryV1.java | 377 .../store/graph/v1/AtlasEntityStoreV1.java | 781 .../store/graph/v1/AtlasEntityStream.java | 88 - .../graph/v1/AtlasEntityStreamForImport.java| 72 - .../store/graph/v1/AtlasEnumDefStoreV1.java | 325 .../store/graph/v1/AtlasGraphUtilsV1.java | 514 - .../graph/v1/AtlasRelationshipDefStoreV1.java | 508 - .../graph/v1/AtlasRelationshipStoreV1.java | 836 - .../store/graph/v1/AtlasStructDefStoreV1.java | 611 -- .../graph/v1/AtlasTypeDefGraphStoreV1.java | 539 -- .../graph/v1/AttributeMutationContext.java | 150 -- .../store/graph/v1/BulkImporterImpl.java| 206 -- .../store/graph/v1/DeleteHandlerV1.java | 30 +- .../store/graph/v1/EntityGraphMapper.java | 1774 - .../store/graph/v1/EntityGraphRetriever.java| 1104 --- .../store/graph/v1/EntityImportStream.java | 34 - .../store/graph/v1/EntityMutationContext.java | 155 -- .../repository/store/graph/v1/EntityStream.java | 31 - .../store/graph/v1/IDBasedEntityResolver.java | 83 - .../store/graph/v1/InMemoryMapEntityStream.java | 55 - .../store/graph/v1/InstanceGraphMapper.java | 32 - .../store/graph/v1/SoftDeleteHandlerV1.java | 15 +- .../graph/v1/UniqAttrBasedEntityResolver.java | 75 - .../store/graph/v2/AtlasAbstractDefStoreV2.java | 112 ++ .../graph/v2/AtlasClassificationDefStoreV2.java | 364 .../graph/v2/AtlasEntityChangeNotifier.java | 478 + .../store/graph/v2/AtlasEntityDefStoreV2.java | 358 .../graph/v2/AtlasEntityGraphDiscoveryV2.java | 377 .../store/graph/v2/AtlasEntityStoreV2.java | 780 .../store/graph/v2/AtlasEntityStream.java | 88 + .../graph/v2/AtlasEntityStreamForImport.java| 72 + .../store/graph/v2/AtlasEnumDefStoreV2.java | 325 .../store/graph/v2/AtlasGraphUtilsV2.java | 514 + .../graph/v2/AtlasRelationshipDefStoreV2.java | 508 + .../graph/v2/AtlasRelationshipStoreV2.java | 837 + .../store/graph/v2/AtlasStructDefStoreV2.java | 611 ++ .../graph/v2/AtlasTypeDefGraphStoreV2.java | 539 ++ .../graph/v2/AttributeMutationContext.java | 150 ++ .../store/graph/v2/BulkImporterImpl.java| 206 ++ .../store/graph/v2/EntityGraphMapper.java | 1775 ++ .../store/graph/v2/EntityGraphRetriever.java| 1104 +++ .../store/graph/v2/EntityImportStream.java | 34 + .../store/graph/v2/EntityMutationContext.java | 155
[17/20] atlas git commit: ATLAS-2490: updates to make usage of v1/v2 in class names consistent
http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java -- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java deleted file mode 100644 index b683c6b..000 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java +++ /dev/null @@ -1,836 +0,0 @@ - -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.repository.store.graph.v1; - -import org.apache.atlas.AtlasErrorCode; -import org.apache.atlas.annotation.GraphTransaction; -import org.apache.atlas.exception.AtlasBaseException; -import org.apache.atlas.model.TypeCategory; -import org.apache.atlas.model.instance.AtlasClassification; -import org.apache.atlas.model.instance.AtlasEntity.Status; -import org.apache.atlas.model.instance.AtlasObjectId; -import org.apache.atlas.model.instance.AtlasRelationship; -import org.apache.atlas.model.instance.AtlasRelationship.AtlasRelationshipWithExtInfo; -import org.apache.atlas.model.typedef.AtlasRelationshipDef; -import org.apache.atlas.model.typedef.AtlasRelationshipDef.PropagateTags; -import org.apache.atlas.model.typedef.AtlasRelationshipEndDef; -import org.apache.atlas.repository.Constants; -import org.apache.atlas.repository.RepositoryException; -import org.apache.atlas.repository.graph.GraphHelper; -import org.apache.atlas.repository.graphdb.AtlasEdge; -import org.apache.atlas.repository.graphdb.AtlasEdgeDirection; -import org.apache.atlas.repository.graphdb.AtlasVertex; -import org.apache.atlas.repository.store.graph.AtlasRelationshipStore; -import org.apache.atlas.type.AtlasEntityType; -import org.apache.atlas.type.AtlasRelationshipType; -import org.apache.atlas.type.AtlasStructType.AtlasAttribute; -import org.apache.atlas.type.AtlasTypeRegistry; -import org.apache.atlas.type.AtlasTypeUtil; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.collections.MapUtils; -import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -import javax.inject.Inject; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.UUID; - -import static org.apache.atlas.model.instance.AtlasEntity.Status.ACTIVE; -import static org.apache.atlas.model.instance.AtlasEntity.Status.DELETED; -import static org.apache.atlas.model.typedef.AtlasRelationshipDef.PropagateTags.ONE_TO_TWO; -import static org.apache.atlas.model.typedef.AtlasRelationshipDef.PropagateTags.TWO_TO_ONE; -import static org.apache.atlas.repository.graph.GraphHelper.getBlockedClassificationIds; -import static org.apache.atlas.repository.graph.GraphHelper.getClassificationEntityGuid; -import static org.apache.atlas.repository.graph.GraphHelper.getClassificationName; -import static org.apache.atlas.repository.graph.GraphHelper.getClassificationVertices; -import static org.apache.atlas.repository.graph.GraphHelper.getOutGoingEdgesByLabel; -import static org.apache.atlas.repository.graph.GraphHelper.getPropagateTags; -import static org.apache.atlas.repository.store.graph.v1.AtlasGraphUtilsV1.getIdFromVertex; -import static org.apache.atlas.repository.store.graph.v1.AtlasGraphUtilsV1.getState; -import static org.apache.atlas.repository.store.graph.v1.AtlasGraphUtilsV1.getTypeName; - -@Component -public class AtlasRelationshipStoreV1 implements AtlasRelationshipStore { -private static final Logger LOG = LoggerFactory.getLogger(AtlasRelationshipStoreV1.class); - -private static final Long DEFAULT_RELATIONSHIP_VERSION = 0L; - -private final AtlasTypeRegistry typeRegistry; -private final EntityGraphRetriever entityRetriever; -private final DeleteHandlerV1
[01/20] atlas git commit: ATLAS-2490: updates to make usage of v1/v2 in class names consistent
Repository: atlas Updated Branches: refs/heads/branch-1.0 ff132de0d -> 4823c8ed4 http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java -- diff --git a/webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java b/webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java index f5e555d..91dc230 100644 --- a/webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java +++ b/webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java @@ -25,7 +25,7 @@ import org.apache.atlas.AtlasClient; import org.apache.atlas.AtlasClientV2; import org.apache.atlas.AtlasException; import org.apache.atlas.AtlasServiceException; -import org.apache.atlas.RequestContextV1; +import org.apache.atlas.RequestContext; import org.apache.atlas.ha.HAConfiguration; import org.apache.atlas.kafka.AtlasKafkaMessage; import org.apache.atlas.listener.ActiveStateChangeHandler; @@ -45,8 +45,8 @@ import org.apache.atlas.v1.model.notification.HookNotificationV1.EntityPartialUp import org.apache.atlas.v1.model.notification.HookNotificationV1.EntityUpdateRequest; import org.apache.atlas.repository.converters.AtlasInstanceConverter; import org.apache.atlas.repository.store.graph.AtlasEntityStore; -import org.apache.atlas.repository.store.graph.v1.AtlasEntityStream; -import org.apache.atlas.repository.store.graph.v1.AtlasGraphUtilsV1; +import org.apache.atlas.repository.store.graph.v2.AtlasEntityStream; +import org.apache.atlas.repository.store.graph.v2.AtlasGraphUtilsV2; import org.apache.atlas.service.Service; import org.apache.atlas.type.AtlasEntityType; import org.apache.atlas.type.AtlasTypeRegistry; @@ -55,7 +55,6 @@ import org.apache.atlas.web.filters.AuditFilter; import org.apache.atlas.web.filters.AuditFilter.AuditLog; import org.apache.atlas.web.service.ServiceState; import org.apache.commons.configuration.Configuration; -import org.apache.kafka.common.KafkaException; import org.apache.kafka.common.TopicPartition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -75,7 +74,7 @@ import java.util.concurrent.atomic.AtomicBoolean; */ @Component @Order(4) -@DependsOn(value = {"atlasTypeDefStoreInitializer", "atlasTypeDefGraphStoreV1"}) +@DependsOn(value = {"atlasTypeDefStoreInitializer", "atlasTypeDefGraphStoreV2"}) public class NotificationHookConsumer implements Service, ActiveStateChangeHandler { private static final Logger LOG= LoggerFactory.getLogger(NotificationHookConsumer.class); private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger(NotificationHookConsumer.class); @@ -375,7 +374,7 @@ public class NotificationHookConsumer implements Service, ActiveStateChangeHandl } try { -RequestContextV1 requestContext = RequestContextV1.get(); +RequestContext requestContext = RequestContext.get(); requestContext.setUser(messageUser, null); @@ -406,7 +405,7 @@ public class NotificationHookConsumer implements Service, ActiveStateChangeHandl } AtlasEntityType entityType = typeRegistry.getEntityTypeByName(partialUpdateRequest.getTypeName()); -String guid = AtlasGraphUtilsV1.getGuidByUniqueAttributes(entityType, Collections.singletonMap(partialUpdateRequest.getAttribute(), (Object)partialUpdateRequest.getAttributeValue())); +String guid = AtlasGraphUtilsV2.getGuidByUniqueAttributes(entityType, Collections.singletonMap(partialUpdateRequest.getAttribute(), (Object)partialUpdateRequest.getAttributeValue())); // There should only be one root entity entities.getEntities().get(0).setGuid(guid); @@ -541,7 +540,7 @@ public class NotificationHookConsumer implements Service, ActiveStateChangeHandl return; } } finally { -RequestContextV1.clear(); +RequestContext.clear(); } } http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java -- diff --git a/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java index 27b817c..e5c40d0 100644 --- a/webapp/src/main/java/org/apache/atlas/web/filters/AtlasAuthenticationFilter.java +++
[09/20] atlas git commit: ATLAS-2490: updates to make usage of v1/v2 in class names consistent
http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java -- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java new file mode 100644 index 000..707ea34 --- /dev/null +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java @@ -0,0 +1,1775 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.atlas.repository.store.graph.v2; + + +import org.apache.atlas.AtlasErrorCode; +import org.apache.atlas.RequestContext; +import org.apache.atlas.exception.AtlasBaseException; +import org.apache.atlas.model.TimeBoundary; +import org.apache.atlas.model.TypeCategory; +import org.apache.atlas.model.instance.AtlasClassification; +import org.apache.atlas.model.instance.AtlasEntity; +import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo; +import org.apache.atlas.model.instance.AtlasEntityHeader; +import org.apache.atlas.model.instance.AtlasObjectId; +import org.apache.atlas.model.instance.AtlasRelatedObjectId; +import org.apache.atlas.model.instance.AtlasRelationship; +import org.apache.atlas.model.instance.AtlasStruct; +import org.apache.atlas.model.instance.EntityMutationResponse; +import org.apache.atlas.model.instance.EntityMutations.EntityOperation; +import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef; +import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef.Cardinality; +import org.apache.atlas.repository.Constants; +import org.apache.atlas.repository.RepositoryException; +import org.apache.atlas.repository.converters.AtlasInstanceConverter; +import org.apache.atlas.repository.graph.GraphHelper; +import org.apache.atlas.repository.graphdb.AtlasEdge; +import org.apache.atlas.repository.graphdb.AtlasGraph; +import org.apache.atlas.repository.graphdb.AtlasVertex; +import org.apache.atlas.repository.store.graph.AtlasRelationshipStore; +import org.apache.atlas.repository.store.graph.v1.DeleteHandlerV1; +import org.apache.atlas.type.AtlasArrayType; +import org.apache.atlas.type.AtlasClassificationType; +import org.apache.atlas.type.AtlasEntityType; +import org.apache.atlas.type.AtlasMapType; +import org.apache.atlas.type.AtlasStructType; +import org.apache.atlas.type.AtlasStructType.AtlasAttribute; +import org.apache.atlas.type.AtlasStructType.AtlasAttribute.AtlasRelationshipEdgeDirection; +import org.apache.atlas.type.AtlasType; +import org.apache.atlas.type.AtlasTypeRegistry; +import org.apache.atlas.type.AtlasTypeUtil; +import org.apache.atlas.utils.AtlasJson; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import javax.inject.Inject; +import java.util.*; +import java.util.stream.Collectors; + +import static org.apache.atlas.model.TypeCategory.CLASSIFICATION; +import static org.apache.atlas.model.instance.AtlasEntity.Status.DELETED; +import static org.apache.atlas.model.instance.AtlasRelatedObjectId.KEY_RELATIONSHIP_ATTRIBUTES; +import static org.apache.atlas.model.instance.EntityMutations.EntityOperation.CREATE; +import static org.apache.atlas.model.instance.EntityMutations.EntityOperation.DELETE; +import static org.apache.atlas.model.instance.EntityMutations.EntityOperation.PARTIAL_UPDATE; +import static org.apache.atlas.model.instance.EntityMutations.EntityOperation.UPDATE; +import static org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef.Cardinality.SET; +import static org.apache.atlas.repository.Constants.ATTRIBUTE_KEY_PROPERTY_KEY; +import static org.apache.atlas.repository.Constants.CLASSIFICATION_LABEL; +import static org.apache.atlas.repository.Constants.STATE_PROPERTY_KEY; +import static org.apache.atlas.repository.Constants.TRAIT_NAMES_PROPERTY_KEY; +import static
[19/20] atlas git commit: ATLAS-2490: updates to make usage of v1/v2 in class names consistent
http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java -- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java deleted file mode 100644 index 0e90336..000 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java +++ /dev/null @@ -1,478 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.repository.store.graph.v1; - - -import org.apache.atlas.AtlasErrorCode; -import org.apache.atlas.AtlasException; -import org.apache.atlas.RequestContextV1; -import org.apache.atlas.exception.AtlasBaseException; -import org.apache.atlas.listener.EntityChangeListener; -import org.apache.atlas.listener.EntityChangeListenerV2; -import org.apache.atlas.model.audit.EntityAuditEventV2.EntityAuditActionV2; -import org.apache.atlas.model.glossary.AtlasGlossaryTerm; -import org.apache.atlas.model.instance.AtlasClassification; -import org.apache.atlas.model.instance.AtlasEntity; - -import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo; -import org.apache.atlas.model.instance.AtlasEntityHeader; -import org.apache.atlas.model.instance.AtlasRelatedObjectId; -import org.apache.atlas.model.instance.EntityMutationResponse; -import org.apache.atlas.model.instance.EntityMutations.EntityOperation; -import org.apache.atlas.type.AtlasEntityType; -import org.apache.atlas.type.AtlasTypeRegistry; -import org.apache.atlas.v1.model.instance.Referenceable; -import org.apache.atlas.v1.model.instance.Struct; -import org.apache.atlas.repository.Constants; -import org.apache.atlas.repository.converters.AtlasInstanceConverter; -import org.apache.atlas.repository.graph.FullTextMapperV2; -import org.apache.atlas.repository.graph.GraphHelper; -import org.apache.atlas.repository.graphdb.AtlasVertex; -import org.apache.atlas.util.AtlasRepositoryConfiguration; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.collections.MapUtils; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -import javax.inject.Inject; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -import static org.apache.atlas.model.audit.EntityAuditEventV2.EntityAuditActionV2.PROPAGATED_CLASSIFICATION_ADD; -import static org.apache.atlas.model.audit.EntityAuditEventV2.EntityAuditActionV2.PROPAGATED_CLASSIFICATION_DELETE; -import static org.apache.atlas.util.AtlasRepositoryConfiguration.isV2EntityNotificationEnabled; - - -@Component -public class AtlasEntityChangeNotifier { -private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityChangeNotifier.class); - -private final Set entityChangeListeners; -private final Set entityChangeListenersV2; -private final AtlasInstanceConverter instanceConverter; -private final FullTextMapperV2fullTextMapperV2; -private final AtlasTypeRegistry atlasTypeRegistry; - - -@Inject -public AtlasEntityChangeNotifier(Set entityChangeListeners, - Set entityChangeListenersV2, - AtlasInstanceConverter instanceConverter, - FullTextMapperV2 fullTextMapperV2, - AtlasTypeRegistry atlasTypeRegistry) { -this.entityChangeListeners = entityChangeListeners; -this.entityChangeListenersV2 = entityChangeListenersV2; -this.instanceConverter = instanceConverter; -this.fullTextMapperV2 = fullTextMapperV2; -this.atlasTypeRegistry = atlasTypeRegistry; -} - -public void onEntitiesMutated(EntityMutationResponse entityMutationResponse, boolean isImport) throws AtlasBaseException { -
[08/20] atlas git commit: ATLAS-2490: updates to make usage of v1/v2 in class names consistent
http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java -- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java new file mode 100644 index 000..d5644f9 --- /dev/null +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java @@ -0,0 +1,1104 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.atlas.repository.store.graph.v2; + +import com.fasterxml.jackson.core.type.TypeReference; +import org.apache.atlas.AtlasErrorCode; +import org.apache.atlas.exception.AtlasBaseException; +import org.apache.atlas.model.TimeBoundary; +import org.apache.atlas.model.glossary.enums.AtlasTermAssignmentStatus; +import org.apache.atlas.model.glossary.relations.AtlasTermAssignmentHeader; +import org.apache.atlas.model.instance.AtlasClassification; +import org.apache.atlas.model.instance.AtlasEntity; +import org.apache.atlas.model.instance.AtlasEntity.AtlasEntitiesWithExtInfo; +import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityExtInfo; +import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo; +import org.apache.atlas.model.instance.AtlasEntityHeader; +import org.apache.atlas.model.instance.AtlasObjectId; +import org.apache.atlas.model.instance.AtlasRelatedObjectId; +import org.apache.atlas.model.instance.AtlasRelationship; +import org.apache.atlas.model.instance.AtlasRelationship.AtlasRelationshipWithExtInfo; +import org.apache.atlas.model.instance.AtlasStruct; +import org.apache.atlas.model.typedef.AtlasRelationshipDef; +import org.apache.atlas.model.typedef.AtlasRelationshipEndDef; +import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef; +import org.apache.atlas.repository.Constants; +import org.apache.atlas.repository.graph.GraphHelper; +import org.apache.atlas.repository.graphdb.AtlasEdge; +import org.apache.atlas.repository.graphdb.AtlasEdgeDirection; +import org.apache.atlas.repository.graphdb.AtlasElement; +import org.apache.atlas.repository.graphdb.AtlasVertex; +import org.apache.atlas.type.AtlasArrayType; +import org.apache.atlas.type.AtlasEntityType; +import org.apache.atlas.type.AtlasMapType; +import org.apache.atlas.type.AtlasRelationshipType; +import org.apache.atlas.type.AtlasStructType; +import org.apache.atlas.type.AtlasStructType.AtlasAttribute; +import org.apache.atlas.type.AtlasType; +import org.apache.atlas.type.AtlasTypeRegistry; +import org.apache.atlas.type.AtlasTypeUtil; +import org.apache.atlas.utils.AtlasJson; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +import static org.apache.atlas.glossary.GlossaryUtils.TERM_ASSIGNMENT_ATTR_CONFIDENCE; +import static org.apache.atlas.glossary.GlossaryUtils.TERM_ASSIGNMENT_ATTR_CREATED_BY; +import static org.apache.atlas.glossary.GlossaryUtils.TERM_ASSIGNMENT_ATTR_DESCRIPTION; +import static org.apache.atlas.glossary.GlossaryUtils.TERM_ASSIGNMENT_ATTR_EXPRESSION; +import static org.apache.atlas.glossary.GlossaryUtils.TERM_ASSIGNMENT_ATTR_SOURCE; +import static org.apache.atlas.glossary.GlossaryUtils.TERM_ASSIGNMENT_ATTR_STATUS; +import static org.apache.atlas.glossary.GlossaryUtils.TERM_ASSIGNMENT_ATTR_STEWARD; +import static org.apache.atlas.model.typedef.AtlasBaseTypeDef.ATLAS_TYPE_BIGDECIMAL; +import static org.apache.atlas.model.typedef.AtlasBaseTypeDef.ATLAS_TYPE_BIGINTEGER; +import static org.apache.atlas.model.typedef.AtlasBaseTypeDef.ATLAS_TYPE_BOOLEAN; +import static
[04/20] atlas git commit: ATLAS-2490: updates to make usage of v1/v2 in class names consistent
http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasComplexAttributesTest.java -- diff --git a/repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasComplexAttributesTest.java b/repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasComplexAttributesTest.java new file mode 100644 index 000..ebd5f0f --- /dev/null +++ b/repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasComplexAttributesTest.java @@ -0,0 +1,512 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.atlas.repository.store.graph.v2; + +import org.apache.atlas.TestModules; +import org.apache.atlas.TestUtilsV2; +import org.apache.atlas.model.instance.AtlasEntity; +import org.apache.atlas.model.instance.AtlasEntity.AtlasEntitiesWithExtInfo; +import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo; +import org.apache.atlas.model.instance.AtlasEntityHeader; +import org.apache.atlas.model.instance.AtlasObjectId; +import org.apache.atlas.model.instance.AtlasStruct; +import org.apache.atlas.model.instance.EntityMutationResponse; +import org.apache.atlas.model.typedef.AtlasTypesDef; +import org.apache.atlas.repository.graphdb.AtlasEdge; +import org.apache.atlas.repository.graphdb.AtlasEdgeDirection; +import org.apache.atlas.repository.graphdb.AtlasVertex; +import org.apache.commons.lang.time.DateUtils; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Guice; +import org.testng.annotations.Test; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import static org.apache.atlas.TestUtilsV2.ENTITY_TYPE; +import static org.apache.atlas.TestUtilsV2.ENTITY_TYPE_MAP; +import static org.apache.atlas.TestUtilsV2.ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR; +import static org.apache.atlas.TestUtilsV2.ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR_DELETE; +import static org.apache.atlas.TestUtilsV2.NAME; +import static org.apache.atlas.repository.graph.GraphHelper.getStatus; +import static org.apache.atlas.type.AtlasTypeUtil.getAtlasObjectId; +import static org.testng.Assert.assertNull; +import static org.testng.AssertJUnit.assertEquals; + +@Guice(modules = TestModules.TestOnlyModule.class) +public class AtlasComplexAttributesTest extends AtlasEntityTestBase { +private AtlasEntityWithExtInfo complexCollectionAttrEntity; +private AtlasEntityWithExtInfo complexCollectionAttrEntityForDelete; +private AtlasEntityWithExtInfo mapAttributesEntity; + +@BeforeClass +public void setUp() throws Exception { +super.setUp(); + +// create typeDefs +AtlasTypesDef[] testTypesDefs = new AtlasTypesDef[] { TestUtilsV2.defineTypeWithComplexCollectionAttributes(), + TestUtilsV2.defineTypeWithMapAttributes() }; +createTypesDef(testTypesDefs); + +// create entity +complexCollectionAttrEntity = TestUtilsV2.createComplexCollectionAttrEntity(); +complexCollectionAttrEntityForDelete = TestUtilsV2.createComplexCollectionAttrEntity(); +mapAttributesEntity = TestUtilsV2.createMapAttrEntity(); +} + +@Test +public void testCreateComplexAttributeEntity() throws Exception { +init(); + +EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(complexCollectionAttrEntity), false); +AtlasEntityHeader entityCreated = response.getFirstCreatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); + +validateEntity(complexCollectionAttrEntity, getEntityFromStore(entityCreated)); +} + +@Test +public void testPrimitiveMapAttributes() throws Exception { +init(); + +EntityMutationResponse response= entityStore.createOrUpdate(new AtlasEntityStream(mapAttributesEntity), false); +AtlasEntityHeader entityCreated =
[18/20] atlas git commit: ATLAS-2490: updates to make usage of v1/v2 in class names consistent
http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStream.java -- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStream.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStream.java deleted file mode 100644 index d6d6272..000 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStream.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.repository.store.graph.v1; - -import org.apache.atlas.model.instance.AtlasEntity; -import org.apache.atlas.model.instance.AtlasEntity.AtlasEntitiesWithExtInfo; -import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo; - -import java.util.Iterator; - -public class AtlasEntityStream implements EntityStream { -protected final AtlasEntitiesWithExtInfo entitiesWithExtInfo; -protected final EntityStream entityStream; -private Iteratoriterator; - - -public AtlasEntityStream(AtlasEntity entity) { -this(new AtlasEntitiesWithExtInfo(entity)); -} - -public AtlasEntityStream(AtlasEntityWithExtInfo entityWithExtInfo) { -this(new AtlasEntitiesWithExtInfo(entityWithExtInfo)); -} - -public AtlasEntityStream(AtlasEntitiesWithExtInfo entitiesWithExtInfo) { -this.entitiesWithExtInfo = entitiesWithExtInfo; -this.iterator= this.entitiesWithExtInfo.getEntities().iterator(); -this.entityStream= null; -} - -public AtlasEntityStream(AtlasEntity entity, EntityStream entityStream) { -this.entitiesWithExtInfo = new AtlasEntitiesWithExtInfo(entity); -this.iterator= this.entitiesWithExtInfo.getEntities().iterator(); -this.entityStream= entityStream; -} - -public AtlasEntityStream(AtlasEntityWithExtInfo entityWithExtInfo, EntityStream entityStream) { -this.entitiesWithExtInfo = new AtlasEntitiesWithExtInfo(entityWithExtInfo); -this.iterator= this.entitiesWithExtInfo.getEntities().iterator(); -this.entityStream= entityStream; -} - -@Override -public boolean hasNext() { -return iterator.hasNext(); -} - -@Override -public AtlasEntity next() { -return iterator.hasNext() ? iterator.next() : null; -} - -@Override -public void reset() { -this.iterator = entitiesWithExtInfo.getEntities().iterator(); -} - -@Override -public AtlasEntity getByGuid(String guid) { -return entityStream != null ? entityStream.getByGuid(guid) : entitiesWithExtInfo.getEntity(guid); -} - -@Override -public String toString() { -StringBuffer sb = new StringBuffer("AtlasEntityStream{"); - -sb.append("entitiesWithExtInfo=").append(entitiesWithExtInfo); -sb.append(", iterator=").append(iterator); -sb.append('}'); - -return sb.toString(); -} -} http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStreamForImport.java -- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStreamForImport.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStreamForImport.java deleted file mode 100644 index 90ae15d..000 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStreamForImport.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the
[02/20] atlas git commit: ATLAS-2490: updates to make usage of v1/v2 in class names consistent
http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipStoreSoftDeleteV2Test.java -- diff --git a/repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipStoreSoftDeleteV2Test.java b/repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipStoreSoftDeleteV2Test.java new file mode 100644 index 000..82b75da --- /dev/null +++ b/repository/src/test/java/org/apache/atlas/repository/store/graph/v2/AtlasRelationshipStoreSoftDeleteV2Test.java @@ -0,0 +1,117 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.atlas.repository.store.graph.v2; + +import com.google.common.collect.ImmutableList; +import org.apache.atlas.TestModules; +import org.apache.atlas.model.instance.AtlasEntity; +import org.apache.atlas.model.instance.AtlasObjectId; +import org.apache.atlas.repository.store.graph.v1.SoftDeleteHandlerV1; +import org.testng.annotations.Guice; + +import java.util.List; + +import static org.apache.atlas.type.AtlasTypeUtil.getAtlasObjectId; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; + + +/** + * Inverse reference update test with {@link SoftDeleteHandlerV1} + */ +@Guice(modules = TestModules.SoftDeleteModule.class) +public class AtlasRelationshipStoreSoftDeleteV2Test extends AtlasRelationshipStoreV2Test { + +@Override +protected void verifyRelationshipAttributeUpdate_NonComposite_OneToMany(AtlasEntity jane) throws Exception { +// Max is still in the subordinates list, as the edge still exists with state DELETED +verifyRelationshipAttributeList(jane, "subordinates", ImmutableList.of(employeeNameIdMap.get("John"), employeeNameIdMap.get("Max"))); +} + +@Override +protected void verifyRelationshipAttributeUpdate_NonComposite_ManyToOne(AtlasEntity a1, AtlasEntity a2, + AtlasEntity a3, AtlasEntity b) { + +verifyRelationshipAttributeValue(a1, "oneB", b.getGuid()); + +verifyRelationshipAttributeValue(a2, "oneB", b.getGuid()); + +verifyRelationshipAttributeList(b, "manyA", ImmutableList.of(getAtlasObjectId(a1), getAtlasObjectId(a2), getAtlasObjectId(a3))); +} + +@Override +protected void verifyRelationshipAttributeUpdate_NonComposite_OneToOne(AtlasEntity a1, AtlasEntity b) { +verifyRelationshipAttributeValue(a1, "b", b.getGuid()); +} + +@Override +protected void verifyRelationshipAttributeUpdate_ManyToMany_Friends(AtlasEntity max, AtlasEntity julius, AtlasEntity mike, AtlasEntity john) throws Exception { +AtlasObjectId johnId = employeeNameIdMap.get("John"); +AtlasObjectId mikeId = employeeNameIdMap.get("Mike"); +AtlasObjectId juliusId = employeeNameIdMap.get("Julius"); +AtlasObjectId maxId= employeeNameIdMap.get("Max"); + +// Max's updated friends: [Julius, John, Mike(soft deleted)] +List maxFriendsIds = toAtlasObjectIds(max.getRelationshipAttribute("friends")); +assertNotNull(maxFriendsIds); +assertEquals(maxFriendsIds.size(), 3); +assertObjectIdsContains(maxFriendsIds, johnId); +assertObjectIdsContains(maxFriendsIds, juliusId); +assertObjectIdsContains(maxFriendsIds, mikeId); + +// Julius's updated friends: [Max] +List juliusFriendsIds = toAtlasObjectIds(julius.getRelationshipAttribute("friends")); +assertNotNull(juliusFriendsIds); +assertEquals(juliusFriendsIds.size(), 1); +assertObjectIdsContains(juliusFriendsIds, maxId); + +// Mike's updated friends: [John, Max(soft deleted)] +List mikeFriendsIds = toAtlasObjectIds(mike.getRelationshipAttribute("friends")); +assertNotNull(mikeFriendsIds); +assertEquals(mikeFriendsIds.size(), 2); +assertObjectIdsContains(mikeFriendsIds, johnId); +assertObjectIdsContains(mikeFriendsIds, maxId); + +// John's updated friends: [Max, Mike] +List johnFriendsIds =
[07/20] atlas git commit: ATLAS-2490: updates to make usage of v1/v2 in class names consistent
http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java -- diff --git a/repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java b/repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java deleted file mode 100644 index 922f7e0..000 --- a/repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasComplexAttributesTest.java +++ /dev/null @@ -1,512 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.atlas.repository.store.graph.v1; - -import org.apache.atlas.TestModules; -import org.apache.atlas.TestUtilsV2; -import org.apache.atlas.model.instance.AtlasEntity; -import org.apache.atlas.model.instance.AtlasEntity.AtlasEntitiesWithExtInfo; -import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo; -import org.apache.atlas.model.instance.AtlasEntityHeader; -import org.apache.atlas.model.instance.AtlasObjectId; -import org.apache.atlas.model.instance.AtlasStruct; -import org.apache.atlas.model.instance.EntityMutationResponse; -import org.apache.atlas.model.typedef.AtlasTypesDef; -import org.apache.atlas.repository.graphdb.AtlasEdge; -import org.apache.atlas.repository.graphdb.AtlasEdgeDirection; -import org.apache.atlas.repository.graphdb.AtlasVertex; -import org.apache.commons.lang.time.DateUtils; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Guice; -import org.testng.annotations.Test; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import static org.apache.atlas.TestUtilsV2.ENTITY_TYPE; -import static org.apache.atlas.TestUtilsV2.ENTITY_TYPE_MAP; -import static org.apache.atlas.TestUtilsV2.ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR; -import static org.apache.atlas.TestUtilsV2.ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR_DELETE; -import static org.apache.atlas.TestUtilsV2.NAME; -import static org.apache.atlas.repository.graph.GraphHelper.getStatus; -import static org.apache.atlas.type.AtlasTypeUtil.getAtlasObjectId; -import static org.testng.Assert.assertNull; -import static org.testng.AssertJUnit.assertEquals; - -@Guice(modules = TestModules.TestOnlyModule.class) -public class AtlasComplexAttributesTest extends AtlasEntityTestBase { -private AtlasEntityWithExtInfo complexCollectionAttrEntity; -private AtlasEntityWithExtInfo complexCollectionAttrEntityForDelete; -private AtlasEntityWithExtInfo mapAttributesEntity; - -@BeforeClass -public void setUp() throws Exception { -super.setUp(); - -// create typeDefs -AtlasTypesDef[] testTypesDefs = new AtlasTypesDef[] { TestUtilsV2.defineTypeWithComplexCollectionAttributes(), - TestUtilsV2.defineTypeWithMapAttributes() }; -createTypesDef(testTypesDefs); - -// create entity -complexCollectionAttrEntity = TestUtilsV2.createComplexCollectionAttrEntity(); -complexCollectionAttrEntityForDelete = TestUtilsV2.createComplexCollectionAttrEntity(); -mapAttributesEntity = TestUtilsV2.createMapAttrEntity(); -} - -@Test -public void testCreateComplexAttributeEntity() throws Exception { -init(); - -EntityMutationResponse response = entityStore.createOrUpdate(new AtlasEntityStream(complexCollectionAttrEntity), false); -AtlasEntityHeader entityCreated = response.getFirstCreatedEntityByTypeName(ENTITY_TYPE_WITH_COMPLEX_COLLECTION_ATTR); - -validateEntity(complexCollectionAttrEntity, getEntityFromStore(entityCreated)); -} - -@Test -public void testPrimitiveMapAttributes() throws Exception { -init(); - -EntityMutationResponse response= entityStore.createOrUpdate(new AtlasEntityStream(mapAttributesEntity), false); -AtlasEntityHeader entityCreated =
[13/20] atlas git commit: ATLAS-2490: updates to make usage of v1/v2 in class names consistent
http://git-wip-us.apache.org/repos/asf/atlas/blob/4823c8ed/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasClassificationDefStoreV2.java -- diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasClassificationDefStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasClassificationDefStoreV2.java new file mode 100644 index 000..4082fde --- /dev/null +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasClassificationDefStoreV2.java @@ -0,0 +1,364 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.atlas.repository.store.graph.v2; + + +import org.apache.atlas.AtlasErrorCode; +import org.apache.atlas.authorize.AtlasPrivilege; +import org.apache.atlas.authorize.AtlasAuthorizationUtils; +import org.apache.atlas.authorize.AtlasTypeAccessRequest; +import org.apache.atlas.exception.AtlasBaseException; +import org.apache.atlas.model.typedef.AtlasClassificationDef; +import org.apache.atlas.repository.Constants; +import org.apache.atlas.repository.graphdb.AtlasVertex; +import org.apache.atlas.type.AtlasClassificationType; +import org.apache.atlas.type.AtlasType; +import org.apache.atlas.type.AtlasTypeRegistry; +import org.apache.atlas.typesystem.types.DataTypes.TypeCategory; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * ClassificationDef store in v1 format. + */ +class AtlasClassificationDefStoreV2 extends AtlasAbstractDefStoreV2 { +private static final Logger LOG = LoggerFactory.getLogger(AtlasClassificationDefStoreV2.class); + +private static final String TRAIT_NAME_REGEX = "[a-zA-Z][a-zA-Z0-9_ .]*"; + +private static final Pattern TRAIT_NAME_PATTERN = Pattern.compile(TRAIT_NAME_REGEX); + +public AtlasClassificationDefStoreV2(AtlasTypeDefGraphStoreV2 typeDefStore, AtlasTypeRegistry typeRegistry) { +super(typeDefStore, typeRegistry); +} + +@Override +public AtlasVertex preCreate(AtlasClassificationDef classificationDef) throws AtlasBaseException { +if (LOG.isDebugEnabled()) { +LOG.debug("==> AtlasClassificationDefStoreV1.preCreate({})", classificationDef); +} + +validateType(classificationDef); + +AtlasType type = typeRegistry.getType(classificationDef.getName()); + +if (type.getTypeCategory() != org.apache.atlas.model.TypeCategory.CLASSIFICATION) { +throw new AtlasBaseException(AtlasErrorCode.TYPE_MATCH_FAILED, classificationDef.getName(), TypeCategory.TRAIT.name()); +} + +AtlasVertex ret = typeDefStore.findTypeVertexByName(classificationDef.getName()); + +if (ret != null) { +throw new AtlasBaseException(AtlasErrorCode.TYPE_ALREADY_EXISTS, classificationDef.getName()); +} + +ret = typeDefStore.createTypeVertex(classificationDef); + +updateVertexPreCreate(classificationDef, (AtlasClassificationType)type, ret); + +if (LOG.isDebugEnabled()) { +LOG.debug("<== AtlasClassificationDefStoreV1.preCreate({}): {}", classificationDef, ret); +} + +return ret; +} + +@Override +public AtlasClassificationDef create(AtlasClassificationDef classificationDef, AtlasVertex preCreateResult) throws AtlasBaseException { +if (LOG.isDebugEnabled()) { +LOG.debug("==> AtlasClassificationDefStoreV1.create({}, {})", classificationDef, preCreateResult); +} + +AtlasAuthorizationUtils.verifyAccess(new AtlasTypeAccessRequest(AtlasPrivilege.TYPE_CREATE, classificationDef), "create classification-def ", classificationDef.getName()); + +AtlasVertex vertex = (preCreateResult == null) ? preCreate(classificationDef) : preCreateResult; + +updateVertexAddReferences(classificationDef, vertex); + +AtlasClassificationDef ret = toClassificationDef(vertex); + +if (LOG.isDebugEnabled()) { +