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
5b40e654
Commit
5b40e654
authored
9 years ago
by
Venkatesh Seetharam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG-38586 remove /lineage/hive/table/{tableName}/{outputs,inputs} api
parent
e1f5cb67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
135 deletions
+0
-135
HiveLineageResource.java
...he/hadoop/metadata/web/resources/HiveLineageResource.java
+0
-73
HiveLineageJerseyResourceIT.java
...p/metadata/web/resources/HiveLineageJerseyResourceIT.java
+0
-62
No files found.
webapp/src/main/java/org/apache/hadoop/metadata/web/resources/HiveLineageResource.java
View file @
5b40e654
...
@@ -58,41 +58,6 @@ public class HiveLineageResource {
...
@@ -58,41 +58,6 @@ public class HiveLineageResource {
}
}
/**
/**
* Returns the inputs for a given entity.
*
* @param tableName table name
*/
@GET
@Path
(
"table/{tableName}/inputs"
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
public
Response
inputs
(
@Context
HttpServletRequest
request
,
@PathParam
(
"tableName"
)
String
tableName
)
{
LOG
.
info
(
"Fetching lineage inputs for tableName={}"
,
tableName
);
try
{
ParamChecker
.
notEmpty
(
tableName
,
"table name cannot be null"
);
final
String
jsonResult
=
lineageService
.
getInputs
(
tableName
);
JSONObject
response
=
new
JSONObject
();
response
.
put
(
MetadataServiceClient
.
REQUEST_ID
,
Servlets
.
getRequestId
());
response
.
put
(
"tableName"
,
tableName
);
response
.
put
(
MetadataServiceClient
.
RESULTS
,
new
JSONObject
(
jsonResult
));
return
Response
.
ok
(
response
).
build
();
}
catch
(
DiscoveryException
|
IllegalArgumentException
e
)
{
LOG
.
error
(
"Unable to get lineage inputs for table {}"
,
tableName
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
BAD_REQUEST
));
}
catch
(
Throwable
e
)
{
LOG
.
error
(
"Unable to get lineage inputs for table {}"
,
tableName
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
INTERNAL_SERVER_ERROR
));
}
}
/**
* Returns the inputs graph for a given entity.
* Returns the inputs graph for a given entity.
*
*
* @param tableName table name
* @param tableName table name
...
@@ -127,41 +92,6 @@ public class HiveLineageResource {
...
@@ -127,41 +92,6 @@ public class HiveLineageResource {
}
}
/**
/**
* Returns the outputs for a given entity.
*
* @param tableName table name
*/
@GET
@Path
(
"table/{tableName}/outputs"
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
public
Response
outputs
(
@Context
HttpServletRequest
request
,
@PathParam
(
"tableName"
)
String
tableName
)
{
LOG
.
info
(
"Fetching lineage outputs for tableName={}"
,
tableName
);
try
{
ParamChecker
.
notEmpty
(
tableName
,
"table name cannot be null"
);
final
String
jsonResult
=
lineageService
.
getOutputs
(
tableName
);
JSONObject
response
=
new
JSONObject
();
response
.
put
(
MetadataServiceClient
.
REQUEST_ID
,
Servlets
.
getRequestId
());
response
.
put
(
"tableName"
,
tableName
);
response
.
put
(
MetadataServiceClient
.
RESULTS
,
new
JSONObject
(
jsonResult
));
return
Response
.
ok
(
response
).
build
();
}
catch
(
DiscoveryException
|
IllegalArgumentException
e
)
{
LOG
.
error
(
"Unable to get lineage outputs for table {}"
,
tableName
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
BAD_REQUEST
));
}
catch
(
Throwable
e
)
{
LOG
.
error
(
"Unable to get lineage outputs for table {}"
,
tableName
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
INTERNAL_SERVER_ERROR
));
}
}
/**
* Returns the outputs graph for a given entity.
* Returns the outputs graph for a given entity.
*
*
* @param tableName table name
* @param tableName table name
...
@@ -172,7 +102,6 @@ public class HiveLineageResource {
...
@@ -172,7 +102,6 @@ public class HiveLineageResource {
@Produces
(
MediaType
.
APPLICATION_JSON
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
public
Response
outputsGraph
(
@Context
HttpServletRequest
request
,
public
Response
outputsGraph
(
@Context
HttpServletRequest
request
,
@PathParam
(
"tableName"
)
String
tableName
)
{
@PathParam
(
"tableName"
)
String
tableName
)
{
LOG
.
info
(
"Fetching lineage outputs graph for tableName={}"
,
tableName
);
LOG
.
info
(
"Fetching lineage outputs graph for tableName={}"
,
tableName
);
try
{
try
{
...
@@ -207,8 +136,6 @@ public class HiveLineageResource {
...
@@ -207,8 +136,6 @@ public class HiveLineageResource {
@Produces
(
MediaType
.
APPLICATION_JSON
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
public
Response
schema
(
@Context
HttpServletRequest
request
,
public
Response
schema
(
@Context
HttpServletRequest
request
,
@PathParam
(
"tableName"
)
String
tableName
)
{
@PathParam
(
"tableName"
)
String
tableName
)
{
LOG
.
info
(
"Fetching schema for tableName={}"
,
tableName
);
LOG
.
info
(
"Fetching schema for tableName={}"
,
tableName
);
try
{
try
{
...
...
This diff is collapsed.
Click to expand it.
webapp/src/test/java/org/apache/hadoop/metadata/web/resources/HiveLineageJerseyResourceIT.java
View file @
5b40e654
...
@@ -64,37 +64,6 @@ public class HiveLineageJerseyResourceIT extends BaseResourceIT {
...
@@ -64,37 +64,6 @@ public class HiveLineageJerseyResourceIT extends BaseResourceIT {
}
}
@Test
@Test
public
void
testInputs
()
throws
Exception
{
WebResource
resource
=
service
.
path
(
BASE_URI
)
.
path
(
"sales_fact_monthly_mv"
)
.
path
(
"inputs"
);
ClientResponse
clientResponse
=
resource
.
accept
(
MediaType
.
APPLICATION_JSON
)
.
type
(
MediaType
.
APPLICATION_JSON
)
.
method
(
HttpMethod
.
GET
,
ClientResponse
.
class
);
Assert
.
assertEquals
(
clientResponse
.
getStatus
(),
Response
.
Status
.
OK
.
getStatusCode
());
String
responseAsString
=
clientResponse
.
getEntity
(
String
.
class
);
Assert
.
assertNotNull
(
responseAsString
);
System
.
out
.
println
(
"inputs = "
+
responseAsString
);
JSONObject
response
=
new
JSONObject
(
responseAsString
);
Assert
.
assertNotNull
(
response
.
get
(
MetadataServiceClient
.
REQUEST_ID
));
JSONObject
results
=
response
.
getJSONObject
(
MetadataServiceClient
.
RESULTS
);
Assert
.
assertNotNull
(
results
);
JSONArray
rows
=
results
.
getJSONArray
(
"rows"
);
Assert
.
assertTrue
(
rows
.
length
()
>
0
);
final
JSONObject
row
=
rows
.
getJSONObject
(
0
);
JSONArray
paths
=
row
.
getJSONArray
(
"path"
);
Assert
.
assertTrue
(
paths
.
length
()
>
0
);
}
@Test
public
void
testInputsGraph
()
throws
Exception
{
public
void
testInputsGraph
()
throws
Exception
{
WebResource
resource
=
service
WebResource
resource
=
service
.
path
(
BASE_URI
)
.
path
(
BASE_URI
)
...
@@ -129,37 +98,6 @@ public class HiveLineageJerseyResourceIT extends BaseResourceIT {
...
@@ -129,37 +98,6 @@ public class HiveLineageJerseyResourceIT extends BaseResourceIT {
}
}
@Test
@Test
public
void
testOutputs
()
throws
Exception
{
WebResource
resource
=
service
.
path
(
BASE_URI
)
.
path
(
"sales_fact"
)
.
path
(
"outputs"
);
ClientResponse
clientResponse
=
resource
.
accept
(
MediaType
.
APPLICATION_JSON
)
.
type
(
MediaType
.
APPLICATION_JSON
)
.
method
(
HttpMethod
.
GET
,
ClientResponse
.
class
);
Assert
.
assertEquals
(
clientResponse
.
getStatus
(),
Response
.
Status
.
OK
.
getStatusCode
());
String
responseAsString
=
clientResponse
.
getEntity
(
String
.
class
);
Assert
.
assertNotNull
(
responseAsString
);
System
.
out
.
println
(
"outputs = "
+
responseAsString
);
JSONObject
response
=
new
JSONObject
(
responseAsString
);
Assert
.
assertNotNull
(
response
.
get
(
MetadataServiceClient
.
REQUEST_ID
));
JSONObject
results
=
response
.
getJSONObject
(
MetadataServiceClient
.
RESULTS
);
Assert
.
assertNotNull
(
results
);
JSONArray
rows
=
results
.
getJSONArray
(
"rows"
);
Assert
.
assertTrue
(
rows
.
length
()
>
0
);
final
JSONObject
row
=
rows
.
getJSONObject
(
0
);
JSONArray
paths
=
row
.
getJSONArray
(
"path"
);
Assert
.
assertTrue
(
paths
.
length
()
>
0
);
}
@Test
public
void
testOutputsGraph
()
throws
Exception
{
public
void
testOutputsGraph
()
throws
Exception
{
WebResource
resource
=
service
WebResource
resource
=
service
.
path
(
BASE_URI
)
.
path
(
BASE_URI
)
...
...
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