atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject incubator-atlas git commit: ATLAS-1617: Update error code pattern to ATLAS-nnn-mm-xxx
Date Thu, 02 Mar 2017 20:30:48 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master 11e220223 -> 82142995f


ATLAS-1617: Update error code pattern to ATLAS-nnn-mm-xxx

Signed-off-by: Madhan Neethiraj <madhan@apache.org>


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

Branch: refs/heads/master
Commit: 82142995fbdd946109a54af612555679ab60043a
Parents: 11e2202
Author: apoorvnaik <anaik@hortonworks.com>
Authored: Thu Mar 2 12:26:41 2017 -0800
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Thu Mar 2 12:26:50 2017 -0800

----------------------------------------------------------------------
 .../java/org/apache/atlas/AtlasBaseClient.java  |   1 -
 .../java/org/apache/atlas/AtlasErrorCode.java   | 140 +++++++++----------
 2 files changed, 70 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/82142995/client/src/main/java/org/apache/atlas/AtlasBaseClient.java
----------------------------------------------------------------------
diff --git a/client/src/main/java/org/apache/atlas/AtlasBaseClient.java b/client/src/main/java/org/apache/atlas/AtlasBaseClient.java
index 38bf233..3bdddd9 100644
--- a/client/src/main/java/org/apache/atlas/AtlasBaseClient.java
+++ b/client/src/main/java/org/apache/atlas/AtlasBaseClient.java
@@ -160,7 +160,6 @@ public abstract class AtlasBaseClient {
         // Enable POJO mapping feature
         config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
         int readTimeout = configuration.getInt("atlas.client.readTimeoutMSecs", 60000);
-        ;
         int connectTimeout = configuration.getInt("atlas.client.connectTimeoutMSecs", 60000);
         if (configuration.getBoolean(TLS_ENABLED, false)) {
             // create an SSL properties configuration if one doesn't exist.  SSLFactory expects
a file, so forced

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/82142995/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 8dac620..69c201d 100644
--- a/intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
+++ b/intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
@@ -25,76 +25,76 @@ import java.text.MessageFormat;
 import java.util.Arrays;
 
 public enum AtlasErrorCode {
-    NO_SEARCH_RESULTS(204, "ATLAS2041E", "Given search filter {0} did not yield any results"),
-
-    UNKNOWN_TYPE(400, "ATLAS4001E", "Unknown type {0} for {1}.{2}"),
-    CIRCULAR_REFERENCE(400, "ATLAS4002E", "{0}: invalid supertypes - circular reference back
to self {1}"),
-    INCOMPATIBLE_SUPERTYPE(400, "ATLAS4003E", "{0}: incompatible supertype {1}"),
-    UNKNOWN_CONSTRAINT(400, "ATLAS4004E", "{0}.{1}: unknown constraint {1}"),
-    UNSUPPORTED_CONSTRAINT(400, "ATLAS4005E", "{0}.{1} : {2} constraint not supported"),
-    CONSTRAINT_NOT_SATISFIED(400, "ATLAS4006E", "{0}.{1} : {2} incompatible attribute type
{3}"),
-    CONSTRAINT_MISSING_PARAMS(400, "ATLAS4007E", "{0}.{1} : invalid constraint. missing parameter
{2} in {3}. params={4}"),
-    CONSTRAINT_NOT_EXIST(400, "ATLAS4008E", "{0}.{1} : invalid constraint. {2} {3}.{4} does
not exist"),
-    CONSTRAINT_NOT_MATCHED(400, "ATLAS4009E", "{0}.{1} : invalid constraint. Data type of
{2} {3}.{4} should be {5}, but found {6}"),
-    UNKNOWN_TYPENAME(400, "ATLAS40010E", "{0}: Unknown typename"),
-    CONSTRAINT_NOT_SUPPORTED_ON_MAP_TYPE(400, "ATLAS40011E", "{0}.{1} : constraints not supported
on map type {2}"),
-    CANNOT_ADD_MANDATORY_ATTRIBUTE(400, "ATLAS40012E", "{0}.{1} : can not add mandatory attribute"),
-    ATTRIBUTE_DELETION_NOT_SUPPORTED(400, "ATLAS40013E", "{0}.{1} : attribute delete not
supported"),
-    SUPERTYPE_REMOVAL_NOT_SUPPORTED(400, "ATLAS40014E", "superType remove not supported"),
-    UNEXPECTED_TYPE(400, "ATLAS40015E", "expected type {0}; found {1}"),
-    TYPE_MATCH_FAILED(400, "ATLAS40016E", "Given type {0} doesn't match {1}"),
-    INVALID_TYPE_DEFINITION(400, "ATLAS40017E", "Invalid type definition {0}"),
-    INVALID_ATTRIBUTE_TYPE_FOR_CARDINALITY(400, "ATLAS40018E", "Cardinality of attribute
{0}.{1} requires a list or set type"),
-    ATTRIBUTE_UNIQUE_INVALID(400, "ATLAS40019E", "Type {0} with unique attribute {1} does
not exist"),
-    TYPE_NAME_INVALID(400, "ATLAS40020E", "Type {0} with name {1} does not exist"),
-    TYPE_CATEGORY_INVALID(400, "ATLAS40021E", "Type Category {0} is invalid"),
-    PATCH_NOT_APPLICABLE_FOR_TYPE(400, "ATLAS40022E", "{0} - invalid patch for type {1}"),
-    PATCH_FOR_UNKNOWN_TYPE(400, "ATLAS40023E", "{0} - patch references unknown type {1}"),
-    PATCH_INVALID_DATA(400, "ATLAS40024E", "{0} - patch data is invalid for type {1}"),
-    TYPE_NAME_INVALID_FORMAT(400, "ATLAS40025E", "{0}: invalid name for {1}.  Names must
consist of a letter followed by a sequence of letter, number, or '_' characters"),
-    INVALID_PARAMETERS(400, "ATLAS40025E", "invalid parameters: {0}"),
-    CLASSIFICATION_ALREADY_ASSOCIATED(400, "ATLAS40026E", "instance {0} already is associated
with classification {1}"),
-    CONSTRAINT_INVERSE_REF_ATTRIBUTE_INVALID_TYPE(400, "ATLAS40027E", "{0}.{1}: invalid {2}
constraint. Attribute {3} is not an entity type"),
-    CONSTRAINT_INVERSE_REF_INVERSE_ATTRIBUTE_NON_EXISTING(400, "ATLAS40028E", "{0}.{1}: invalid
{2} constraint. Inverse attribute {3}.{4} does not exist"),
-    CONSTRAINT_INVERSE_REF_INVERSE_ATTRIBUTE_INVALID_TYPE(400, "ATLAS40029E", "{0}.{1}: invalid
{2} constraint. Inverse attribute {3}.{4} is not an entity type"),
-    CONSTRAINT_OWNED_REF_ATTRIBUTE_INVALID_TYPE(400, "ATLAS40030E", "{0}.{1}: invalid {2}
constraint. Attribute {3} is not an entity type"),
-    CANNOT_MAP_ATTRIBUTE(400, "ATLAS40031E", "cannot map attribute: {0} of type: {1} from
vertex"),
-    INVALID_OBJECT_ID(400, "ATLAS40032E", "ObjectId is not valid {0}"),
-    UNRESOLVED_REFERENCES_FOUND(400, "ATLAS40033E", "Unresolved references: byId={0}; byUniqueAttributes={1}"),
-    UNKNOWN_ATTRIBUTE(400, "ATLAS40034E", "Attribute {0} not found for type {1}"),
-    SYSTEM_TYPE(400, "ATLAS40035E", "{0} is a System-type"),
-    INVALID_STRUCT_VALUE(400, "ATLAS40036E", "not a valid struct value {0}"),
-    INSTANCE_LINEAGE_INVALID_PARAMS(400, "ATLAS40037E", "Invalid lineage query parameters
passed {0}: {1}"),
-    ATTRIBUTE_UPDATE_NOT_SUPPORTED(400, "ATLAS40038E", "{0}.{1} : attribute update not supported"),
-    INVALID_VALUE(400, "ATLAS40039E", "invalid value: {0}"),
-
-    // All Not found enums go here
-    TYPE_NAME_NOT_FOUND(404, "ATLAS4041E", "Given typename {0} was invalid"),
-    TYPE_GUID_NOT_FOUND(404, "ATLAS4042E", "Given type guid {0} was invalid"),
-    EMPTY_RESULTS(404, "ATLAS4044E", "No result found for {0}"),
-    INSTANCE_GUID_NOT_FOUND(404, "ATLAS4045E", "Given instance guid {0} is invalid/not found"),
-    INSTANCE_LINEAGE_QUERY_FAILED(404, "ATLAS4047E", "Instance lineage query failed {0}"),
-    INSTANCE_CRUD_INVALID_PARAMS(400, "ATLAS4049E", "Invalid instance creation/updation parameters
passed : {0}"),
-    CLASSIFICATION_NOT_FOUND(404, "ATLAS4048E", "Given classification {0} was invalid"),
-
-    INSTANCE_BY_UNIQUE_ATTRIBUTE_NOT_FOUND(404, "ATLAS40410E", "Instance {0} with unique
attribute {1} does not exist"),
-    REFERENCED_ENTITY_NOT_FOUND(404, "ATLAS40411E", "Referenced entity {0} is not found"),
-    // All data conflict errors go here
-    TYPE_ALREADY_EXISTS(409, "ATLAS4091E", "Given type {0} already exists"),
-    TYPE_HAS_REFERENCES(409, "ATLAS4092E", "Given type {0} has references"),
-    INSTANCE_ALREADY_EXISTS(409, "ATLAS4093E", "Given entity {0} already exists"),
-
-    // All internal errors go here
-    INTERNAL_ERROR(500, "ATLAS5001E", "Internal server error {0}"),
-    INDEX_CREATION_FAILED(500, "ATLAS5002E", "Index creation failed for {0}"),
-    INDEX_ROLLBACK_FAILED(500, "ATLAS5003E", "Index rollback failed for {0}"),
-    DISCOVERY_QUERY_FAILED(500, "ATLAS5004E", "Discovery query failed {0}"),
-    FAILED_TO_OBTAIN_TYPE_UPDATE_LOCK(500, "ATLAS5005E", "Failed to get the lock; another
type update might be in progress. Please try again"),
-    FAILED_TO_OBTAIN_IMPORT_EXPORT_LOCK(500, "ATLAS5006E", "Another import or export is in
progress. Please try again"),
-    NOTIFICATION_FAILED(500, "ATLAS5007E", "Failed to notify for change {0}"),
-    GREMLIN_GROOVY_SCRIPT_ENGINE_FAILED(500, "ATLAS5008E", "scriptEngine cannot be initialized
for: {0}"),
-    JSON_ERROR_OBJECT_MAPPER_NULL_RETURNED(500, "ATLAS5009E", "ObjectMapper.readValue returned
NULL for class: {0}"),
-    GREMLIN_SCRIPT_EXECUTION_FAILED(500, "ATLAS5010E", "Script execution failed for: {0}");
+    NO_SEARCH_RESULTS(204, "ATLAS-204-00-001", "Given search filter {0} did not yield any
results"),
+
+    UNKNOWN_TYPE(400, "ATLAS-400-00-001", "Unknown type {0} for {1}.{2}"),
+    CIRCULAR_REFERENCE(400, "ATLAS-400-00-002", "{0}: invalid supertypes - circular reference
back to self {1}"),
+    INCOMPATIBLE_SUPERTYPE(400, "ATLAS-400-00-003", "{0}: incompatible supertype {1}"),
+    UNKNOWN_CONSTRAINT(400, "ATLAS-400-00-004", "{0}.{1}: unknown constraint {1}"),
+    UNSUPPORTED_CONSTRAINT(400, "ATLAS-400-00-005", "{0}.{1} : {2} constraint not supported"),
+    CONSTRAINT_NOT_SATISFIED(400, "ATLAS-400-00-006", "{0}.{1} : {2} incompatible attribute
type {3}"),
+    CONSTRAINT_MISSING_PARAMS(400, "ATLAS-400-00-007", "{0}.{1} : invalid constraint. missing
parameter {2} in {3}. params={4}"),
+    CONSTRAINT_NOT_EXIST(400, "ATLAS-400-00-008", "{0}.{1} : invalid constraint. {2} {3}.{4}
does not exist"),
+    CONSTRAINT_NOT_MATCHED(400, "ATLAS-400-00-009", "{0}.{1} : invalid constraint. Data type
of {2} {3}.{4} should be {5}, but found {6}"),
+    UNKNOWN_TYPENAME(400, "ATLAS-400-00-00A", "{0}: Unknown typename"),
+    CONSTRAINT_NOT_SUPPORTED_ON_MAP_TYPE(400, "ATLAS-400-00-00B", "{0}.{1} : constraints
not supported on map type {2}"),
+    CANNOT_ADD_MANDATORY_ATTRIBUTE(400, "ATLAS-400-00-00C", "{0}.{1} : can not add mandatory
attribute"),
+    ATTRIBUTE_DELETION_NOT_SUPPORTED(400, "ATLAS-400-00-00D", "{0}.{1} : attribute delete
not supported"),
+    SUPERTYPE_REMOVAL_NOT_SUPPORTED(400, "ATLAS-400-00-00E", "superType remove not supported"),
+    UNEXPECTED_TYPE(400, "ATLAS-400-00-00F", "expected type {0}; found {1}"),
+    TYPE_MATCH_FAILED(400, "ATLAS-400-00-010", "Given type {0} doesn't match {1}"),
+    INVALID_TYPE_DEFINITION(400, "ATLAS-400-00-011", "Invalid type definition {0}"),
+    INVALID_ATTRIBUTE_TYPE_FOR_CARDINALITY(400, "ATLAS-400-00-012", "Cardinality of attribute
{0}.{1} requires a list or set type"),
+    ATTRIBUTE_UNIQUE_INVALID(400, "ATLAS-400-00-013", "Type {0} with unique attribute {1}
does not exist"),
+    TYPE_NAME_INVALID(400, "ATLAS-400-00-014", "Type {0} with name {1} does not exist"),
+    TYPE_CATEGORY_INVALID(400, "ATLAS-400-00-015", "Type Category {0} is invalid"),
+    PATCH_NOT_APPLICABLE_FOR_TYPE(400, "ATLAS-400-00-016", "{0} - invalid patch for type
{1}"),
+    PATCH_FOR_UNKNOWN_TYPE(400, "ATLAS-400-00-017", "{0} - patch references unknown type
{1}"),
+    PATCH_INVALID_DATA(400, "ATLAS-400-00-018", "{0} - patch data is invalid for type {1}"),
+    TYPE_NAME_INVALID_FORMAT(400, "ATLAS-400-00-019", "{0}: invalid name for {1}.  Names
must consist of a letter followed by a sequence of letter, number, or '_' characters"),
+    INVALID_PARAMETERS(400, "ATLAS-400-00-01A", "invalid parameters: {0}"),
+    CLASSIFICATION_ALREADY_ASSOCIATED(400, "ATLAS-400-00-01B", "instance {0} already is associated
with classification {1}"),
+    CONSTRAINT_INVERSE_REF_ATTRIBUTE_INVALID_TYPE(400, "ATLAS-400-00-01C", "{0}.{1}: invalid
{2} constraint. Attribute {3} is not an entity type"),
+    CONSTRAINT_INVERSE_REF_INVERSE_ATTRIBUTE_NON_EXISTING(400, "ATLAS-400-00-01D", "{0}.{1}:
invalid {2} constraint. Inverse attribute {3}.{4} does not exist"),
+    CONSTRAINT_INVERSE_REF_INVERSE_ATTRIBUTE_INVALID_TYPE(400, "ATLAS-400-00-01E", "{0}.{1}:
invalid {2} constraint. Inverse attribute {3}.{4} is not an entity type"),
+    CONSTRAINT_OWNED_REF_ATTRIBUTE_INVALID_TYPE(400, "ATLAS-400-00-01F", "{0}.{1}: invalid
{2} constraint. Attribute {3} is not an entity type"),
+    CANNOT_MAP_ATTRIBUTE(400, "ATLAS-400-00-020", "cannot map attribute: {0} of type: {1}
from vertex"),
+    INVALID_OBJECT_ID(400, "ATLAS-400-00-021", "ObjectId is not valid {0}"),
+    UNRESOLVED_REFERENCES_FOUND(400, "ATLAS-400-00-022", "Unresolved references: byId={0};
byUniqueAttributes={1}"),
+    UNKNOWN_ATTRIBUTE(400, "ATLAS-400-00-023", "Attribute {0} not found for type {1}"),
+    SYSTEM_TYPE(400, "ATLAS-400-00-024", "{0} is a System-type"),
+    INVALID_STRUCT_VALUE(400, "ATLAS-400-00-025", "not a valid struct value {0}"),
+    INSTANCE_LINEAGE_INVALID_PARAMS(400, "ATLAS-400-00-026", "Invalid lineage query parameters
passed {0}: {1}"),
+    ATTRIBUTE_UPDATE_NOT_SUPPORTED(400, "ATLAS-400-00-027", "{0}.{1} : attribute update not
supported"),
+	INVALID_VALUE(400, "ATLAS-400-00-028", "invalid value: {0}"),
+
+     // All Not found enums go here
+    TYPE_NAME_NOT_FOUND(404, "ATLAS-404-00-001", "Given typename {0} was invalid"),
+    TYPE_GUID_NOT_FOUND(404, "ATLAS-404-00-002", "Given type guid {0} was invalid"),
+    EMPTY_RESULTS(404, "ATLAS-404-00-004", "No result found for {0}"),
+    INSTANCE_GUID_NOT_FOUND(404, "ATLAS-404-00-005", "Given instance guid {0} is invalid/not
found"),
+    INSTANCE_LINEAGE_QUERY_FAILED(404, "ATLAS-404-00-006", "Instance lineage query failed
{0}"),
+    INSTANCE_CRUD_INVALID_PARAMS(404, "ATLAS-404-00-007", "Invalid instance creation/updation
parameters passed : {0}"),
+    CLASSIFICATION_NOT_FOUND(404, "ATLAS-404-00-008", "Given classification {0} was invalid"),
+    INSTANCE_BY_UNIQUE_ATTRIBUTE_NOT_FOUND(404, "ATLAS-404-00-009", "Instance {0} with unique
attribute {1} does not exist"),
+    REFERENCED_ENTITY_NOT_FOUND(404, "ATLAS-404-00-00A", "Referenced entity {0} is not found"),
+
+     // All data conflict errors go here
+    TYPE_ALREADY_EXISTS(409, "ATLAS-409-00-001", "Given type {0} already exists"),
+    TYPE_HAS_REFERENCES(409, "ATLAS-409-00-002", "Given type {0} has references"),
+    INSTANCE_ALREADY_EXISTS(409, "ATLAS-409-00-003", "Given entity {0} already exists"),
+
+     // All internal errors go here
+    INTERNAL_ERROR(500, "ATLAS-500-00-001", "Internal server error {0}"),
+    INDEX_CREATION_FAILED(500, "ATLAS-500-00-002", "Index creation failed for {0}"),
+    INDEX_ROLLBACK_FAILED(500, "ATLAS-500-00-003", "Index rollback failed for {0}"),
+    DISCOVERY_QUERY_FAILED(500, "ATLAS-500-00-004", "Discovery query failed {0}"),
+    FAILED_TO_OBTAIN_TYPE_UPDATE_LOCK(500, "ATLAS-500-00-005", "Failed to get the lock; another
type update might be in progress. Please try again"),
+    FAILED_TO_OBTAIN_IMPORT_EXPORT_LOCK(500, "ATLAS-500-00-006", "Another import or export
is in progress. Please try again"),
+    NOTIFICATION_FAILED(500, "ATLAS-500-00-007", "Failed to notify for change {0}"),
+    GREMLIN_GROOVY_SCRIPT_ENGINE_FAILED(500, "ATLAS-500-00-008", "scriptEngine cannot be
initialized for: {0}"),
+    JSON_ERROR_OBJECT_MAPPER_NULL_RETURNED(500, "ATLAS-500-00-009", "ObjectMapper.readValue
returned NULL for class: {0}"),
+    GREMLIN_SCRIPT_EXECUTION_FAILED(500, "ATLAS-500-00-00A", "Script execution failed for:
{0}");
 
     private String errorCode;
     private String errorMessage;


Mime
View raw message