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
1cf48c3e
Commit
1cf48c3e
authored
May 11, 2015
by
Aaron Dossett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix input/output
parent
ac594b24
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
7 deletions
+9
-7
HiveHook.java
...n/java/org/apache/hadoop/metadata/hive/hook/HiveHook.java
+1
-1
HiveDataModelGenerator.java
...he/hadoop/metadata/hive/model/HiveDataModelGenerator.java
+1
-1
HiveLineageService.java
.../apache/hadoop/metadata/discovery/HiveLineageService.java
+6
-4
application.properties
src/conf/application.properties
+1
-1
No files found.
addons/hive-bridge/src/main/java/org/apache/hadoop/metadata/hive/hook/HiveHook.java
View file @
1cf48c3e
...
...
@@ -246,7 +246,7 @@ public class HiveHook implements ExecuteWithHookContext, HiveSemanticAnalyzerHoo
LOG
.
debug
(
"Registering CTAS query: {}"
,
queryStr
);
Referenceable
processReferenceable
=
new
Referenceable
(
HiveDataTypes
.
HIVE_PROCESS
.
getName
());
processReferenceable
.
set
(
"
processN
ame"
,
operation
.
getOperationName
());
processReferenceable
.
set
(
"
n
ame"
,
operation
.
getOperationName
());
processReferenceable
.
set
(
"startTime"
,
queryStartTime
);
processReferenceable
.
set
(
"userName"
,
user
);
List
<
Referenceable
>
source
=
new
ArrayList
<>();
...
...
addons/hive-bridge/src/main/java/org/apache/hadoop/metadata/hive/model/HiveDataModelGenerator.java
View file @
1cf48c3e
...
...
@@ -480,7 +480,7 @@ public class HiveDataModelGenerator {
private
void
createProcessClass
()
throws
MetadataException
{
AttributeDefinition
[]
attributeDefinitions
=
new
AttributeDefinition
[]{
new
AttributeDefinition
(
"
processN
ame"
,
DataTypes
.
STRING_TYPE
.
getName
(),
new
AttributeDefinition
(
"
n
ame"
,
DataTypes
.
STRING_TYPE
.
getName
(),
Multiplicity
.
REQUIRED
,
false
,
null
),
new
AttributeDefinition
(
"startTime"
,
DataTypes
.
INT_TYPE
.
getName
(),
Multiplicity
.
REQUIRED
,
false
,
null
),
...
...
repository/src/main/java/org/apache/hadoop/metadata/discovery/HiveLineageService.java
View file @
1cf48c3e
...
...
@@ -100,7 +100,6 @@ public class HiveLineageService implements LineageService {
public
String
getOutputs
(
String
tableName
)
throws
DiscoveryException
{
LOG
.
info
(
"Fetching lineage outputs for tableName={}"
,
tableName
);
try
{
HiveWhereUsedQuery
outputsQuery
=
new
HiveWhereUsedQuery
(
HIVE_TABLE_TYPE_NAME
,
tableName
,
HIVE_PROCESS_TYPE_NAME
,
HIVE_PROCESS_INPUT_ATTRIBUTE_NAME
,
HIVE_PROCESS_OUTPUT_ATTRIBUTE_NAME
,
...
...
@@ -108,9 +107,11 @@ public class HiveLineageService implements LineageService {
graphPersistenceStrategy
,
titanGraph
);
Expressions
.
Expression
expression
=
outputsQuery
.
expr
();
LOG
.
debug
(
"Expression is ["
+
expression
.
toString
()
+
"]"
);
try
{
return
discoveryService
.
evaluate
(
expression
).
toJson
();
}
catch
(
Exception
e
)
{
// unable to catch ExpressionException
throw
new
DiscoveryException
(
"Invalid expression"
,
e
);
throw
new
DiscoveryException
(
"Invalid expression
["
+
expression
.
toString
()
+
"]
"
,
e
);
}
}
...
...
@@ -124,7 +125,6 @@ public class HiveLineageService implements LineageService {
public
String
getInputs
(
String
tableName
)
throws
DiscoveryException
{
LOG
.
info
(
"Fetching lineage inputs for tableName={}"
,
tableName
);
try
{
HiveLineageQuery
inputsQuery
=
new
HiveLineageQuery
(
HIVE_TABLE_TYPE_NAME
,
tableName
,
HIVE_PROCESS_TYPE_NAME
,
HIVE_PROCESS_INPUT_ATTRIBUTE_NAME
,
HIVE_PROCESS_OUTPUT_ATTRIBUTE_NAME
,
...
...
@@ -132,9 +132,11 @@ public class HiveLineageService implements LineageService {
graphPersistenceStrategy
,
titanGraph
);
Expressions
.
Expression
expression
=
inputsQuery
.
expr
();
LOG
.
debug
(
"Expression is ["
+
expression
.
toString
()
+
"]"
);
try
{
return
discoveryService
.
evaluate
(
expression
).
toJson
();
}
catch
(
Exception
e
)
{
// unable to catch ExpressionException
throw
new
DiscoveryException
(
"Invalid expression"
,
e
);
throw
new
DiscoveryException
(
"Invalid expression
["
+
expression
.
toString
()
+
"]
"
,
e
);
}
}
...
...
src/conf/application.properties
View file @
1cf48c3e
...
...
@@ -34,7 +34,7 @@ metadata.graph.index.search.elasticsearch.create.sleep=2000
metadata.lineage.hive.table.type.name
=
hive_table
metadata.lineage.hive.column.type.name
=
Column
metadata.lineage.hive.table.column.name
=
columns
metadata.lineage.hive.process.type.name
=
LoadP
rocess
metadata.lineage.hive.process.type.name
=
hive_p
rocess
metadata.lineage.hive.process.inputs.name
=
inputTables
metadata.lineage.hive.process.outputs.name
=
outputTables
...
...
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