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
82cdd700
Commit
82cdd700
authored
4 years ago
by
chaitali borole
Committed by
nixonrodrigues
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3994 : import-hive.sh script fails when missing mandatory attribute value is null
parent
7925946a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
HiveMetaStoreBridge.java
...ava/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
+6
-2
No files found.
addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
View file @
82cdd700
...
...
@@ -91,6 +91,7 @@ public class HiveMetaStoreBridge {
public
static
final
String
CONF_PREFIX
=
"atlas.hook.hive."
;
public
static
final
String
CLUSTER_NAME_KEY
=
"atlas.cluster.name"
;
public
static
final
String
HIVE_USERNAME
=
"atlas.hook.hive.default.username"
;
public
static
final
String
HIVE_METADATA_NAMESPACE
=
"atlas.metadata.namespace"
;
public
static
final
String
HDFS_PATH_CONVERT_TO_LOWER_CASE
=
CONF_PREFIX
+
"hdfs_path.convert_to_lowercase"
;
public
static
final
String
HOOK_AWS_S3_ATLAS_MODEL_VERSION
=
CONF_PREFIX
+
"aws_s3.atlas.model.version"
;
...
...
@@ -117,7 +118,6 @@ public class HiveMetaStoreBridge {
private
String
awsS3AtlasModelVersion
=
null
;
public
static
void
main
(
String
[]
args
)
{
int
exitCode
=
EXIT_CODE_FAILED
;
AtlasClientV2
atlasClientV2
=
null
;
...
...
@@ -398,7 +398,11 @@ public class HiveMetaStoreBridge {
processInst
.
setAttribute
(
ATTRIBUTE_CLUSTER_NAME
,
metadataNamespace
);
processInst
.
setRelationshipAttribute
(
ATTRIBUTE_INPUTS
,
Collections
.
singletonList
(
AtlasTypeUtil
.
getAtlasRelatedObjectId
(
pathInst
,
RELATIONSHIP_DATASET_PROCESS_INPUTS
)));
processInst
.
setRelationshipAttribute
(
ATTRIBUTE_OUTPUTS
,
Collections
.
singletonList
(
AtlasTypeUtil
.
getAtlasRelatedObjectId
(
tableInst
,
RELATIONSHIP_PROCESS_DATASET_OUTPUTS
)));
processInst
.
setAttribute
(
ATTRIBUTE_USER_NAME
,
table
.
getOwner
());
String
userName
=
table
.
getOwner
();
if
(
StringUtils
.
isEmpty
(
userName
))
{
userName
=
ApplicationProperties
.
get
().
getString
(
HIVE_USERNAME
,
"hive"
);
}
processInst
.
setAttribute
(
ATTRIBUTE_USER_NAME
,
userName
);
processInst
.
setAttribute
(
ATTRIBUTE_START_TIME
,
now
);
processInst
.
setAttribute
(
ATTRIBUTE_END_TIME
,
now
);
processInst
.
setAttribute
(
ATTRIBUTE_OPERATION_TYPE
,
"CREATETABLE"
);
...
...
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