atlas git commit: ATLAS-2652: Export in HA mode.

2018-05-07 Thread amestry
Repository: atlas
Updated Branches:
  refs/heads/branch-0.8 1500c73b3 -> 373744ced


ATLAS-2652: Export in HA mode.


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/373744ce
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/373744ce
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/373744ce

Branch: refs/heads/branch-0.8
Commit: 373744ced4c01f51590e0c96ca200cd4cc5fad45
Parents: 1500c73
Author: Ashutosh Mestry 
Authored: Mon May 7 14:02:26 2018 -0700
Committer: Ashutosh Mestry 
Committed: Mon May 7 14:03:13 2018 -0700

--
 .../src/main/java/org/apache/atlas/migration/Exporter.java  | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/atlas/blob/373744ce/tools/atlas-migration-exporter/src/main/java/org/apache/atlas/migration/Exporter.java
--
diff --git 
a/tools/atlas-migration-exporter/src/main/java/org/apache/atlas/migration/Exporter.java
 
b/tools/atlas-migration-exporter/src/main/java/org/apache/atlas/migration/Exporter.java
index a5f4bdf..1bda19f 100644
--- 
a/tools/atlas-migration-exporter/src/main/java/org/apache/atlas/migration/Exporter.java
+++ 
b/tools/atlas-migration-exporter/src/main/java/org/apache/atlas/migration/Exporter.java
@@ -21,6 +21,9 @@ package org.apache.atlas.migration;
 import com.thinkaurelius.titan.core.TitanGraph;
 import com.tinkerpop.blueprints.Graph;
 import com.tinkerpop.blueprints.util.io.graphson.GraphSONMode;
+import org.apache.atlas.ApplicationProperties;
+import org.apache.atlas.AtlasException;
+import org.apache.atlas.ha.HAConfiguration;
 import org.apache.atlas.model.typedef.AtlasTypesDef;
 import org.apache.atlas.repository.graphdb.titan0.Titan0GraphDatabase;
 import org.apache.atlas.type.AtlasType;
@@ -97,6 +100,7 @@ public class Exporter {
 
 displayMessage("initializing");
 
+resetHAMode();
 ApplicationContext applicationContext = new 
ClassPathXmlApplicationContext(contextXml);
 
 this.typesDefFileName = typesDefFileName;
@@ -106,6 +110,11 @@ public class Exporter {
 displayMessage("initialized");
 }
 
+private void resetHAMode() throws AtlasException {
+ApplicationProperties applicationProperties = (ApplicationProperties) 
ApplicationProperties.get();
+
applicationProperties.setProperty(HAConfiguration.ATLAS_SERVER_HA_ENABLED_KEY, 
false);
+}
+
 public void perform() throws Exception {
 exportTypes();
 exportData();



atlas git commit: ATLAS-2653: Disallow term self relation

2018-05-07 Thread apoorvnaik
Repository: atlas
Updated Branches:
  refs/heads/master c0bf0b8af -> 3f9fc5c91


ATLAS-2653: Disallow term self relation

Change-Id: I372a02bf8d19b5c6862bd98166cfeef63ceafcf0


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/3f9fc5c9
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/3f9fc5c9
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/3f9fc5c9

Branch: refs/heads/master
Commit: 3f9fc5c919afde048e32a9b6fbcfe3f61a0d1346
Parents: c0bf0b8
Author: apoorvnaik 
Authored: Mon May 7 14:06:35 2018 -0700
Committer: apoorvnaik 
Committed: Mon May 7 18:12:00 2018 -0700

--
 .../java/org/apache/atlas/AtlasErrorCode.java   |  4 ++-
 .../atlas/model/glossary/AtlasGlossaryTerm.java | 38 
 .../atlas/glossary/GlossaryTermUtils.java   | 23 +---
 3 files changed, 45 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/atlas/blob/3f9fc5c9/intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
--
diff --git a/intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 
b/intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
index a6fefd7..9d6d73d 100644
--- a/intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
+++ b/intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
@@ -140,6 +140,8 @@ public enum AtlasErrorCode {
 GLOSSARY_TERM_QUALIFIED_NAME_CANT_BE_DERIVED(400, "ATLAS-400-00-07A", 
"Attributes qualifiedName, displayName & glossary name are missing. Failed to 
derive a unique name for Glossary term"),
 GLOSSARY_CATEGORY_QUALIFIED_NAME_CANT_BE_DERIVED(400, "ATLAS-400-00-07B", 
"Attributes qualifiedName, displayName & glossary name are missing. Failed to 
derive a unique name for Glossary category"),
 RELATIONSHIP_END_IS_NULL(400, "ATLAS-400-00-07D", "Relationship end is 
invalid. Expected {0} but is NULL"),
+INVALID_TERM_RELATION_TO_SELF(400, "ATLAS-400-00-07E", "Invalid Term 
relationship: Term can't have a relationship with self"),
+INVALID_CHILD_CATEGORY_DIFFERENT_GLOSSARY(400, "ATLAS-400-00-07F", 
"Invalid child category relationship: Child category belongs to different 
glossary"),
 
 UNAUTHORIZED_ACCESS(403, "ATLAS-403-00-001", "{0} is not authorized to 
perform {1}"),
 
@@ -188,7 +190,7 @@ public enum AtlasErrorCode {
 CURATOR_FRAMEWORK_UPDATE(500, "ATLAS-500-00-00B", 
"ActiveInstanceState.update resulted in exception."),
 QUICK_START(500, "ATLAS-500-00-00C", "Failed to run QuickStart: {0}"),
 EMBEDDED_SERVER_START(500, "ATLAS-500-00-00D", "EmbeddedServer.Start: 
failed!"),
-STORM_TOPOLOGY_UTIL(500, "ATLAS-500-00-00E", "StormToplogyUtil: {0}"),
+STORM_TOPOLOGY_UTIL(500, "ATLAS-500-00-00E", "StormTopologyUtil: {0}"),
 SQOOP_HOOK(500, "ATLAS-500-00-00F", "SqoopHook: {0}"),
 HIVE_HOOK(500, "ATLAS-500-00-010", "HiveHook: {0}"),
 HIVE_HOOK_METASTORE_BRIDGE(500, "ATLAS-500-00-011", 
"HiveHookMetaStoreBridge: {0}"),

http://git-wip-us.apache.org/repos/asf/atlas/blob/3f9fc5c9/intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java
--
diff --git 
a/intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java 
b/intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java
index 1073e33..7b4543b 100644
--- a/intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java
+++ b/intg/src/main/java/org/apache/atlas/model/glossary/AtlasGlossaryTerm.java
@@ -440,33 +440,43 @@ public class AtlasGlossaryTerm extends 
AtlasGlossaryBaseObject {
 SEE_ALSO("AtlasGlossaryRelatedTerm", "seeAlso"),
 SYNONYMS("AtlasGlossarySynonym", "synonyms"),
 ANTONYMS("AtlasGlossaryAntonym", "antonyms"),
+PREFERRED_TO_TERMS("AtlasGlossaryPreferredTerm", "preferredToTerms", 
true),
 PREFERRED_TERMS("AtlasGlossaryPreferredTerm", "preferredTerms"),
-PREFERRED_TO_TERMS("AtlasGlossaryPreferredTerm", "preferredToTerms"),
-REPLACEMENT_TERMS("AtlasGlossaryReplacementTerm", "replacementTerms"),
+REPLACEMENT_TERMS("AtlasGlossaryReplacementTerm", "replacementTerms", 
true),
 REPLACED_BY("AtlasGlossaryReplacementTerm", "replacedBy"),
-TRANSLATION_TERMS("AtlasGlossaryTranslation", "translationTerms"),
+TRANSLATION_TERMS("AtlasGlossaryTranslation", "translationTerms", 
true),
 TRANSLATED_TERMS("AtlasGlossaryTranslation", "translatedTerms"),
-ISA("AtlasGlossaryIsARelationship", "isA"),
+ISA("AtlasGlossaryIsARelationship", "isA", true),
 CLASSIFIES("AtlasGlossaryIsARelationship", "classifies"),
-VALID_VALUES("AtlasGlossaryValidValue", "validValues"),
+

atlas git commit: ATLAS-2651: Tag Propagation , Deleted Entities : Relationships having Propagation from Deleted entities have tags added to relationship definition.

2018-05-07 Thread sarath
Repository: atlas
Updated Branches:
  refs/heads/master bb82e0df3 -> c0bf0b8af


ATLAS-2651: Tag Propagation , Deleted Entities : Relationships having 
Propagation from Deleted entities have tags added to relationship definition.


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/c0bf0b8a
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/c0bf0b8a
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/c0bf0b8a

Branch: refs/heads/master
Commit: c0bf0b8afa08b73f5052f4a78b0964caac065878
Parents: bb82e0d
Author: Sarath Subramanian 
Authored: Mon May 7 13:53:27 2018 -0700
Committer: Sarath Subramanian 
Committed: Mon May 7 13:53:27 2018 -0700

--
 .../main/java/org/apache/atlas/repository/graph/GraphHelper.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/atlas/blob/c0bf0b8a/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
--
diff --git 
a/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 
b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
index 063eb03..7540b4c 100755
--- 
a/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
@@ -74,8 +74,8 @@ import java.util.Objects;
 import java.util.Set;
 import java.util.UUID;
 
+import static org.apache.atlas.model.instance.AtlasEntity.Status.DELETED;
 import static 
org.apache.atlas.repository.Constants.CLASSIFICATION_EDGE_IS_PROPAGATED_PROPERTY_KEY;
-import static 
org.apache.atlas.repository.Constants.CLASSIFICATION_EDGE_STATE_PROPERTY_KEY;
 import static org.apache.atlas.repository.Constants.CLASSIFICATION_ENTITY_GUID;
 import static org.apache.atlas.repository.Constants.CLASSIFICATION_LABEL;
 import static 
org.apache.atlas.repository.Constants.CLASSIFICATION_EDGE_NAME_PROPERTY_KEY;
@@ -1005,7 +1005,7 @@ public final class GraphHelper {
 public static List getClassificationVertices(AtlasEdge edge) {
 List ret = new ArrayList<>();
 
-if (edge != null) {
+if (edge != null && getStatus(edge) != DELETED) {
 PropagateTags propagateTags = getPropagateTags(edge);
 AtlasVertex   outVertex = edge.getOutVertex();
 AtlasVertex   inVertex  = edge.getInVertex();



atlas git commit: ATLAS-2565: Remove REST API to disable propagated classification in entity

2018-05-07 Thread sarath
Repository: atlas
Updated Branches:
  refs/heads/master 880ea4b69 -> bb82e0df3


ATLAS-2565: Remove REST API to disable propagated classification in entity


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/bb82e0df
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/bb82e0df
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/bb82e0df

Branch: refs/heads/master
Commit: bb82e0df3e6aa613b4ded0f6802880f6dfdd4eda
Parents: 880ea4b
Author: Sarath Subramanian 
Authored: Mon May 7 12:20:17 2018 -0700
Committer: Sarath Subramanian 
Committed: Mon May 7 12:20:17 2018 -0700

--
 .../model/instance/AtlasClassification.java |  2 -
 .../atlas/model/instance/AtlasEntity.java   | 19 +---
 .../atlas/repository/graph/GraphHelper.java | 14 --
 .../store/graph/AtlasEntityStore.java   |  2 -
 .../store/graph/v1/AtlasEntityStoreV1.java  | 17 ---
 .../store/graph/v1/DeleteHandlerV1.java | 10 +---
 .../store/graph/v1/EntityGraphMapper.java   | 49 
 .../store/graph/v1/EntityGraphRetriever.java| 16 +--
 .../org/apache/atlas/web/rest/EntityREST.java   | 46 --
 9 files changed, 6 insertions(+), 169 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/atlas/blob/bb82e0df/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java
--
diff --git 
a/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java 
b/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java
index 74f7347..3132379 100644
--- 
a/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java
+++ 
b/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java
@@ -57,8 +57,6 @@ public class AtlasClassification extends AtlasStruct 
implements Serializable {
 private Booleanpropagate   = null;
 private List validityPeriods = null;
 
-public enum PropagationState { ACTIVE, DELETED }
-
 public AtlasClassification() {
 this(null, null);
 }

http://git-wip-us.apache.org/repos/asf/atlas/blob/bb82e0df/intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java
--
diff --git 
a/intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 
b/intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java
index e6a7f19..7f36a10 100644
--- a/intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java
+++ b/intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java
@@ -82,7 +82,6 @@ public class AtlasEntity extends AtlasStruct implements 
Serializable {
 
 private Map relationshipAttributes;
 private List   classifications;
-private List   propagationDisabledClassifications;
 private List meanings;
 
 @JsonIgnore
@@ -166,7 +165,6 @@ public class AtlasEntity extends AtlasStruct implements 
Serializable {
 setUpdateTime(other.getUpdateTime());
 setVersion(other.getVersion());
 setClassifications(other.getClassifications());
-
setPropagationDisabledClassifications(other.getPropagationDisabledClassifications());
 }
 }
 
@@ -261,14 +259,6 @@ public class AtlasEntity extends AtlasStruct implements 
Serializable {
 
 public void setClassifications(List classifications) 
{ this.classifications = classifications; }
 
-public List getPropagationDisabledClassifications() {
-return propagationDisabledClassifications;
-}
-
-public void 
setPropagationDisabledClassifications(List 
propagationDisabledClassifications) {
-this.propagationDisabledClassifications = 
propagationDisabledClassifications;
-}
-
 public void addClassifications(List classifications) {
 List c = this.classifications;
 
@@ -307,7 +297,6 @@ public class AtlasEntity extends AtlasStruct implements 
Serializable {
 setCreateTime(null);
 setUpdateTime(null);
 setClassifications(null);
-setPropagationDisabledClassifications(null);
 setMeanings(null);
 }
 
@@ -336,9 +325,6 @@ public class AtlasEntity extends AtlasStruct implements 
Serializable {
 sb.append(", classifications=[");
 AtlasBaseTypeDef.dumpObjects(classifications, sb);
 sb.append(']');
-sb.append(", propagationDisabledClassifications=[");
-AtlasBaseTypeDef.dumpObjects(propagationDisabledClassifications, sb);
-sb.append(']');
 sb.append(", meanings=[");
 AtlasBaseTypeDef.dumpObjects(meanings, sb);
 sb.append(']');
@@ -362,14 +348,13 @@ 

atlas git commit: ATLAS-2647: updated documentation on notification, hooks and basic-search

2018-05-07 Thread madhan
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 
Authored: Sat May 5 17:07:02 2018 -0700
Committer: Madhan Neethiraj 
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 --git a/docs/src/site/resources/images/fix.gif