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
53bbebcb
Commit
53bbebcb
authored
May 09, 2016
by
Hemanth Yamijala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-759 HiveHookIT.testAlterTableChangeColumn is consistently failing on master (yhemanth)
parent
2c0dc406
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
HiveHookIT.java
.../src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
+18
-10
release-log.txt
release-log.txt
+1
-0
No files found.
addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
View file @
53bbebcb
...
...
@@ -40,6 +40,7 @@ import org.apache.hadoop.fs.Path;
import
org.apache.hadoop.hive.conf.HiveConf
;
import
org.apache.hadoop.hive.metastore.TableType
;
import
org.apache.hadoop.hive.metastore.api.hive_metastoreConstants
;
import
org.apache.hadoop.hive.ql.CommandNeedRetryException
;
import
org.apache.hadoop.hive.ql.Driver
;
import
org.apache.hadoop.hive.ql.hooks.Entity
;
import
org.apache.hadoop.hive.ql.metadata.Table
;
...
...
@@ -100,10 +101,7 @@ public class HiveHookIT {
}
private
void
runCommand
(
String
cmd
)
throws
Exception
{
LOG
.
debug
(
"Running command '{}'"
,
cmd
);
ss
.
setCommandType
(
null
);
CommandProcessorResponse
response
=
driver
.
run
(
cmd
);
assertEquals
(
response
.
getResponseCode
(),
0
);
runCommandWithDelay
(
cmd
,
0
);
}
@Test
...
...
@@ -708,7 +706,8 @@ public class HiveHookIT {
String
newColName
=
"name1"
;
String
tableName
=
createTable
();
String
query
=
String
.
format
(
"alter table %s change %s %s string"
,
tableName
,
oldColName
,
newColName
);
runCommand
(
query
);
runCommandWithDelay
(
query
,
1000
);
assertColumnIsNotRegistered
(
HiveMetaStoreBridge
.
getColumnQualifiedName
(
HiveMetaStoreBridge
.
getTableQualifiedName
(
CLUSTER_NAME
,
DEFAULT_DB
,
tableName
),
oldColName
));
assertColumnIsRegistered
(
HiveMetaStoreBridge
.
getColumnQualifiedName
(
...
...
@@ -723,7 +722,7 @@ public class HiveHookIT {
newColName
=
"name2"
;
final
String
newColType
=
"int"
;
query
=
String
.
format
(
"alter table %s change column %s %s %s"
,
tableName
,
oldColName
,
newColName
,
newColType
);
runCommand
(
query
);
runCommand
WithDelay
(
query
,
1000
);
columns
=
getColumns
(
DEFAULT_DB
,
tableName
);
Assert
.
assertEquals
(
columns
.
size
(),
2
);
...
...
@@ -746,7 +745,7 @@ public class HiveHookIT {
final
String
comment
=
"added comment"
;
query
=
String
.
format
(
"alter table %s change column %s %s %s COMMENT '%s' after id"
,
tableName
,
oldColName
,
newColName
,
newColType
,
comment
);
runCommand
(
query
);
runCommand
WithDelay
(
query
,
1000
);
columns
=
getColumns
(
DEFAULT_DB
,
tableName
);
Assert
.
assertEquals
(
columns
.
size
(),
2
);
...
...
@@ -755,7 +754,6 @@ public class HiveHookIT {
HiveMetaStoreBridge
.
getTableQualifiedName
(
CLUSTER_NAME
,
DEFAULT_DB
,
tableName
),
oldColName
));
newColQualifiedName
=
HiveMetaStoreBridge
.
getColumnQualifiedName
(
HiveMetaStoreBridge
.
getTableQualifiedName
(
CLUSTER_NAME
,
DEFAULT_DB
,
tableName
),
newColName
);
assertColumnIsRegistered
(
newColQualifiedName
,
new
AssertPredicate
()
{
@Override
public
void
assertOnEntity
(
Referenceable
entity
)
throws
Exception
{
...
...
@@ -768,7 +766,7 @@ public class HiveHookIT {
newColName
=
"name4"
;
query
=
String
.
format
(
"alter table %s change column %s %s %s first"
,
tableName
,
oldColName
,
newColName
,
newColType
);
runCommand
(
query
);
runCommand
WithDelay
(
query
,
1000
);
columns
=
getColumns
(
DEFAULT_DB
,
tableName
);
Assert
.
assertEquals
(
columns
.
size
(),
2
);
...
...
@@ -795,7 +793,7 @@ public class HiveHookIT {
oldColName
=
"name4"
;
newColName
=
"name5"
;
query
=
String
.
format
(
"alter table %s change column %s %s %s after id"
,
tableName
,
oldColName
,
newColName
,
newColType
);
runCommand
(
query
);
runCommand
WithDelay
(
query
,
1000
);
columns
=
getColumns
(
DEFAULT_DB
,
tableName
);
Assert
.
assertEquals
(
columns
.
size
(),
2
);
...
...
@@ -820,6 +818,16 @@ public class HiveHookIT {
);
}
private
void
runCommandWithDelay
(
String
cmd
,
int
sleepMs
)
throws
CommandNeedRetryException
,
InterruptedException
{
LOG
.
debug
(
"Running command '{}'"
,
cmd
);
ss
.
setCommandType
(
null
);
CommandProcessorResponse
response
=
driver
.
run
(
cmd
);
assertEquals
(
response
.
getResponseCode
(),
0
);
if
(
sleepMs
!=
0
)
{
Thread
.
sleep
(
sleepMs
);
}
}
@Test
public
void
testTruncateTable
()
throws
Exception
{
String
tableName
=
createTable
(
false
);
...
...
release-log.txt
View file @
53bbebcb
...
...
@@ -18,6 +18,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset
ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags)
ALL CHANGES:
ATLAS-759 HiveHookIT.testAlterTableChangeColumn is consistently failing on master (yhemanth)
ATLAS-690 Read timed out exceptions when tables are imported into Atlas (yhemanth via shwethags)
ATLAS-585 NotificationHookConsumer creates new AtlasClient for every message (shwethags)
ATLAS-682 Set HBase root dir to be relative to test target directory for HBaseBasedAuditRepositoryTest (shwethags via yhemanth)
...
...
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