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
f75d7f40
Commit
f75d7f40
authored
6 years ago
by
Sarath Subramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3202: Hive hook: getStorageDescEntity() throws NPE if bucketCols is null
parent
49db4cac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
BaseHiveEvent.java
...java/org/apache/atlas/hive/hook/events/BaseHiveEvent.java
+4
-2
No files found.
addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/BaseHiveEvent.java
View file @
f75d7f40
...
@@ -475,7 +475,7 @@ public abstract class BaseHiveEvent {
...
@@ -475,7 +475,7 @@ public abstract class BaseHiveEvent {
ret
.
setAttribute
(
ATTRIBUTE_NUM_BUCKETS
,
sd
.
getNumBuckets
());
ret
.
setAttribute
(
ATTRIBUTE_NUM_BUCKETS
,
sd
.
getNumBuckets
());
ret
.
setAttribute
(
ATTRIBUTE_STORED_AS_SUB_DIRECTORIES
,
sd
.
isStoredAsSubDirectories
());
ret
.
setAttribute
(
ATTRIBUTE_STORED_AS_SUB_DIRECTORIES
,
sd
.
isStoredAsSubDirectories
());
if
(
sd
.
getBucketCols
().
size
()
>
0
)
{
if
(
sd
.
getBucketCols
()
!=
null
&&
sd
.
getBucketCols
()
.
size
()
>
0
)
{
ret
.
setAttribute
(
ATTRIBUTE_BUCKET_COLS
,
sd
.
getBucketCols
());
ret
.
setAttribute
(
ATTRIBUTE_BUCKET_COLS
,
sd
.
getBucketCols
());
}
}
...
@@ -514,8 +514,9 @@ public abstract class BaseHiveEvent {
...
@@ -514,8 +514,9 @@ public abstract class BaseHiveEvent {
protected
List
<
AtlasEntity
>
getColumnEntities
(
AtlasObjectId
tableId
,
Table
table
,
List
<
FieldSchema
>
fieldSchemas
)
{
protected
List
<
AtlasEntity
>
getColumnEntities
(
AtlasObjectId
tableId
,
Table
table
,
List
<
FieldSchema
>
fieldSchemas
)
{
List
<
AtlasEntity
>
ret
=
new
ArrayList
<>();
List
<
AtlasEntity
>
ret
=
new
ArrayList
<>();
boolean
isKnownTable
=
tableId
.
getGuid
()
==
null
;
boolean
isKnownTable
=
tableId
.
getGuid
()
==
null
;
int
columnPosition
=
0
;
int
columnPosition
=
0
;
if
(
CollectionUtils
.
isNotEmpty
(
fieldSchemas
))
{
for
(
FieldSchema
fieldSchema
:
fieldSchemas
)
{
for
(
FieldSchema
fieldSchema
:
fieldSchemas
)
{
String
colQualifiedName
=
getQualifiedName
(
table
,
fieldSchema
);
String
colQualifiedName
=
getQualifiedName
(
table
,
fieldSchema
);
AtlasEntity
column
=
context
.
getEntity
(
colQualifiedName
);
AtlasEntity
column
=
context
.
getEntity
(
colQualifiedName
);
...
@@ -543,6 +544,7 @@ public abstract class BaseHiveEvent {
...
@@ -543,6 +544,7 @@ public abstract class BaseHiveEvent {
ret
.
add
(
column
);
ret
.
add
(
column
);
}
}
}
return
ret
;
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