public void createRouterConfiguration(String clusterName) throws ConfigurationException {
  String routerConfigFileName=getModulePropertiesFileName(ConfigurationConstants.TR_PROPERTIES,getClusterHome());
  File routerConfigFile=new File(routerConfigFileName);
  if (routerConfigFile.exists()) {
    logger.debug(String.format("SQLRouter configuration already exists at '%s'",routerConfigFileName));
    return;
  }
  RouterConfiguration config=new RouterConfiguration(null);
  config.setClusterHome(getClusterHome());
  config.setHost(ConfigurationConstants.TR_RMI_DEFAULT_HOST);
  ArrayList<String> al=new ArrayList<String>();
  al.add("localhost:9998");
  config.setManagerList(al);
  TungstenProperties configProps=new TungstenProperties();
  configProps.extractProperties(config,true);
  logger.debug("Writing out a router configuration to '" + routerConfigFileName + "'");
  logger.debug("router.properties contains:" + configProps);
  config.store(configProps,routerConfigFileName);
}

public void createRouterConfiguration ( String clusterName ) throws ConfigurationException { String routerConfigFileName = getModulePropertiesFileName ( ConfigurationConstants . TR_PROPERTIES , getClusterHome ( ) ) ; File routerConfigFile = new File ( routerConfigFileName ) ; if ( routerConfigFile . exists ( ) ) { logger . debug ( String . format ( "SQLRouter configuration already exists at '%s'" , routerConfigFileName ) ) ; return ; } RouterConfiguration config = new RouterConfiguration ( null ) ; config . setClusterHome ( getClusterHome ( ) ) ; config . setHost ( ConfigurationConstants . TR_RMI_DEFAULT_HOST ) ; ArrayList < String > al = new ArrayList < String > ( ) ; al . add ( "localhost:9998" ) ; config . setManagerList ( al ) ; TungstenProperties configProps = new TungstenProperties ( ) ; configProps . extractProperties ( config , true ) ; logger . debug ( "Writing out a router configuration to '" + routerConfigFileName + "'" ) ; logger . debug ( "router.properties contains:" + configProps ) ; config . store ( configProps , routerConfigFileName ) ; }
creates a new router configuration file in the correct location .
