Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
39c52b2b
Commit
39c52b2b
authored
Aug 03, 2015
by
Shwetha GS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-79 Unique constraint is not honoured (shwethags)
parent
96059e0a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
64 deletions
+89
-64
release-log.txt
release-log.txt
+1
-0
Constants.java
.../src/main/java/org/apache/atlas/repository/Constants.java
+0
-4
GraphBackedSearchIndexer.java
...ache/atlas/repository/graph/GraphBackedSearchIndexer.java
+45
-60
EntityJerseyResourceIT.java
...rg/apache/atlas/web/resources/EntityJerseyResourceIT.java
+43
-0
No files found.
release-log.txt
View file @
39c52b2b
...
...
@@ -8,6 +8,7 @@ ATLAS-54 Rename configs in hive hook (shwethags)
ATLAS-3 Mixed Index creation fails with Date types (suma.shivaprasad via shwethags)
ALL CHANGES:
ATLAS-79 Unique constraint is not honoured (shwethags)
ATLAS-25 Fix Atlas on Java 8 (sandeep.samudrala via shwethags)
ATLAS-86 Jenkins build failing as of build #41 (shwethags)
ATLAS-80 Support for variables in application properties (shwethags)
...
...
repository/src/main/java/org/apache/atlas/repository/Constants.java
View file @
39c52b2b
...
...
@@ -26,19 +26,16 @@ public final class Constants {
public
static
final
String
INTERNAL_PROPERTY_KEY_PREFIX
=
"__"
;
public
static
final
String
GUID_PROPERTY_KEY
=
INTERNAL_PROPERTY_KEY_PREFIX
+
"guid"
;
public
static
final
String
GUID_INDEX
=
"guid_index"
;
/**
* Entity type name property key.
*/
public
static
final
String
ENTITY_TYPE_PROPERTY_KEY
=
INTERNAL_PROPERTY_KEY_PREFIX
+
"typeName"
;
public
static
final
String
ENTITY_TYPE_INDEX
=
"type_index"
;
/**
* Entity type's super types property key.
*/
public
static
final
String
SUPER_TYPES_PROPERTY_KEY
=
INTERNAL_PROPERTY_KEY_PREFIX
+
"superTypeNames"
;
public
static
final
String
SUPER_TYPES_INDEX
=
"super_types_index"
;
/**
* Full-text for the entity for enabling full-text search.
...
...
@@ -57,7 +54,6 @@ public final class Constants {
* Trait names property key and index name.
*/
public
static
final
String
TRAIT_NAMES_PROPERTY_KEY
=
INTERNAL_PROPERTY_KEY_PREFIX
+
"traitNames"
;
public
static
final
String
TRAIT_NAMES_INDEX
=
"trait_names_index"
;
public
static
final
String
VERSION_PROPERTY_KEY
=
INTERNAL_PROPERTY_KEY_PREFIX
+
"version"
;
public
static
final
String
TIMESTAMP_PROPERTY_KEY
=
INTERNAL_PROPERTY_KEY_PREFIX
+
"timestamp"
;
...
...
repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
View file @
39c52b2b
This diff is collapsed.
Click to expand it.
webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java
View file @
39c52b2b
...
...
@@ -116,6 +116,49 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
}
@Test
public
void
testUniqueAttribute
()
throws
Exception
{
//create type
String
typeName
=
"type"
+
randomString
();
HierarchicalTypeDefinition
<
ClassType
>
typeDefinition
=
TypesUtil
.
createClassTypeDef
(
typeName
,
ImmutableList
.<
String
>
of
(),
TypesUtil
.
createUniqueRequiredAttrDef
(
"name"
,
DataTypes
.
STRING_TYPE
));
TypesDef
typesDef
=
TypeUtils
.
getTypesDef
(
ImmutableList
.<
EnumTypeDefinition
>
of
(),
ImmutableList
.<
StructTypeDefinition
>
of
(),
ImmutableList
.<
HierarchicalTypeDefinition
<
TraitType
>>
of
(),
ImmutableList
.
of
(
typeDefinition
));
createType
(
typesDef
);
//create entity
String
name
=
"name"
+
randomString
();
Referenceable
referenceable
=
new
Referenceable
(
typeName
);
referenceable
.
set
(
"name"
,
name
);
createInstance
(
referenceable
);
//create entity with same name again - should fail
try
{
createInstance
(
referenceable
);
Assert
.
fail
(
"Expected exception"
);
}
catch
(
Exception
e
)
{
//expected exception
}
//create another type with same attribute - should allow
typeName
=
"type"
+
randomString
();
typeDefinition
=
TypesUtil
.
createClassTypeDef
(
typeName
,
ImmutableList
.<
String
>
of
(),
TypesUtil
.
createUniqueRequiredAttrDef
(
"name"
,
DataTypes
.
STRING_TYPE
));
typesDef
=
TypeUtils
.
getTypesDef
(
ImmutableList
.<
EnumTypeDefinition
>
of
(),
ImmutableList
.<
StructTypeDefinition
>
of
(),
ImmutableList
.<
HierarchicalTypeDefinition
<
TraitType
>>
of
(),
ImmutableList
.
of
(
typeDefinition
));
createType
(
typesDef
);
referenceable
=
new
Referenceable
(
typeName
);
referenceable
.
set
(
"name"
,
name
);
createInstance
(
referenceable
);
}
@Test
public
void
testSubmitEntityWithBadDateFormat
()
throws
Exception
{
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment