Source:
<code>void initializeMesosStormConf(Map conf, String localDir) { mesosStormConf = new HashMap(); mesosStormConf.putAll(conf); try { _state = new LocalStateShim(localDir); } catch (IOException exp) { <START> LOG.error("Encounted IOException while setting up LocalState at : {}", localDir, exp); <END> } _allowedHosts = listIntoSet((List<String>) conf.get(CONF_MESOS_ALLOWED_HOSTS)); _disallowedHosts = listIntoSet((List<String>) conf.get(CONF_MESOS_DISALLOWED_HOSTS)); Boolean preferReservedResources = (Boolean) conf.get(CONF_MESOS_PREFER_RESERVED_RESOURCES); if (preferReservedResources != null) { _preferReservedResources = preferReservedResources; } _container = Optional.fromNullable((String) conf.get(CONF_MESOS_CONTAINER_DOCKER_IMAGE)); _scheduler = new NimbusScheduler(this); _generatedConfPath = Paths.get( Optional.fromNullable((String) conf.get(Config.STORM_LOCAL_DIR)).or("./"), "generated-conf"); if (!_generatedConfPath.toFile().exists() && !_generatedConfPath.toFile().mkdirs()) { throw new RuntimeException("Couldn't create generated-conf dir, _generatedConfPath=" + _generatedConfPath.toString()); } try { mesosStormConf.put(Config.NIMBUS_HOST, MesosCommon.getNimbusHost(mesosStormConf)); } catch (UnknownHostException exp) { LOG.error("Exception while configuring nimbus host: {}", exp); } Path pathToDumpConfig = Paths.get(_generatedConfPath.toString(), "storm.yaml"); try { File generatedConf = pathToDumpConfig.toFile(); Yaml yaml = new Yaml(); FileWriter writer = new FileWriter(generatedConf); yaml.dump(mesosStormConf, writer); } catch (IOException exp) { LOG.error("Could not dump generated config to {}", pathToDumpConfig); } }</code><technical_language>typo: Encountered</technical_language>

Target:
void initializeMesosStormConf(Map conf, String localDir) { mesosStormConf = new HashMap(); mesosStormConf.putAll(conf); try { _state = new LocalStateShim(localDir); } catch (IOException exp) { throw new RuntimeException(String.format("Encountered IOException while setting up LocalState at %s : %s", localDir, exp)); } _allowedHosts = listIntoSet((List<String>) conf.get(CONF_MESOS_ALLOWED_HOSTS)); _disallowedHosts = listIntoSet((List<String>) conf.get(CONF_MESOS_DISALLOWED_HOSTS)); Boolean preferReservedResources = (Boolean) conf.get(CONF_MESOS_PREFER_RESERVED_RESOURCES); if (preferReservedResources != null) { _preferReservedResources = preferReservedResources; } _container = Optional.fromNullable((String) conf.get(CONF_MESOS_CONTAINER_DOCKER_IMAGE)); _scheduler = new NimbusScheduler(this); _generatedConfPath = Paths.get( Optional.fromNullable((String) conf.get(Config.STORM_LOCAL_DIR)).or("./"), "generated-conf"); if (!_generatedConfPath.toFile().exists() && !_generatedConfPath.toFile().mkdirs()) { throw new RuntimeException("Couldn't create generated-conf dir, _generatedConfPath=" + _generatedConfPath.toString()); } try { mesosStormConf.put(Config.NIMBUS_HOST, MesosCommon.getNimbusHost(mesosStormConf)); } catch (UnknownHostException exp) { throw new RuntimeException(String.format("Exception while configuring nimbus host: %s", exp)); } Path pathToDumpConfig = Paths.get(_generatedConfPath.toString(), "storm.yaml"); try { File generatedConf = pathToDumpConfig.toFile(); Yaml yaml = new Yaml(); FileWriter writer = new FileWriter(generatedConf); yaml.dump(mesosStormConf, writer); } catch (IOException exp) { LOG.error("Could not dump generated config to {}", pathToDumpConfig); } }