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
883251c0
Commit
883251c0
authored
9 years ago
by
Shwetha GS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-33 Atlas restart fails (shwethags)
parent
155554e6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
3 deletions
+27
-3
release-log.txt
release-log.txt
+1
-1
HierarchicalType.java
...a/org/apache/atlas/typesystem/types/HierarchicalType.java
+6
-2
TypeSystemTest.java
...ava/org/apache/atlas/typesystem/types/TypeSystemTest.java
+20
-0
No files found.
release-log.txt
View file @
883251c0
...
@@ -6,13 +6,13 @@ Apache Atlas Release Notes
...
@@ -6,13 +6,13 @@ Apache Atlas Release Notes
INCOMPATIBLE CHANGES:
INCOMPATIBLE CHANGES:
ALL CHANGES:
ALL CHANGES:
ATLAS-33 Atlas restart fails (shwethags)
ATLAS-10 Update trunk version to 0.6-incubating-SNAPSHOT (shwethags)
ATLAS-10 Update trunk version to 0.6-incubating-SNAPSHOT (shwethags)
--Release 0.5-incubating
--Release 0.5-incubating
ALL CHANGES:
ALL CHANGES:
ATLAS-26 Minor issues with release prep (Venkatesh Seetharam)
ATLAS-26 Minor issues with release prep (Venkatesh Seetharam)
ATLAS-17 Parameterize schema API query per typeName (shwethags)
ATLAS-17 Parameterize schema API query per typeName (shwethags)
ATLAS-13 Add project website (Venkatesh Seetharam)
ATLAS-13 Add project website (Venkatesh Seetharam)
...
...
This diff is collapsed.
Click to expand it.
typesystem/src/main/java/org/apache/atlas/typesystem/types/HierarchicalType.java
View file @
883251c0
...
@@ -340,13 +340,17 @@ public abstract class HierarchicalType<ST extends HierarchicalType, T> extends A
...
@@ -340,13 +340,17 @@ public abstract class HierarchicalType<ST extends HierarchicalType, T> extends A
@Override
@Override
public
int
compareTo
(
ST
o
)
{
public
int
compareTo
(
ST
o
)
{
String
oName
=
o
.
getName
();
String
oName
=
o
.
getName
();
if
(
superTypes
.
contains
(
oName
))
{
try
{
if
(
o
.
isSubType
(
getName
()))
{
return
1
;
return
1
;
}
else
if
(
o
.
superTypes
.
contains
(
getName
()
))
{
}
else
if
(
isSubType
(
oName
))
{
return
-
1
;
return
-
1
;
}
else
{
}
else
{
return
getName
().
compareTo
(
oName
);
return
getName
().
compareTo
(
oName
);
}
}
}
catch
(
AtlasException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
public
Set
<
String
>
getAllSuperTypeNames
()
{
public
Set
<
String
>
getAllSuperTypeNames
()
{
...
...
This diff is collapsed.
Click to expand it.
typesystem/src/test/java/org/apache/atlas/typesystem/types/TypeSystemTest.java
View file @
883251c0
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
package
org
.
apache
.
atlas
.
typesystem
.
types
;
package
org
.
apache
.
atlas
.
typesystem
.
types
;
import
com.google.common.collect.ImmutableList
;
import
com.google.common.collect.ImmutableList
;
import
org.apache.atlas.AtlasException
;
import
org.apache.atlas.typesystem.types.utils.TypesUtil
;
import
org.apache.atlas.typesystem.types.utils.TypesUtil
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.testng.Assert
;
import
org.testng.Assert
;
...
@@ -118,4 +119,23 @@ public class TypeSystemTest extends BaseTest {
...
@@ -118,4 +119,23 @@ public class TypeSystemTest extends BaseTest {
ts
.
defineTypes
(
ImmutableList
.
of
(
structType
),
ImmutableList
.
of
(
traitType
),
ImmutableList
.
of
(
classType
));
ts
.
defineTypes
(
ImmutableList
.
of
(
structType
),
ImmutableList
.
of
(
traitType
),
ImmutableList
.
of
(
classType
));
}
}
@Test
public
void
testHierarchy
()
throws
AtlasException
{
HierarchicalTypeDefinition
<
ClassType
>
a
=
TypesUtil
.
createClassTypeDef
(
"a"
,
ImmutableList
.<
String
>
of
());
HierarchicalTypeDefinition
<
ClassType
>
b
=
TypesUtil
.
createClassTypeDef
(
"B"
,
ImmutableList
.
of
(
"a"
));
HierarchicalTypeDefinition
<
ClassType
>
c
=
TypesUtil
.
createClassTypeDef
(
"C"
,
ImmutableList
.
of
(
"B"
));
TypeSystem
ts
=
getTypeSystem
();
ts
.
defineTypes
(
ImmutableList
.<
StructTypeDefinition
>
of
(),
ImmutableList
.<
HierarchicalTypeDefinition
<
TraitType
>>
of
(),
ImmutableList
.
of
(
a
,
b
,
c
));
ClassType
ac
=
ts
.
getDataType
(
ClassType
.
class
,
"a"
);
ClassType
bc
=
ts
.
getDataType
(
ClassType
.
class
,
"B"
);
ClassType
cc
=
ts
.
getDataType
(
ClassType
.
class
,
"C"
);
Assert
.
assertTrue
(
ac
.
compareTo
(
bc
)
<
0
);
Assert
.
assertTrue
(
bc
.
compareTo
(
cc
)
<
0
);
Assert
.
assertTrue
(
ac
.
compareTo
(
cc
)
<
0
);
}
}
}
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