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
ce61caae
Commit
ce61caae
authored
Jun 05, 2015
by
Shwetha G S
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #131 from shwethags/utf8
BUG-38870 npe during loading of the data in atlas on restart
parents
f0682e41
93f34483
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
DefaultMetadataService.java
...ache/hadoop/metadata/services/DefaultMetadataService.java
+9
-6
HierarchicalType.java
...he/hadoop/metadata/typesystem/types/HierarchicalType.java
+3
-3
No files found.
repository/src/main/java/org/apache/hadoop/metadata/services/DefaultMetadataService.java
View file @
ce61caae
...
...
@@ -53,6 +53,7 @@ import org.slf4j.LoggerFactory;
import
javax.inject.Inject
;
import
javax.inject.Singleton
;
import
java.util.HashMap
;
import
java.util.LinkedHashSet
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -83,8 +84,8 @@ public class DefaultMetadataService implements MetadataService {
this
.
typeSystem
=
TypeSystem
.
getInstance
();
this
.
repository
=
repository
;
restoreTypeSystem
();
registerListener
(
searchIndexer
);
restoreTypeSystem
();
}
private
void
restoreTypeSystem
()
{
...
...
@@ -113,17 +114,18 @@ public class DefaultMetadataService implements MetadataService {
return
;
// this is already registered
}
Map
<
String
,
IDataType
>
superTypes
=
new
HashMap
();
HierarchicalTypeDefinition
<
ClassType
>
superTypeDefinition
=
TypesUtil
.
createClassTypeDef
(
MetadataServiceClient
.
INFRASTRUCTURE_SUPER_TYPE
,
ImmutableList
.<
String
>
of
(),
NAME_ATTRIBUTE
,
DESCRIPTION_ATTRIBUTE
);
typeSystem
.
defineClassType
(
superTypeDefinition
);
ImmutableList
.<
String
>
of
(),
NAME_ATTRIBUTE
,
DESCRIPTION_ATTRIBUTE
);
superTypes
.
put
(
MetadataServiceClient
.
INFRASTRUCTURE_SUPER_TYPE
,
typeSystem
.
defineClassType
(
superTypeDefinition
)
);
superTypeDefinition
=
TypesUtil
.
createClassTypeDef
(
MetadataServiceClient
.
DATA_SET_SUPER_TYPE
,
ImmutableList
.<
String
>
of
(),
NAME_ATTRIBUTE
,
DESCRIPTION_ATTRIBUTE
);
typeSystem
.
defineClassType
(
superTypeDefinition
);
superTypes
.
put
(
MetadataServiceClient
.
DATA_SET_SUPER_TYPE
,
typeSystem
.
defineClassType
(
superTypeDefinition
)
);
superTypeDefinition
=
TypesUtil
.
createClassTypeDef
(
MetadataServiceClient
.
PROCESS_SUPER_TYPE
,
...
...
@@ -136,7 +138,8 @@ public class DefaultMetadataService implements MetadataService {
DataTypes
.
arrayTypeName
(
MetadataServiceClient
.
DATA_SET_SUPER_TYPE
),
new
Multiplicity
(
0
,
Integer
.
MAX_VALUE
,
false
),
false
,
null
)
);
typeSystem
.
defineClassType
(
superTypeDefinition
);
superTypes
.
put
(
MetadataServiceClient
.
PROCESS_SUPER_TYPE
,
typeSystem
.
defineClassType
(
superTypeDefinition
));
onTypesAddedToRepo
(
superTypes
);
}
/**
...
...
typesystem/src/main/java/org/apache/hadoop/metadata/typesystem/types/HierarchicalType.java
View file @
ce61caae
...
...
@@ -70,7 +70,7 @@ public abstract class HierarchicalType<ST extends HierarchicalType, T> extends A
this
.
fieldMapping
=
null
;
this
.
numFields
=
numFields
;
this
.
superTypes
=
superTypes
;
this
.
immediateAttrs
=
null
;
this
.
immediateAttrs
=
ImmutableList
.
of
()
;
this
.
attributeNameToType
=
null
;
}
...
...
@@ -86,7 +86,7 @@ public abstract class HierarchicalType<ST extends HierarchicalType, T> extends A
this
.
attributeNameToType
=
p
.
right
;
this
.
numFields
=
this
.
fieldMapping
.
fields
.
size
();
this
.
superTypes
=
superTypes
==
null
?
ImmutableList
.<
String
>
of
()
:
superTypes
;
this
.
immediateAttrs
=
ImmutableList
.
<
AttributeInfo
>
copyOf
(
fields
);
this
.
immediateAttrs
=
ImmutableList
.
copyOf
(
fields
);
}
@Override
...
...
@@ -184,7 +184,7 @@ public abstract class HierarchicalType<ST extends HierarchicalType, T> extends A
(
ST
)
typeSystem
.
getDataType
(
superTypeClass
,
currentPath
.
typeName
);
ImmutableList
<
AttributeInfo
>
superTypeFields
=
superType
==
this
?
ImmutableList
.
<
AttributeInfo
>
copyOf
(
fields
)
:
superType
.
immediateAttrs
;
ImmutableList
.
copyOf
(
fields
)
:
superType
.
immediateAttrs
;
Set
<
String
>
immediateFields
=
new
HashSet
<
String
>();
...
...
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