<commit_before>package com.socrata.querycoordinator

import scala.concurrent.duration._

import com.typesafe.config.{ConfigException, Config}
import scala.collection.JavaConversions.asScalaIterator
import scala.util.Try


class QueryCoordinatorConfig(config: Config, root: String) {
  private def k(s: String) = root + "." + s

  val log4j = config.getConfig(k("log4j"))
  val curator = new CuratorConfig(config, k("curator"))
  val advertisement = new AdvertisementConfig(config, k("service-advertisement"))
  val network = new NetworkConfig(config, k("network"))

  val connectTimeout = config.getMilliseconds(k("connect-timeout")).longValue.millis
  val schemaTimeout = config.getMilliseconds(k("get-schema-timeout")).longValue.millis
  val queryTimeout = config.getMilliseconds(k("query-timeout")).longValue.millis
  val maxRows: Option[Int] = Try(config.getInt(k("max-rows"))).toOption
  val defaultRowsLimit: Int = Try(config.getInt(k("default-rows-limit"))).getOrElse(1000)

  val allSecondaryInstanceNames = asScalaIterator(config.getStringList(k("all-secondary-instance-names")).iterator()).toSeq
  val secondaryDiscoveryExpirationMillis = config.getMilliseconds(k("secondary-discovery-expiration"))
  val datasetMaxNopeCount = config.getInt(k("dataset-max-nope-count"))
}
<commit_msg>Use ConfigClass.<commit_after>package com.socrata.querycoordinator

import scala.concurrent.duration._

import com.socrata.thirdparty.typesafeconfig.ConfigClass
import com.typesafe.config.Config

class QueryCoordinatorConfig(config: Config, root: String) extends ConfigClass(config, root) {

  val log4j = getRawConfig("log4j")
  val curator = new CuratorConfig(config, path("curator"))
  val advertisement = new AdvertisementConfig(config, path("service-advertisement"))
  val network = new NetworkConfig(config, path("network"))

  val connectTimeout = config.getMilliseconds(path("connect-timeout")).longValue.millis
  val schemaTimeout = config.getMilliseconds(path("get-schema-timeout")).longValue.millis
  val queryTimeout = config.getMilliseconds(path("query-timeout")).longValue.millis
  val maxRows = optionally(getInt("max-rows"))
  val defaultRowsLimit = optionally(getInt("default-rows-limit")).getOrElse(1000)

  val allSecondaryInstanceNames = getStringList("all-secondary-instance-names")
  val secondaryDiscoveryExpirationMillis = config.getMilliseconds(path("secondary-discovery-expiration"))
  val datasetMaxNopeCount = getInt("dataset-max-nope-count")
}

{'fraction_non_alphanumeric': 0.12444264288609648, 'fraction_numerical': 0.004864207539521687, 'mean_word_length': 6.961290322580645, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2145380', 'n_tokens_mistral': 752, 'n_tokens_neox': 723, 'n_words': 125}