Github user tushargosavi commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-core/pull/148#discussion_r47053934
  
    --- Diff: 
engine/src/main/java/com/datatorrent/stram/webapp/StramWebServices.java ---
    @@ -767,8 +900,17 @@ public JSONObject 
getPhysicalOperatorProperties(@PathParam("operatorId") int ope
       @Produces(MediaType.APPLICATION_JSON)
       public JSONObject getLogicalPlan() throws JSONException, IOException
       {
    -    LogicalPlan lp = dagManager.getLogicalPlan();
    -    return new 
JSONObject(objectMapper.writeValueAsString(LogicalPlanSerializer.convertToMap(lp)));
    +    return new 
JSONObject(objectMapper.writeValueAsString(LogicalPlanSerializer.convertToMap(
    +        dagManager.getLogicalPlan(), false)));
    +  }
    +
    +  @GET
    +  @Path(PATH_LOGICAL_PLAN + "/flatten")
    +  @Produces(MediaType.APPLICATION_JSON)
    +  public JSONObject getLogicalPlanFlatten() throws JSONException, 
IOException
    +  {
    +    return new 
JSONObject(objectMapper.writeValueAsString(LogicalPlanSerializer.convertToMap(
    +        dagManager.getLogicalPlan(), true)));
       }
    --- End diff --
    
    Yes, I will remove the flatten from from resource path.
    
    If there is a module M1 with internal module 'M2' then you can query the 
internal module using 
    M1 + "separator" + "M2" , for example
    
    logicalPlan/modules/M1/M2 and dag of M2 using 
logicalPlan/modules/M1/M2/flatten if separator is '/' or
    logicalPlan/modules/M1_M2 and dag of M2 using 
logicalPlan/modules/M1_M2/flatten if separator is '_'
    
    All operators are available in the top level DAG, say in above example 
operator O1 populated by M2 then the operator name in top level DAG is M1/M2/O1 
and it can be queried using
    /logicalPlan/operators/M1/M2/O1 if '/' is separator.
    /logicalPlan/operators/M1_M2_O1 is '_' is a separator.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to