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
bf2e6091
Commit
bf2e6091
authored
8 years ago
by
Ayub Khan
Committed by
Suma Shivaprasad
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1112: Hive hook notification contains multiple entities with same ID
parent
a07f3cc0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
release-log.txt
release-log.txt
+1
-0
Id.java
...main/java/org/apache/atlas/typesystem/persistence/Id.java
+15
-1
No files found.
release-log.txt
View file @
bf2e6091
...
...
@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ATLAS-1060 Add composite indexes for exact match performance improvements for all attributes (sumasai via shwethags)
ALL CHANGES:
ATLAS-1112 Hive table GET response from atlas server had duplicate column entries ( ayubkhan, mneethiraj via sumasai)
ATLAS-1108 In Atlas HA mode , import-hive.sh in Passive instance fails. (ayubkhan via sumasai)
ATLAS-991 Lower bound checking not always disabled for entities being deleted (dkantor)
ATLAS-1104 Get outgoing edges by label doesn't work in some cases (shwethags)
...
...
This diff is collapsed.
Click to expand it.
typesystem/src/main/java/org/apache/atlas/typesystem/persistence/Id.java
View file @
bf2e6091
...
...
@@ -33,6 +33,7 @@ import java.security.MessageDigest;
import
java.util.Date
;
import
java.util.Map
;
import
java.util.UUID
;
import
java.util.concurrent.atomic.AtomicLong
;
public
class
Id
implements
ITypedReferenceableInstance
{
public
enum
EntityState
{
...
...
@@ -43,6 +44,7 @@ public class Id implements ITypedReferenceableInstance {
public
final
String
typeName
;
public
final
int
version
;
public
EntityState
state
;
private
static
AtomicLong
s_nextId
=
new
AtomicLong
(
System
.
nanoTime
());
public
Id
(
String
id
,
int
version
,
String
typeName
,
String
state
)
{
id
=
ParamChecker
.
notEmpty
(
id
,
"id"
);
...
...
@@ -71,7 +73,7 @@ public class Id implements ITypedReferenceableInstance {
}
public
Id
(
String
typeName
)
{
this
(
""
+
(-
System
.
nanoTime
()
),
0
,
typeName
);
this
(
""
+
Id
.
nextNegativeLong
(
),
0
,
typeName
);
}
public
boolean
isUnassigned
()
{
...
...
@@ -294,4 +296,16 @@ public class Id implements ITypedReferenceableInstance {
byte
[]
digest
=
digester
.
digest
();
return
MD5Utils
.
toString
(
digest
);
}
private
static
long
nextNegativeLong
()
{
long
ret
=
s_nextId
.
getAndDecrement
();
if
(
ret
>
0
)
{
ret
*=
-
1
;
}
else
if
(
ret
==
0
)
{
ret
=
Long
.
MIN_VALUE
;
}
return
ret
;
}
}
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