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
b4e4f604
Commit
b4e4f604
authored
Sep 16, 2020
by
Pinal
Committed by
nixonrodrigues
Oct 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3938 : Import Hive Script: Support deletion of non existing database and table entities
parent
d0de3897
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
10 deletions
+19
-10
import-hive.sh
addons/hive-bridge/src/bin/import-hive.sh
+1
-0
HiveMetaStoreBridge.java
...ava/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
+0
-0
AtlasClientV2.java
...ient-v2/src/main/java/org/apache/atlas/AtlasClientV2.java
+18
-10
No files found.
addons/hive-bridge/src/bin/import-hive.sh
View file @
b4e4f604
...
...
@@ -139,6 +139,7 @@ do
--database
)
IMPORT_ARGS
=
"
$IMPORT_ARGS
--database
$1
"
;
shift
;;
--table
)
IMPORT_ARGS
=
"
$IMPORT_ARGS
--table
$1
"
;
shift
;;
--filename
)
IMPORT_ARGS
=
"
$IMPORT_ARGS
--filename
$1
"
;
shift
;;
-deleteNonExisting
)
IMPORT_ARGS
=
"
$IMPORT_ARGS
-deleteNonExisting"
;;
""
)
break
;;
*
)
JVM_ARGS
=
"
$JVM_ARGS
$option
"
esac
...
...
addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
View file @
b4e4f604
This diff is collapsed.
Click to expand it.
client/client-v2/src/main/java/org/apache/atlas/AtlasClientV2.java
View file @
b4e4f604
...
...
@@ -123,6 +123,8 @@ public class AtlasClientV2 extends AtlasBaseClient {
private
static
final
String
RELATIONSHIPS_URI
=
BASE_URI
+
"v2/relationship/"
;
private
static
final
String
BULK_HEADERS
=
"bulk/headers"
;
private
static
final
String
BULK_SET_CLASSIFICATIONS
=
"bulk/setClassifications"
;
private
static
final
String
RELATIONSHIP_URI
=
DISCOVERY_URI
+
"/relationship"
;
//Glossary APIs
private
static
final
String
GLOSSARY_URI
=
BASE_URI
+
"v2/glossary"
;
...
...
@@ -664,16 +666,22 @@ public class AtlasClientV2 extends AtlasBaseClient {
}
public
AtlasSearchResult
basicSearch
(
String
typeName
,
String
classification
,
String
query
,
boolean
excludeDeletedEntities
,
int
limit
,
int
offset
)
throws
AtlasServiceException
{
MultivaluedMap
<
String
,
String
>
queryParams
=
new
MultivaluedMapImpl
();
queryParams
.
add
(
"typeName"
,
typeName
);
queryParams
.
add
(
"classification"
,
classification
);
queryParams
.
add
(
QUERY
,
query
);
queryParams
.
add
(
"excludeDeletedEntities"
,
String
.
valueOf
(
excludeDeletedEntities
));
queryParams
.
add
(
LIMIT
,
String
.
valueOf
(
limit
));
queryParams
.
add
(
OFFSET
,
String
.
valueOf
(
offset
));
return
this
.
basicSearch
(
typeName
,
null
,
classification
,
query
,
excludeDeletedEntities
,
limit
,
offset
);
}
public
AtlasSearchResult
basicSearch
(
String
typeName
,
SearchParameters
.
FilterCriteria
entityFilters
,
String
classification
,
String
query
,
boolean
excludeDeletedEntities
,
int
limit
,
int
offset
)
throws
AtlasServiceException
{
SearchParameters
parameters
=
new
SearchParameters
();
parameters
.
setTypeName
(
typeName
);
parameters
.
setClassification
(
classification
);
parameters
.
setQuery
(
query
);
parameters
.
setExcludeDeletedEntities
(
excludeDeletedEntities
);
parameters
.
setLimit
(
limit
);
parameters
.
setOffset
(
offset
);
if
(
entityFilters
!=
null
){
parameters
.
setEntityFilters
(
entityFilters
);
}
return
callAPI
(
API_V2
.
BASIC_SEARCH
,
AtlasSearchResult
.
class
,
queryParam
s
);
return
callAPI
(
API_V2
.
BASIC_SEARCH
,
AtlasSearchResult
.
class
,
parameter
s
);
}
public
AtlasSearchResult
facetedSearch
(
SearchParameters
searchParameters
)
throws
AtlasServiceException
{
...
...
@@ -1202,7 +1210,7 @@ public class AtlasClientV2 extends AtlasBaseClient {
// Discovery APIs
public
static
final
API_V2
DSL_SEARCH
=
new
API_V2
(
DSL_SEARCH_URI
,
HttpMethod
.
GET
,
Response
.
Status
.
OK
);
public
static
final
API_V2
FULL_TEXT_SEARCH
=
new
API_V2
(
FULL_TEXT_SEARCH_URI
,
HttpMethod
.
GET
,
Response
.
Status
.
OK
);
public
static
final
API_V2
BASIC_SEARCH
=
new
API_V2
(
BASIC_SEARCH_URI
,
HttpMethod
.
GE
T
,
Response
.
Status
.
OK
);
public
static
final
API_V2
BASIC_SEARCH
=
new
API_V2
(
BASIC_SEARCH_URI
,
HttpMethod
.
POS
T
,
Response
.
Status
.
OK
);
public
static
final
API_V2
FACETED_SEARCH
=
new
API_V2
(
FACETED_SEARCH_URI
,
HttpMethod
.
POST
,
Response
.
Status
.
OK
);
public
static
final
API_V2
ATTRIBUTE_SEARCH
=
new
API_V2
(
DISCOVERY_URI
+
"/attribute"
,
HttpMethod
.
GET
,
Response
.
Status
.
OK
);
public
static
final
API_V2
RELATIONSHIP_SEARCH
=
new
API_V2
(
DISCOVERY_URI
+
"/relationship"
,
HttpMethod
.
GET
,
Response
.
Status
.
OK
);
...
...
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