You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Qiang Zhang (JIRA)" <ji...@apache.org> on 2016/12/09 06:52:59 UTC

[jira] [Updated] (RANGER-1232) Spelling error for StromTopologyName

     [ https://issues.apache.org/jira/browse/RANGER-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Qiang Zhang updated RANGER-1232:
--------------------------------
    Description: 
It should be 'StormTopologyName', not 'StromTopologyName'.

public static List<String> getStormResources(String serviceName, Map<String, String> configs,ResourceLookupContext context) {
        String 		 userInput 				  = context.getUserInput();
		Map<String, List<String>> resourceMap = context.getResources();
	    List<String> 		resultList        = null;
		List<String> 		StormTopologyList = null;
		String  			StromTopologyName = null;
		
		if ( resourceMap != null && !resourceMap.isEmpty() &&
			resourceMap.get(TOPOLOGY) != null ) {
			StromTopologyName = userInput;
			StormTopologyList = resourceMap.get(TOPOLOGY);
		} else {
			StromTopologyName = userInput;
		}
		
		
        if (configs == null || configs.isEmpty()) {
                LOG.error("Connection Config is empty");

        } else {
                String url 		= configs.get("nimbus.url");
                String username = configs.get("username");
                String password = configs.get("password");
                String lookupPrincipal = configs.get("lookupprincipal");
                String lookupKeytab = configs.get("lookupkeytab");
                String nameRules = configs.get("namerules");
                resultList = getStormResources(url, username, password,lookupPrincipal, lookupKeytab, nameRules, StromTopologyName,StormTopologyList);
        }
        return resultList;
    }

  was:
package org.apache.ranger.services.storm.client;
 public class StormResourceMgr {

public static List<String> getStormResources(String serviceName, Map<String, String> configs,ResourceLookupContext context) {
      String       userInput                = context.getUserInput();
Map<String, List<String>> resourceMap = context.getResources();
   List<String>       resultList        = null;
List<String>      StormTopologyList = null;
String           StromTopologyName = null;  ---------should be modify to  StormTopologyName

if ( resourceMap != null && !resourceMap.isEmpty() &&
   resourceMap.get(TOPOLOGY) != null ) {
   StromTopologyName = userInput; -------------should be modify to  StormTopologyName                                              
       
  
   StormTopologyList = resourceMap.get(TOPOLOGY);
} else {
   StromTopologyName = userInput; ---------------- should be modify to  StormTopologyName

        Summary: Spelling error for StromTopologyName  (was:  spelling  error for  StromTopologyName in )

> Spelling error for StromTopologyName
> ------------------------------------
>
>                 Key: RANGER-1232
>                 URL: https://issues.apache.org/jira/browse/RANGER-1232
>             Project: Ranger
>          Issue Type: Bug
>          Components: Ranger
>    Affects Versions: 0.6.2
>            Reporter: Qiang Zhang
>            Assignee: Qiang Zhang
>            Priority: Minor
>             Fix For: 0.7.0
>
>
> It should be 'StormTopologyName', not 'StromTopologyName'.
> public static List<String> getStormResources(String serviceName, Map<String, String> configs,ResourceLookupContext context) {
>         String 		 userInput 				  = context.getUserInput();
> 		Map<String, List<String>> resourceMap = context.getResources();
> 	    List<String> 		resultList        = null;
> 		List<String> 		StormTopologyList = null;
> 		String  			StromTopologyName = null;
> 		
> 		if ( resourceMap != null && !resourceMap.isEmpty() &&
> 			resourceMap.get(TOPOLOGY) != null ) {
> 			StromTopologyName = userInput;
> 			StormTopologyList = resourceMap.get(TOPOLOGY);
> 		} else {
> 			StromTopologyName = userInput;
> 		}
> 		
> 		
>         if (configs == null || configs.isEmpty()) {
>                 LOG.error("Connection Config is empty");
>         } else {
>                 String url 		= configs.get("nimbus.url");
>                 String username = configs.get("username");
>                 String password = configs.get("password");
>                 String lookupPrincipal = configs.get("lookupprincipal");
>                 String lookupKeytab = configs.get("lookupkeytab");
>                 String nameRules = configs.get("namerules");
>                 resultList = getStormResources(url, username, password,lookupPrincipal, lookupKeytab, nameRules, StromTopologyName,StormTopologyList);
>         }
>         return resultList;
>     }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)