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
984b359c
Commit
984b359c
authored
Feb 06, 2020
by
Ashutosh Mestry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3608: Hive Bridge: Hive Metastore: Alter Table Query Not Handled Correctly.
parent
a6cdb608
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
HiveMetastoreHookImpl.java
...ava/org/apache/atlas/hive/hook/HiveMetastoreHookImpl.java
+5
-4
No files found.
addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveMetastoreHookImpl.java
View file @
984b359c
...
...
@@ -94,7 +94,8 @@ public class HiveMetastoreHookImpl extends MetaStoreEventListener {
context
.
setOperation
(
ALTERTABLE_RENAME
);
}
else
if
(
isColumnRename
(
oldTable
,
newTable
,
context
))
{
context
.
setOperation
(
ALTERTABLE_RENAMECOL
);
}
else
if
(
isAlterTableProperty
(
tableEvent
)){
}
else
if
(
isAlterTableProperty
(
tableEvent
,
"last_modified_time"
)
||
isAlterTableProperty
(
tableEvent
,
"transient_lastDdlTime"
))
{
context
.
setOperation
(
ALTERTABLE_PROPERTIES
);
// map other alter table operations to ALTERTABLE_PROPERTIES
}
...
...
@@ -191,10 +192,10 @@ public class HiveMetastoreHookImpl extends MetaStoreEventListener {
return
isColumnRename
;
}
private
boolean
isAlterTableProperty
(
AlterTableEvent
tableEvent
)
{
private
boolean
isAlterTableProperty
(
AlterTableEvent
tableEvent
,
String
propertyToCheck
)
{
final
boolean
ret
;
String
oldTableModifiedTime
=
tableEvent
.
getOldTable
().
getParameters
().
get
(
"last_modified_time"
);
String
newTableModifiedTime
=
tableEvent
.
getNewTable
().
getParameters
().
get
(
"last_modified_time"
);
String
oldTableModifiedTime
=
tableEvent
.
getOldTable
().
getParameters
().
get
(
propertyToCheck
);
String
newTableModifiedTime
=
tableEvent
.
getNewTable
().
getParameters
().
get
(
propertyToCheck
);
if
(
oldTableModifiedTime
==
null
)
{
...
...
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