@Override
 public Map<String, ExecutionPlanConfiguration> getAllActiveExecutionConfigurations(int tenantId) {
   Map<String, ExecutionPlanConfiguration> configurationMap =
       new HashMap<String, ExecutionPlanConfiguration>();
   Map<String, ExecutionPlan> executionPlanMap = tenantSpecificExecutionPlans.get(tenantId);
   if (executionPlanMap != null) {
     for (Map.Entry<String, ExecutionPlan> entry : executionPlanMap.entrySet()) {
       configurationMap.put(entry.getKey(), entry.getValue().getExecutionPlanConfiguration());
     }
   }
   return configurationMap;
 }
  @Override
  public Map<String, ExecutionPlanConfiguration>
      getAllImportedStreamSpecificActiveExecutionConfigurations(int tenantId, String streamId) {
    Map<String, ExecutionPlanConfiguration> configurationMap =
        new HashMap<String, ExecutionPlanConfiguration>();
    Map<String, ExecutionPlan> executionPlanMap = tenantSpecificExecutionPlans.get(tenantId);
    if (executionPlanMap != null) {
      for (Map.Entry<String, ExecutionPlan> entry : executionPlanMap.entrySet()) {

        List<StreamConfiguration> streamConfigurationList =
            entry.getValue().getExecutionPlanConfiguration().getImportedStreams();
        for (StreamConfiguration streamConfiguration : streamConfigurationList) {
          String streamNameWithVersion =
              streamConfiguration.getName() + ":" + streamConfiguration.getVersion();
          if (streamNameWithVersion.equals(streamId)) {
            configurationMap.put(entry.getKey(), entry.getValue().getExecutionPlanConfiguration());
          }
        }
      }
    }
    return configurationMap;
  }