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
67a681f2
Commit
67a681f2
authored
6 years ago
by
Sarath Subramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3067: Fix intermittent IT failure in HiveHookIT.testAlterTableLocation()
parent
2c0a8bcc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
HiveITBase.java
...ridge/src/test/java/org/apache/atlas/hive/HiveITBase.java
+13
-3
No files found.
addons/hive-bridge/src/test/java/org/apache/atlas/hive/HiveITBase.java
View file @
67a681f2
...
@@ -52,7 +52,6 @@ import org.apache.hadoop.security.UserGroupInformation;
...
@@ -52,7 +52,6 @@ import org.apache.hadoop.security.UserGroupInformation;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.BeforeClass
;
import
java.io.File
;
import
java.io.File
;
...
@@ -60,7 +59,7 @@ import java.util.ArrayList;
...
@@ -60,7 +59,7 @@ import java.util.ArrayList;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.
Date
;
import
java.util.
HashSet
;
import
java.util.LinkedHashSet
;
import
java.util.LinkedHashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -71,6 +70,7 @@ import java.util.SortedSet;
...
@@ -71,6 +70,7 @@ import java.util.SortedSet;
import
static
org
.
apache
.
atlas
.
hive
.
bridge
.
HiveMetaStoreBridge
.
HDFS_PATH
;
import
static
org
.
apache
.
atlas
.
hive
.
bridge
.
HiveMetaStoreBridge
.
HDFS_PATH
;
import
static
org
.
testng
.
Assert
.
assertEquals
;
import
static
org
.
testng
.
Assert
.
assertEquals
;
import
static
org
.
testng
.
Assert
.
assertNotNull
;
import
static
org
.
testng
.
Assert
.
assertNotNull
;
import
static
org
.
testng
.
Assert
.
assertTrue
;
import
static
org
.
testng
.
Assert
.
fail
;
import
static
org
.
testng
.
Assert
.
fail
;
public
class
HiveITBase
{
public
class
HiveITBase
{
...
@@ -287,10 +287,20 @@ public class HiveITBase {
...
@@ -287,10 +287,20 @@ public class HiveITBase {
String
testPathNormed
=
lower
(
path
.
toString
());
String
testPathNormed
=
lower
(
path
.
toString
());
String
hdfsPathId
=
assertHDFSPathIsRegistered
(
testPathNormed
);
String
hdfsPathId
=
assertHDFSPathIsRegistered
(
testPathNormed
);
Assert
.
assertEquals
(
hdfsPathIds
.
get
(
0
).
getGuid
()
,
hdfsPathId
);
assertHDFSPathIdsContain
(
hdfsPathIds
,
hdfsPathId
);
}
}
}
}
private
void
assertHDFSPathIdsContain
(
List
<
AtlasObjectId
>
hdfsPathObjectIds
,
String
hdfsPathId
)
{
Set
<
String
>
hdfsPathGuids
=
new
HashSet
<>();
for
(
AtlasObjectId
hdfsPathObjectId
:
hdfsPathObjectIds
)
{
hdfsPathGuids
.
add
(
hdfsPathObjectId
.
getGuid
());
}
assertTrue
(
hdfsPathGuids
.
contains
(
hdfsPathId
));
}
protected
String
assertHDFSPathIsRegistered
(
String
path
)
throws
Exception
{
protected
String
assertHDFSPathIsRegistered
(
String
path
)
throws
Exception
{
LOG
.
debug
(
"Searching for hdfs path {}"
,
path
);
LOG
.
debug
(
"Searching for hdfs path {}"
,
path
);
// ATLAS-2444 HDFS name node federation adds the cluster name to the qualifiedName
// ATLAS-2444 HDFS name node federation adds the cluster name to the qualifiedName
...
...
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