[
https://issues.apache.org/jira/browse/FALCON-661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14120743#comment-14120743
]
Balu Vellanki edited comment on FALCON-661 at 9/4/14 12:39 AM:
---------------------------------------------------------------
{quote}
MetadataMappingResource to MetadataDiscoveryResource?
Why is it expending LineageMetadataResource? Can you not move a single method
into GraphUtils?
Replace static clas name in testContext.PROCESS_ENTITY_NAME
org.apache.falcon.resource.metadata.MetadataMappingResource#parseDimensionType
Why a for loop? You can construct the enum as:
RelationshipType.valueOf(type.toUpperCase())
org.apache.falcon.resource.metadata.MetadataMappingResource#listDimensions
It should be listDimensionValues()
{quote}
Agreeing with above, will make the changes.
{quote}
if (isVertexRelatedToCluster(relationshipType, vertex, clusterName)) {
clusterName is not checked for valid input
{quote}
The first three lines of this method checks if clusterName is empty. If it is
empty, we do not have to filter by ClusterName. There is no further validation
needed for clusterName, no?
{quote}
JSONObject response = buildJSONResponse(vertexes);
Do we need a response of vertices or just string names?
{quote}
We need response of vertices, as we want more than just the name of dimensions,
no?
{quote}
org.apache.falcon.resource.metadata.MetadataMappingResource#isVertexRelatedToCluster
Cluster type is not useful no?
The traversal is quite inefficient. Can we not combine the query into a
VertexQuery instead of looping thru the results.
{quote}
Cluster type is not useful, but it is there to ensure uniformity in API call.
The way to verify a Dimension's relation with a Cluster changes based on the
Dimension. Hence we cannot combine this into VertexQuery. First we need to get
vertices by type and name, then get adjacent vertices of type cluster and then
we need to verify if one of these vertices has the cluster named clusterName.
was (Author: bvellanki):
{quote}
MetadataMappingResource to MetadataDiscoveryResource?
Why is it expending LineageMetadataResource? Can you not move a single method
into GraphUtils?
Replace static clas name in testContext.PROCESS_ENTITY_NAME
org.apache.falcon.resource.metadata.MetadataMappingResource#parseDimensionType
Why a for loop? You can construct the enum as:
RelationshipType.valueOf(type.toUpperCase())
org.apache.falcon.resource.metadata.MetadataMappingResource#listDimensions
It should be listDimensionValues()
{quote}
Agreeing with above, will make the changes.
{quote}
if (isVertexRelatedToCluster(relationshipType, vertex, clusterName)) {
clusterName is not checked for valid input
{quote}
The first three lines of this method checks if clusterName is empty. If it is
empty, we do not have to filter by ClusterName. There is no further validation
needed for clusterName, no?
{quote}
JSONObject response = buildJSONResponse(vertexes);
Do we need a response of vertices or just string names?
{quote}
We need response of vertices, as we want more than just the name of dimensions,
no?
{quote}
org.apache.falcon.resource.metadata.MetadataMappingResource#isVertexRelatedToCluster
Cluster type is not useful no?
The traversal is quite inefficient. Can we not combine the query into a
VertexQuery instead of looping thru the results.
{quote}
Cluster type is not useful, but it is there to ensure uniformity in API call.
Agree regd traversal. Will make the changes.
> Add list types API
> ------------------
>
> Key: FALCON-661
> URL: https://issues.apache.org/jira/browse/FALCON-661
> Project: Falcon
> Issue Type: Sub-task
> Components: webapp
> Affects Versions: 0.6
> Reporter: Venkatesh Seetharam
> Assignee: Balu Vellanki
> Labels: lineage
> Attachments: Falcon-Jira-661-v1.patch, Falcon-Jira-661.patch
>
>
> {noformat}
> GET http://host/graphs/lineage/$type/list?$optional_cluster_name=foo
> $type as in org.apache.falcon.metadata.RelationshipType
> except instance vertex types
> Examples:
> List all feed entities
> GET http://host/graphs/lineage/feed/list
> List all feed entities for a given cluster
> GET http://host/graphs/lineage/feed/list?cluster_name=foo_cluster
> GET http://host/graphs/lineage/cluster/list
> GET http://host/graphs/lineage/process/list
> GET http://host/graphs/lineage/users/list
> GET http://host/graphs/lineage/colo/list
> GET http://host/graphs/lineage/tags/list
> GET http://host/graphs/lineage/groups/list
> GET http://host/graphs/lineage/pipelines/list
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)