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
67acb9d6
Commit
67acb9d6
authored
Jul 20, 2016
by
Shwetha GS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-639 Exception for lineage request (svimal2106 via shwethags)
parent
f672aaef
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
4 deletions
+32
-4
HiveHookIT.java
.../src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
+2
-2
release-log.txt
release-log.txt
+1
-0
GremlinQuery.scala
.../src/main/scala/org/apache/atlas/query/GremlinQuery.scala
+3
-2
BaseRepositoryTest.java
...ry/src/test/java/org/apache/atlas/BaseRepositoryTest.java
+10
-0
DataSetLineageServiceTest.java
...org/apache/atlas/discovery/DataSetLineageServiceTest.java
+16
-0
GraphBackedDiscoveryServiceTest.java
...ache/atlas/discovery/GraphBackedDiscoveryServiceTest.java
+0
-0
No files found.
addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
View file @
67acb9d6
...
...
@@ -1620,7 +1620,7 @@ public class HiveHookIT {
expectedProps
.
put
(
"testPropKey2"
,
"testPropValue2"
);
//Add another property
query
=
String
.
format
(
fmtQuery
,
entityName
,
SET_OP
,
getSerializedProps
(
expectedProps
));
runCommand
(
query
);
runCommand
WithDelay
(
query
,
1000
);
verifyEntityProperties
(
entityType
,
entityName
,
expectedProps
,
false
);
if
(
entityType
!=
Entity
.
Type
.
DATABASE
)
{
...
...
@@ -1628,7 +1628,7 @@ public class HiveHookIT {
//Unset all the props
StringBuilder
sb
=
new
StringBuilder
(
"'"
);
query
=
String
.
format
(
fmtQuery
,
entityName
,
UNSET_OP
,
Joiner
.
on
(
"','"
).
skipNulls
().
appendTo
(
sb
,
expectedProps
.
keySet
()).
append
(
'\''
));
runCommand
(
query
);
runCommand
WithDelay
(
query
,
1000
);
verifyEntityProperties
(
entityType
,
entityName
,
expectedProps
,
true
);
}
...
...
release-log.txt
View file @
67acb9d6
...
...
@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL CHANGES:
ATLAS-639 Exception for lineage request (svimal2106 via shwethags)
ATLAS-1022 Update typesystem wiki with details (yhemanth via shwethags)
ATLAS-1021 Update Atlas architecture wiki (yhemanth via sumasai)
ATLAS-957 Atlas is not capturing topologies that have $ in the data payload (shwethags)
...
...
repository/src/main/scala/org/apache/atlas/query/GremlinQuery.scala
View file @
67acb9d6
...
...
@@ -280,9 +280,10 @@ class GremlinTranslator(expr: Expression,
val
inputQry
=
genQuery
(
input
,
inSelect
)
val
loopingPathGExpr
=
genQuery
(
loopExpr
,
inSelect
)
val
loopGExpr
=
s
"""loop("${input.asInstanceOf[AliasExpression].alias}")"""
val
untilCriteria
=
if
(
t
.
isDefined
)
s
"{it.loops < ${t.get.value}}"
else
"{true}"
val
untilCriteria
=
if
(
t
.
isDefined
)
s
"{it.loops < ${t.get.value}}"
else
"{
it.path.contains(it.object)?false:
true}"
val
loopObjectGExpr
=
gPersistenceBehavior
.
loopObjectExpression
(
input
.
dataType
)
s
"""${inputQry}.${loopingPathGExpr}.${loopGExpr}${untilCriteria}${loopObjectGExpr}"""
val
enablePathExpr
=
s
".enablePath()"
s
"""${inputQry}.${loopingPathGExpr}.${loopGExpr}${untilCriteria}${loopObjectGExpr}${enablePathExpr}"""
}
case
BackReference
(
alias
,
_
,
_
)
=>
if
(
inSelect
)
gPersistenceBehavior
.
fieldPrefixInSelect
else
s
"""back("$alias")"""
...
...
repository/src/test/java/org/apache/atlas/BaseRepositoryTest.java
View file @
67acb9d6
...
...
@@ -224,6 +224,16 @@ public class BaseRepositoryTest {
table
(
"sales_fact_daily_mv"
,
"sales fact daily materialized view"
,
reportingDB
,
sd
,
"Joe BI"
,
"Managed"
,
salesFactColumns
,
"Metric"
);
Id
circularLineageTable1
=
table
(
"table1"
,
""
,
reportingDB
,
sd
,
"Vimal"
,
"Managed"
,
salesFactColumns
,
"Metric"
);
Id
circularLineageTable2
=
table
(
"table2"
,
""
,
reportingDB
,
sd
,
"Vimal"
,
"Managed"
,
salesFactColumns
,
"Metric"
);
loadProcess
(
"circularLineage1"
,
"hive query for daily summary"
,
"John ETL"
,
ImmutableList
.
of
(
circularLineageTable1
),
ImmutableList
.
of
(
circularLineageTable2
),
"create table as select "
,
"plan"
,
"id"
,
"graph"
,
"ETL"
);
loadProcess
(
"circularLineage2"
,
"hive query for daily summary"
,
"John ETL"
,
ImmutableList
.
of
(
circularLineageTable2
),
ImmutableList
.
of
(
circularLineageTable1
),
"create table as select "
,
"plan"
,
"id"
,
"graph"
,
"ETL"
);
loadProcess
(
"loadSalesDaily"
,
"hive query for daily summary"
,
"John ETL"
,
ImmutableList
.
of
(
salesFact
,
timeDim
),
ImmutableList
.
of
(
salesFactDaily
),
"create table as select "
,
"plan"
,
"id"
,
"graph"
,
"ETL"
);
...
...
repository/src/test/java/org/apache/atlas/discovery/DataSetLineageServiceTest.java
View file @
67acb9d6
...
...
@@ -176,6 +176,22 @@ public class DataSetLineageServiceTest extends BaseRepositoryTest {
}
@Test
public
void
testCircularLineage
()
throws
Exception
{
JSONObject
results
=
new
JSONObject
(
lineageService
.
getInputsGraph
(
"table2"
));
assertNotNull
(
results
);
System
.
out
.
println
(
"inputs graph = "
+
results
);
JSONObject
values
=
results
.
getJSONObject
(
"values"
);
assertNotNull
(
values
);
final
JSONObject
vertices
=
values
.
getJSONObject
(
"vertices"
);
Assert
.
assertEquals
(
vertices
.
length
(),
2
);
final
JSONObject
edges
=
values
.
getJSONObject
(
"edges"
);
Assert
.
assertEquals
(
edges
.
length
(),
4
);
}
@Test
public
void
testGetInputsGraphForEntity
()
throws
Exception
{
ITypedReferenceableInstance
entity
=
repository
.
getEntityDefinition
(
HIVE_TABLE_TYPE
,
"name"
,
"sales_fact_monthly_mv"
);
...
...
repository/src/test/java/org/apache/atlas/discovery/GraphBackedDiscoveryServiceTest.java
View file @
67acb9d6
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