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
d0a9b999
Commit
d0a9b999
authored
Jul 25, 2016
by
Madhan Neethiraj
Committed by
Suma Shivaprasad
Jul 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1053: Fix for issues flagged by Coverity scan - potential NPE
parent
56e97e22
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
HiveMetaStoreBridge.java
...ava/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
+6
-0
HiveHook.java
...ge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
+3
-0
release-log.txt
release-log.txt
+1
-0
No files found.
addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
View file @
d0a9b999
...
...
@@ -123,9 +123,12 @@ public class HiveMetaStoreBridge {
List
<
String
>
databases
=
hiveClient
.
getAllDatabases
();
for
(
String
databaseName
:
databases
)
{
Referenceable
dbReference
=
registerDatabase
(
databaseName
);
if
(
dbReference
!=
null
)
{
importTables
(
dbReference
,
databaseName
,
failOnError
);
}
}
}
/**
* Create a Hive Database entity
...
...
@@ -146,6 +149,8 @@ public class HiveMetaStoreBridge {
private
Referenceable
registerDatabase
(
String
databaseName
)
throws
Exception
{
Referenceable
dbRef
=
getDatabaseReference
(
clusterName
,
databaseName
);
Database
db
=
hiveClient
.
getDatabase
(
databaseName
);
if
(
db
!=
null
)
{
if
(
dbRef
==
null
)
{
dbRef
=
createDBInstance
(
db
);
dbRef
=
registerInstance
(
dbRef
);
...
...
@@ -154,6 +159,7 @@ public class HiveMetaStoreBridge {
dbRef
=
createOrUpdateDBInstance
(
db
,
dbRef
);
updateInstance
(
dbRef
);
}
}
return
dbRef
;
}
...
...
addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
View file @
d0a9b999
...
...
@@ -499,6 +499,9 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
if
(
db
!=
null
)
{
db
=
dgiBridge
.
hiveClient
.
getDatabase
(
db
.
getName
());
}
if
(
db
!=
null
)
{
Referenceable
dbEntity
=
dgiBridge
.
createDBInstance
(
db
);
entities
.
add
(
dbEntity
);
...
...
release-log.txt
View file @
d0a9b999
...
...
@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
ALL CHANGES:
ATLAS-1053 Fix issues flagged by Coverity scan - potential NPE (mneethiraj via sumasai)
ATLAS-1052 Fix NPE in HiveHook due to null Session State (sumasai)
ATLAS-1051 Sqoop Hook does not package HDFS model jars which is required (sumasai)
ATLAS-1049 List types by supertype (shwethags via sumasai)
...
...
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