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
df85aa7a
Commit
df85aa7a
authored
5 years ago
by
Le Ma
Committed by
Sarath Subramanian
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3457: Support Multi-Classification search without attributes
Signed-off-by:
Sarath Subramanian
<
sarath@apache.org
>
parent
d1f34186
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
70 additions
and
22 deletions
+70
-22
SearchParameters.java
...va/org/apache/atlas/model/discovery/SearchParameters.java
+1
-0
AtlasClassificationType.java
...n/java/org/apache/atlas/type/AtlasClassificationType.java
+7
-1
AtlasEntityType.java
.../src/main/java/org/apache/atlas/type/AtlasEntityType.java
+2
-1
Constants.java
intg/src/main/java/org/apache/atlas/type/Constants.java
+2
-5
ClassificationSearchProcessor.java
...apache/atlas/discovery/ClassificationSearchProcessor.java
+2
-2
EntitySearchProcessor.java
...ava/org/apache/atlas/discovery/EntitySearchProcessor.java
+0
-1
SearchContext.java
...c/main/java/org/apache/atlas/discovery/SearchContext.java
+17
-7
SearchProcessor.java
...main/java/org/apache/atlas/discovery/SearchProcessor.java
+22
-3
AtlasTypeDefGraphStore.java
.../atlas/repository/store/graph/AtlasTypeDefGraphStore.java
+6
-1
AtlasTypeDefGraphStoreTest.java
...as/repository/store/graph/AtlasTypeDefGraphStoreTest.java
+11
-1
TestEntitiesREST.java
.../java/org/apache/atlas/web/adapters/TestEntitiesREST.java
+0
-0
No files found.
intg/src/main/java/org/apache/atlas/model/discovery/SearchParameters.java
View file @
df85aa7a
...
...
@@ -62,6 +62,7 @@ public class SearchParameters implements Serializable {
public
static
final
String
ALL_CLASSIFICATIONS
=
"_CLASSIFIED"
;
public
static
final
String
NO_CLASSIFICATIONS
=
"_NOT_CLASSIFIED"
;
public
static
final
String
ALL_ENTITY_TYPES
=
"_ALL_ENTITY_TYPES"
;
public
static
final
String
ALL_CLASSIFICATION_TYPES
=
"_ALL_CLASSIFICATION_TYPES"
;
/**
* @return The type of query
...
...
This diff is collapsed.
Click to expand it.
intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java
View file @
df85aa7a
...
...
@@ -93,6 +93,8 @@ public class AtlasClassificationType extends AtlasStructType {
public
AtlasClassificationDef
getClassificationDef
()
{
return
classificationDef
;
}
public
static
AtlasClassificationType
getClassificationRoot
()
{
return
CLASSIFICATION_ROOT
;
}
@Override
void
resolveReferences
(
AtlasTypeRegistry
typeRegistry
)
throws
AtlasBaseException
{
super
.
resolveReferences
(
typeRegistry
);
...
...
@@ -284,6 +286,10 @@ public class AtlasClassificationType extends AtlasStructType {
return
StringUtils
.
isNotEmpty
(
classificationName
)
&&
allSuperTypes
.
contains
(
classificationName
);
}
public
boolean
hasAttribute
(
String
attrName
)
{
return
allAttributes
.
containsKey
(
attrName
);
}
/**
* List of all the entity type names that are valid for this classification type.
*
...
...
@@ -506,7 +512,7 @@ public class AtlasClassificationType extends AtlasStructType {
add
(
new
AtlasAttributeDef
(
STATE_PROPERTY_KEY
,
ATLAS_TYPE_STRING
,
false
,
true
));
}};
AtlasClassificationDef
classificationDef
=
new
AtlasClassificationDef
(
CLASSIFICATION_ROOT_NAME
,
"
"
,
"
"
,
attributeDefs
);
AtlasClassificationDef
classificationDef
=
new
AtlasClassificationDef
(
CLASSIFICATION_ROOT_NAME
,
"
Root classification for system attributes"
,
"1.0
"
,
attributeDefs
);
return
new
AtlasClassificationType
(
classificationDef
);
}
...
...
This diff is collapsed.
Click to expand it.
intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
View file @
df85aa7a
...
...
@@ -17,6 +17,7 @@
*/
package
org
.
apache
.
atlas
.
type
;
import
static
org
.
apache
.
atlas
.
model
.
typedef
.
AtlasBaseTypeDef
.
ATLAS_TYPE_INT
;
import
static
org
.
apache
.
atlas
.
model
.
typedef
.
AtlasBaseTypeDef
.
ATLAS_TYPE_LONG
;
import
static
org
.
apache
.
atlas
.
model
.
typedef
.
AtlasBaseTypeDef
.
ATLAS_TYPE_STRING
;
import
static
org
.
apache
.
atlas
.
type
.
Constants
.*;
...
...
@@ -638,7 +639,7 @@ public class AtlasEntityType extends AtlasStructType {
add
(
new
AtlasAttributeDef
(
CLASSIFICATION_TEXT_KEY
,
ATLAS_TYPE_STRING
,
false
,
true
));
add
(
new
AtlasAttributeDef
(
CLASSIFICATION_NAMES_KEY
,
ATLAS_TYPE_STRING
,
false
,
true
));
add
(
new
AtlasAttributeDef
(
PROPAGATED_CLASSIFICATION_NAMES_KEY
,
ATLAS_TYPE_STRING
,
false
,
true
));
add
(
new
AtlasAttributeDef
(
IS_INCOMPLETE_PROPERTY_KEY
,
ATLAS_TYPE_
STRING
,
false
,
true
));
add
(
new
AtlasAttributeDef
(
IS_INCOMPLETE_PROPERTY_KEY
,
ATLAS_TYPE_
INT
,
false
,
true
));
add
(
new
AtlasAttributeDef
(
LABELS_PROPERTY_KEY
,
ATLAS_TYPE_STRING
,
false
,
true
));
add
(
new
AtlasAttributeDef
(
CUSTOM_ATTRIBUTES_PROPERTY_KEY
,
ATLAS_TYPE_STRING
,
false
,
true
));
}};
...
...
This diff is collapsed.
Click to expand it.
intg/src/main/java/org/apache/atlas/type/Constants.java
View file @
df85aa7a
...
...
@@ -32,7 +32,6 @@ public final class Constants {
public
static
final
String
TYPE_NAME_PROPERTY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"typeName"
);
public
static
final
String
STATE_PROPERTY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"state"
);
public
static
final
String
CREATED_BY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"createdBy"
);
public
static
final
String
SUPER_TYPES_PROPERTY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"superTypeNames"
);
public
static
final
String
MODIFIED_BY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"modifiedBy"
);
public
static
final
String
TIMESTAMP_PROPERTY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"timestamp"
);
public
static
final
String
MODIFICATION_TIMESTAMP_PROPERTY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"modificationTimestamp"
);
...
...
@@ -44,13 +43,10 @@ public final class Constants {
public
static
final
String
HISTORICAL_GUID_PROPERTY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"historicalGuids"
);
public
static
final
String
LABELS_PROPERTY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"labels"
);
public
static
final
String
CUSTOM_ATTRIBUTES_PROPERTY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"customAttributes"
);
public
static
final
String
TRAIT_NAMES_PROPERTY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"traitNames"
);
public
static
final
String
PROPAGATED_TRAIT_NAMES_PROPERTY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"propagatedTraitNames"
);
public
static
final
String
CLASSIFICATION_TEXT_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"classificationsText"
);
public
static
final
String
CLASSIFICATION_NAMES_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"classificationNames"
);
public
static
final
String
PROPAGATED_CLASSIFICATION_NAMES_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"propagatedClassificationNames"
);
public
static
final
String
IS_INCOMPLETE_PROPERTY_KEY
=
encodePropertyKey
(
INTERNAL_PROPERTY_KEY_PREFIX
+
"isIncomplete"
);
private
Constants
()
{}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
repository/src/main/java/org/apache/atlas/discovery/ClassificationSearchProcessor.java
View file @
df85aa7a
...
...
@@ -164,11 +164,11 @@ public class ClassificationSearchProcessor extends SearchProcessor {
indexQueryString
=
STRAY_OR_PATTERN
.
matcher
(
indexQueryString
).
replaceAll
(
")"
);
indexQueryString
=
STRAY_ELIPSIS_PATTERN
.
matcher
(
indexQueryString
).
replaceAll
(
""
);
Predicate
typeNamePredicate
=
SearchPredicateUtil
.
getINPredicateGenerator
().
generatePredicate
(
Constants
.
TYPE_NAME_PROPERTY_KEY
,
typeAndSubTypes
,
String
.
class
);
Predicate
typeNamePredicate
=
isClassificationRootType
()
?
null
:
SearchPredicateUtil
.
getINPredicateGenerator
().
generatePredicate
(
Constants
.
TYPE_NAME_PROPERTY_KEY
,
typeAndSubTypes
,
String
.
class
);
Predicate
attributePredicate
=
constructInMemoryPredicate
(
classificationType
,
filterCriteria
,
indexAttributes
);
if
(
attributePredicate
!=
null
)
{
inMemoryPredicate
=
PredicateUtils
.
andPredicate
(
typeNamePredicate
,
attributePredicate
);
inMemoryPredicate
=
typeNamePredicate
==
null
?
attributePredicate
:
PredicateUtils
.
andPredicate
(
typeNamePredicate
,
attributePredicate
);
}
else
{
inMemoryPredicate
=
typeNamePredicate
;
}
...
...
This diff is collapsed.
Click to expand it.
repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
View file @
df85aa7a
...
...
@@ -54,7 +54,6 @@ import static org.apache.atlas.repository.graphdb.AtlasGraphQuery.ComparisionOpe
import
static
org
.
apache
.
atlas
.
repository
.
graphdb
.
AtlasGraphQuery
.
ComparisionOperator
.
NOT_EQUAL
;
import
static
org
.
apache
.
atlas
.
repository
.
graphdb
.
AtlasGraphQuery
.
SortOrder
.
ASC
;
import
static
org
.
apache
.
atlas
.
repository
.
graphdb
.
AtlasGraphQuery
.
SortOrder
.
DESC
;
import
static
org
.
apache
.
atlas
.
type
.
AtlasEntityType
.
ENTITY_ROOT
;
public
class
EntitySearchProcessor
extends
SearchProcessor
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
EntitySearchProcessor
.
class
);
...
...
This diff is collapsed.
Click to expand it.
repository/src/main/java/org/apache/atlas/discovery/SearchContext.java
View file @
df85aa7a
...
...
@@ -45,8 +45,9 @@ import org.slf4j.LoggerFactory;
import
java.util.*
;
import
static
org
.
apache
.
atlas
.
discovery
.
SearchProcessor
.
ALL_
ENTITY_
TYPE_QUERY
;
import
static
org
.
apache
.
atlas
.
discovery
.
SearchProcessor
.
ALL_TYPE_QUERY
;
import
static
org
.
apache
.
atlas
.
model
.
discovery
.
SearchParameters
.
ALL_CLASSIFICATIONS
;
import
static
org
.
apache
.
atlas
.
model
.
discovery
.
SearchParameters
.
ALL_CLASSIFICATION_TYPES
;
import
static
org
.
apache
.
atlas
.
model
.
discovery
.
SearchParameters
.
ALL_ENTITY_TYPES
;
import
static
org
.
apache
.
atlas
.
model
.
discovery
.
SearchParameters
.
NO_CLASSIFICATIONS
;
import
static
org
.
apache
.
atlas
.
model
.
discovery
.
SearchParameters
.
WILDCARD_CLASSIFICATIONS
;
...
...
@@ -77,8 +78,10 @@ public class SearchContext {
public
final
static
AtlasClassificationType
MATCH_ALL_WILDCARD_CLASSIFICATION
=
new
AtlasClassificationType
(
new
AtlasClassificationDef
(
WILDCARD_CLASSIFICATIONS
));
public
final
static
AtlasClassificationType
MATCH_ALL_CLASSIFIED
=
new
AtlasClassificationType
(
new
AtlasClassificationDef
(
ALL_CLASSIFICATIONS
));
public
final
static
AtlasClassificationType
MATCH_ALL_NOT_CLASSIFIED
=
new
AtlasClassificationType
(
new
AtlasClassificationDef
(
NO_CLASSIFICATIONS
));
public
final
static
AtlasClassificationType
MATCH_ALL_CLASSIFICATION_TYPES
=
AtlasClassificationType
.
getClassificationRoot
();
public
final
static
AtlasEntityType
MATCH_ALL_ENTITY_TYPES
=
AtlasEntityType
.
getEntityRoot
();
public
SearchContext
(
SearchParameters
searchParameters
,
AtlasTypeRegistry
typeRegistry
,
AtlasGraph
graph
,
Set
<
String
>
indexedKeys
)
throws
AtlasBaseException
{
this
.
classificationName
=
searchParameters
.
getClassification
();
this
.
searchParameters
=
searchParameters
;
...
...
@@ -116,23 +119,28 @@ public class SearchContext {
validateAttributes
(
classificationType
,
searchParameters
.
getTagFilters
());
if
(
classificationType
!=
null
&&
!
isBuiltInClassificationType
())
{
classificationTypeAndSubTypes
=
searchParameters
.
getIncludeSubClassifications
()
?
classificationType
.
getTypeAndAllSubTypes
()
:
Collections
.
singleton
(
classificationType
.
getTypeName
());
classificationTypeAndSubTypesQryStr
=
searchParameters
.
getIncludeSubClassifications
()
?
classificationType
.
getTypeAndAllSubTypesQryStr
()
:
classificationType
.
getTypeQryStr
();
if
(
classificationType
==
MATCH_ALL_CLASSIFICATION_TYPES
)
{
classificationTypeAndSubTypes
=
Collections
.
singleton
(
ALL_TYPE_QUERY
);
classificationTypeAndSubTypesQryStr
=
ALL_TYPE_QUERY
;
}
else
{
classificationTypeAndSubTypes
=
searchParameters
.
getIncludeSubClassifications
()
?
classificationType
.
getTypeAndAllSubTypes
()
:
Collections
.
singleton
(
classificationType
.
getTypeName
());
classificationTypeAndSubTypesQryStr
=
searchParameters
.
getIncludeSubClassifications
()
?
classificationType
.
getTypeAndAllSubTypesQryStr
()
:
classificationType
.
getTypeQryStr
();
}
}
else
{
classificationTypeAndSubTypes
=
Collections
.
emptySet
();
classificationTypeAndSubTypes
=
Collections
.
emptySet
();
classificationTypeAndSubTypesQryStr
=
""
;
}
if
(
entityType
!=
null
)
{
if
(
entityType
.
equals
(
MATCH_ALL_ENTITY_TYPES
))
{
typeAndSubTypes
=
Collections
.
singleton
(
ALL_ENTITY
_TYPE_QUERY
);
typeAndSubTypesQryStr
=
ALL_
ENTITY_
TYPE_QUERY
;
typeAndSubTypes
=
Collections
.
singleton
(
ALL
_TYPE_QUERY
);
typeAndSubTypesQryStr
=
ALL_TYPE_QUERY
;
}
else
{
typeAndSubTypes
=
searchParameters
.
getIncludeSubTypes
()
?
entityType
.
getTypeAndAllSubTypes
()
:
Collections
.
singleton
(
entityType
.
getTypeName
());
typeAndSubTypesQryStr
=
searchParameters
.
getIncludeSubTypes
()
?
entityType
.
getTypeAndAllSubTypesQryStr
()
:
entityType
.
getTypeQryStr
();
}
}
else
{
typeAndSubTypes
=
Collections
.
emptySet
();
typeAndSubTypes
=
Collections
.
emptySet
();
typeAndSubTypesQryStr
=
""
;
}
...
...
@@ -304,6 +312,8 @@ public class SearchContext {
ret
=
MATCH_ALL_CLASSIFIED
;
}
else
if
(
StringUtils
.
equals
(
classificationName
,
MATCH_ALL_NOT_CLASSIFIED
.
getTypeName
()))
{
ret
=
MATCH_ALL_NOT_CLASSIFIED
;
}
else
if
(
StringUtils
.
equals
(
classificationName
,
ALL_CLASSIFICATION_TYPES
)){
ret
=
MATCH_ALL_CLASSIFICATION_TYPES
;
}
else
{
ret
=
typeRegistry
.
getClassificationTypeByName
(
classificationName
);
}
...
...
This diff is collapsed.
Click to expand it.
repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
View file @
df85aa7a
...
...
@@ -45,6 +45,10 @@ import java.math.BigInteger;
import
java.util.*
;
import
java.util.regex.Pattern
;
import
static
org
.
apache
.
atlas
.
repository
.
Constants
.
CLASSIFICATION_NAMES_KEY
;
import
static
org
.
apache
.
atlas
.
repository
.
Constants
.
CUSTOM_ATTRIBUTES_PROPERTY_KEY
;
import
static
org
.
apache
.
atlas
.
repository
.
Constants
.
LABELS_PROPERTY_KEY
;
import
static
org
.
apache
.
atlas
.
repository
.
Constants
.
PROPAGATED_CLASSIFICATION_NAMES_KEY
;
import
static
org
.
apache
.
atlas
.
util
.
SearchPredicateUtil
.*;
public
abstract
class
SearchProcessor
{
...
...
@@ -62,7 +66,7 @@ public abstract class SearchProcessor {
public
static
final
String
SPACE_STRING
=
" "
;
public
static
final
String
BRACE_OPEN_STR
=
"("
;
public
static
final
String
BRACE_CLOSE_STR
=
")"
;
public
static
final
String
ALL_
ENTITY_TYPE_QUERY
=
"[* TO *]"
;
public
static
final
String
ALL_
TYPE_QUERY
=
"[* TO *]"
;
private
static
final
Map
<
SearchParameters
.
Operator
,
String
>
OPERATOR_MAP
=
new
HashMap
<>();
private
static
final
Map
<
SearchParameters
.
Operator
,
VertexAttributePredicateGenerator
>
OPERATOR_PREDICATE_MAP
=
new
HashMap
<>();
...
...
@@ -136,6 +140,21 @@ public abstract class SearchProcessor {
return
context
.
getEntityType
()
==
SearchContext
.
MATCH_ALL_ENTITY_TYPES
;
}
protected
boolean
isClassificationRootType
()
{
return
context
.
getClassificationType
()
==
SearchContext
.
MATCH_ALL_CLASSIFICATION_TYPES
;
}
protected
boolean
isSystemAttribute
(
String
attrName
)
{
return
AtlasEntityType
.
getEntityRoot
().
hasAttribute
(
attrName
)
||
AtlasClassificationType
.
getClassificationRoot
().
hasAttribute
(
attrName
);
}
protected
boolean
isPipeSeparatedSystemAttribute
(
String
attrName
)
{
return
StringUtils
.
equals
(
attrName
,
CLASSIFICATION_NAMES_KEY
)
||
StringUtils
.
equals
(
attrName
,
PROPAGATED_CLASSIFICATION_NAMES_KEY
)
||
StringUtils
.
equals
(
attrName
,
LABELS_PROPERTY_KEY
)
||
StringUtils
.
equals
(
attrName
,
CUSTOM_ATTRIBUTES_PROPERTY_KEY
);
}
protected
int
collectResultVertices
(
final
List
<
AtlasVertex
>
ret
,
final
int
startIdx
,
final
int
limit
,
int
resultIdx
,
final
List
<
AtlasVertex
>
entityVertices
)
{
for
(
AtlasVertex
entityVertex
:
entityVertices
)
{
resultIdx
++;
...
...
@@ -185,7 +204,7 @@ public abstract class SearchProcessor {
graphFiltered
.
add
(
attributeName
);
}
if
(
structType
instanceof
AtlasEntityType
)
{
if
(
structType
instanceof
AtlasEntityType
&&
!
isSystemAttribute
(
attributeName
)
)
{
// Capture the entity attributes
context
.
getEntityAttributes
().
add
(
attributeName
);
}
...
...
@@ -438,7 +457,7 @@ public abstract class SearchProcessor {
return
PredicateUtils
.
anyPredicate
(
predicates
);
}
}
}
else
if
(
indexAttributes
.
contains
(
criteria
.
getAttributeName
())){
}
else
if
(
indexAttributes
.
contains
(
criteria
.
getAttributeName
())
&&
!
isPipeSeparatedSystemAttribute
(
criteria
.
getAttributeName
())
){
return
toInMemoryPredicate
(
type
,
criteria
.
getAttributeName
(),
criteria
.
getOperator
(),
criteria
.
getAttributeValue
());
}
...
...
This diff is collapsed.
Click to expand it.
repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java
View file @
df85aa7a
...
...
@@ -46,6 +46,7 @@ import java.util.List;
import
java.util.Set
;
import
static
org
.
apache
.
atlas
.
model
.
discovery
.
SearchParameters
.
ALL_ENTITY_TYPES
;
import
static
org
.
apache
.
atlas
.
model
.
discovery
.
SearchParameters
.
ALL_CLASSIFICATION_TYPES
;
import
static
org
.
apache
.
atlas
.
repository
.
store
.
bootstrap
.
AtlasTypeDefStoreInitializer
.
getTypesToCreate
;
import
static
org
.
apache
.
atlas
.
repository
.
store
.
bootstrap
.
AtlasTypeDefStoreInitializer
.
getTypesToUpdate
;
...
...
@@ -217,7 +218,11 @@ public abstract class AtlasTypeDefGraphStore implements AtlasTypeDefStore {
AtlasClassificationDef
ret
=
typeRegistry
.
getClassificationDefByName
(
name
);
if
(
ret
==
null
)
{
throw
new
AtlasBaseException
(
AtlasErrorCode
.
TYPE_NAME_NOT_FOUND
,
name
);
ret
=
StringUtils
.
equalsIgnoreCase
(
name
,
ALL_CLASSIFICATION_TYPES
)
?
AtlasClassificationType
.
getClassificationRoot
().
getClassificationDef
()
:
null
;
if
(
ret
==
null
)
{
throw
new
AtlasBaseException
(
AtlasErrorCode
.
TYPE_NAME_NOT_FOUND
,
name
);
}
}
return
ret
;
...
...
This diff is collapsed.
Click to expand it.
repository/src/test/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStoreTest.java
View file @
df85aa7a
...
...
@@ -32,6 +32,7 @@ import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef;
import
org.apache.atlas.runner.LocalSolrRunner
;
import
org.apache.atlas.store.AtlasTypeDefStore
;
import
org.apache.atlas.type.AtlasEntityType
;
import
org.apache.atlas.type.AtlasClassificationType
;
import
org.apache.atlas.type.AtlasType
;
import
org.apache.atlas.utils.TestResourceFileUtils
;
import
org.slf4j.Logger
;
...
...
@@ -701,4 +702,12 @@ public class AtlasTypeDefGraphStoreTest {
assertNotNull
(
entityDefByName
);
assertEquals
(
entityDefByName
,
AtlasEntityType
.
getEntityRoot
().
getEntityDef
());
}
}
@Test
public
void
testGetOnAllClassificationTypes
()
throws
AtlasBaseException
{
AtlasClassificationDef
classificationTypeDef
=
typeDefStore
.
getClassificationDefByName
(
"_ALL_CLASSIFICATION_TYPES"
);
assertNotNull
(
classificationTypeDef
);
assertEquals
(
classificationTypeDef
,
AtlasClassificationType
.
getClassificationRoot
().
getClassificationDef
());
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java
View file @
df85aa7a
This diff is collapsed.
Click to expand it.
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