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
fdab2efd
Commit
fdab2efd
authored
Oct 16, 2018
by
Sarath Subramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2924: Use encoded property name in getEncodedProperty() and setEncodedProperty() methods
parent
2fbea9f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
AtlasStructDefStoreV2.java
...tlas/repository/store/graph/v2/AtlasStructDefStoreV2.java
+6
-2
No files found.
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasStructDefStoreV2.java
View file @
fdab2efd
...
@@ -49,6 +49,8 @@ import java.util.List;
...
@@ -49,6 +49,8 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
import
static
org
.
apache
.
atlas
.
type
.
AtlasStructType
.
AtlasAttribute
.
encodePropertyKey
;
/**
/**
* StructDef store in v1 format.
* StructDef store in v1 format.
*/
*/
...
@@ -377,7 +379,9 @@ public class AtlasStructDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasStructDe
...
@@ -377,7 +379,9 @@ public class AtlasStructDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasStructDe
}
}
}
}
List
<
String
>
currAttrNames
=
vertex
.
getProperty
(
AtlasGraphUtilsV2
.
getTypeDefPropertyKey
(
structDef
),
List
.
class
);
String
structDefPropertyKey
=
AtlasGraphUtilsV2
.
getTypeDefPropertyKey
(
structDef
);
String
encodedStructDefPropertyKey
=
encodePropertyKey
(
structDefPropertyKey
);
List
<
String
>
currAttrNames
=
vertex
.
getProperty
(
encodedStructDefPropertyKey
,
List
.
class
);
// delete attributes that are not present in updated structDef
// delete attributes that are not present in updated structDef
if
(
CollectionUtils
.
isNotEmpty
(
currAttrNames
))
{
if
(
CollectionUtils
.
isNotEmpty
(
currAttrNames
))
{
...
@@ -423,7 +427,7 @@ public class AtlasStructDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasStructDe
...
@@ -423,7 +427,7 @@ public class AtlasStructDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasStructDe
}
}
}
}
AtlasGraphUtilsV2
.
set
Property
(
vertex
,
AtlasGraphUtilsV2
.
getTypeDefPropertyKey
(
structDef
)
,
attrNames
);
AtlasGraphUtilsV2
.
set
EncodedProperty
(
vertex
,
encodedStructDefPropertyKey
,
attrNames
);
}
}
public
static
void
updateVertexAddReferences
(
AtlasStructDef
structDef
,
AtlasVertex
vertex
,
public
static
void
updateVertexAddReferences
(
AtlasStructDef
structDef
,
AtlasVertex
vertex
,
...
...
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