Merge pull request #15832 from ktoso/port-15828-turkishbug-rkuhn
=act,clu,rem #15828 Turkish I bug (for Validation)
This commit is contained in:
commit
60ab0fb3d0
5 changed files with 12 additions and 7 deletions
|
|
@ -21,6 +21,7 @@ import scala.concurrent.duration.{ FiniteDuration, Duration }
|
||||||
import scala.concurrent.{ Await, Future, Promise, ExecutionContext, ExecutionContextExecutor }
|
import scala.concurrent.{ Await, Future, Promise, ExecutionContext, ExecutionContextExecutor }
|
||||||
import scala.util.{ Failure, Success, Try }
|
import scala.util.{ Failure, Success, Try }
|
||||||
import scala.util.control.{ NonFatal, ControlThrowable }
|
import scala.util.control.{ NonFatal, ControlThrowable }
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
object ActorSystem {
|
object ActorSystem {
|
||||||
|
|
||||||
|
|
@ -181,7 +182,7 @@ object ActorSystem {
|
||||||
final val LoggingFilter: String = getString("akka.logging-filter")
|
final val LoggingFilter: String = getString("akka.logging-filter")
|
||||||
final val LoggerStartTimeout: Timeout = Timeout(config.getMillisDuration("akka.logger-startup-timeout"))
|
final val LoggerStartTimeout: Timeout = Timeout(config.getMillisDuration("akka.logger-startup-timeout"))
|
||||||
final val LogConfigOnStart: Boolean = config.getBoolean("akka.log-config-on-start")
|
final val LogConfigOnStart: Boolean = config.getBoolean("akka.log-config-on-start")
|
||||||
final val LogDeadLetters: Int = config.getString("akka.log-dead-letters").toLowerCase match {
|
final val LogDeadLetters: Int = config.getString("akka.log-dead-letters").toLowerCase(Locale.ROOT) match {
|
||||||
case "off" | "false" ⇒ 0
|
case "off" | "false" ⇒ 0
|
||||||
case "on" | "true" ⇒ Int.MaxValue
|
case "on" | "true" ⇒ Int.MaxValue
|
||||||
case _ ⇒ config.getInt("akka.log-dead-letters")
|
case _ ⇒ config.getInt("akka.log-dead-letters")
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import scala.concurrent.duration._
|
||||||
import scala.concurrent.Await
|
import scala.concurrent.Await
|
||||||
import scala.util.control.NoStackTrace
|
import scala.util.control.NoStackTrace
|
||||||
import scala.util.control.NonFatal
|
import scala.util.control.NonFatal
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This trait brings log level handling to the EventStream: it reads the log
|
* This trait brings log level handling to the EventStream: it reads the log
|
||||||
|
|
@ -440,7 +441,7 @@ object Logging {
|
||||||
* valid inputs are upper or lowercase (not mixed) versions of:
|
* valid inputs are upper or lowercase (not mixed) versions of:
|
||||||
* "error", "warning", "info" and "debug"
|
* "error", "warning", "info" and "debug"
|
||||||
*/
|
*/
|
||||||
def levelFor(s: String): Option[LogLevel] = s.toLowerCase match {
|
def levelFor(s: String): Option[LogLevel] = s.toLowerCase(Locale.ROOT) match {
|
||||||
case "off" ⇒ Some(OffLevel)
|
case "off" ⇒ Some(OffLevel)
|
||||||
case "error" ⇒ Some(ErrorLevel)
|
case "error" ⇒ Some(ErrorLevel)
|
||||||
case "warning" ⇒ Some(WarningLevel)
|
case "warning" ⇒ Some(WarningLevel)
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,11 @@ import com.typesafe.config.Config
|
||||||
import scala.concurrent.duration.FiniteDuration
|
import scala.concurrent.duration.FiniteDuration
|
||||||
import scala.concurrent.duration.Duration
|
import scala.concurrent.duration.Duration
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
object Helpers {
|
object Helpers {
|
||||||
|
|
||||||
val isWindows: Boolean = System.getProperty("os.name", "").toLowerCase.indexOf("win") >= 0
|
val isWindows: Boolean = System.getProperty("os.name", "").toLowerCase(Locale.ROOT).indexOf("win") >= 0
|
||||||
|
|
||||||
def makePattern(s: String): Pattern = Pattern.compile("^\\Q" + s.replace("?", "\\E.\\Q").replace("*", "\\E.*\\Q") + "\\E$")
|
def makePattern(s: String): Pattern = Pattern.compile("^\\Q" + s.replace("?", "\\E.\\Q").replace("*", "\\E.*\\Q") + "\\E$")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import akka.util.Helpers.Requiring
|
||||||
import akka.util.Helpers.ConfigOps
|
import akka.util.Helpers.ConfigOps
|
||||||
import scala.concurrent.duration.FiniteDuration
|
import scala.concurrent.duration.FiniteDuration
|
||||||
import akka.japi.Util.immutableSeq
|
import akka.japi.Util.immutableSeq
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
final class ClusterSettings(val config: Config, val systemName: String) {
|
final class ClusterSettings(val config: Config, val systemName: String) {
|
||||||
|
|
||||||
|
|
@ -38,7 +39,7 @@ final class ClusterSettings(val config: Config, val systemName: String) {
|
||||||
val SeedNodeTimeout: FiniteDuration = cc.getMillisDuration("seed-node-timeout")
|
val SeedNodeTimeout: FiniteDuration = cc.getMillisDuration("seed-node-timeout")
|
||||||
val RetryUnsuccessfulJoinAfter: Duration = {
|
val RetryUnsuccessfulJoinAfter: Duration = {
|
||||||
val key = "retry-unsuccessful-join-after"
|
val key = "retry-unsuccessful-join-after"
|
||||||
cc.getString(key).toLowerCase match {
|
cc.getString(key).toLowerCase(Locale.ROOT) match {
|
||||||
case "off" ⇒ Duration.Undefined
|
case "off" ⇒ Duration.Undefined
|
||||||
case _ ⇒ cc.getMillisDuration(key) requiring (_ > Duration.Zero, key + " > 0s, or off")
|
case _ ⇒ cc.getMillisDuration(key) requiring (_ > Duration.Zero, key + " > 0s, or off")
|
||||||
}
|
}
|
||||||
|
|
@ -52,7 +53,7 @@ final class ClusterSettings(val config: Config, val systemName: String) {
|
||||||
val UnreachableNodesReaperInterval: FiniteDuration = cc.getMillisDuration("unreachable-nodes-reaper-interval")
|
val UnreachableNodesReaperInterval: FiniteDuration = cc.getMillisDuration("unreachable-nodes-reaper-interval")
|
||||||
val PublishStatsInterval: Duration = {
|
val PublishStatsInterval: Duration = {
|
||||||
val key = "publish-stats-interval"
|
val key = "publish-stats-interval"
|
||||||
cc.getString(key).toLowerCase match {
|
cc.getString(key).toLowerCase(Locale.ROOT) match {
|
||||||
case "off" ⇒ Duration.Undefined
|
case "off" ⇒ Duration.Undefined
|
||||||
case _ ⇒ cc.getMillisDuration(key) requiring (_ >= Duration.Zero, key + " >= 0s, or off")
|
case _ ⇒ cc.getMillisDuration(key) requiring (_ >= Duration.Zero, key + " >= 0s, or off")
|
||||||
}
|
}
|
||||||
|
|
@ -60,7 +61,7 @@ final class ClusterSettings(val config: Config, val systemName: String) {
|
||||||
|
|
||||||
val AutoDownUnreachableAfter: Duration = {
|
val AutoDownUnreachableAfter: Duration = {
|
||||||
val key = "auto-down-unreachable-after"
|
val key = "auto-down-unreachable-after"
|
||||||
cc.getString(key).toLowerCase match {
|
cc.getString(key).toLowerCase(Locale.ROOT) match {
|
||||||
case "off" ⇒ Duration.Undefined
|
case "off" ⇒ Duration.Undefined
|
||||||
case _ ⇒ cc.getMillisDuration(key) requiring (_ >= Duration.Zero, key + " >= 0s, or off")
|
case _ ⇒ cc.getMillisDuration(key) requiring (_ >= Duration.Zero, key + " >= 0s, or off")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import akka.actor.Props
|
||||||
import akka.event.Logging
|
import akka.event.Logging
|
||||||
import akka.event.Logging.LogLevel
|
import akka.event.Logging.LogLevel
|
||||||
import akka.ConfigurationException
|
import akka.ConfigurationException
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
final class RemoteSettings(val config: Config) {
|
final class RemoteSettings(val config: Config) {
|
||||||
import config._
|
import config._
|
||||||
|
|
@ -29,7 +30,7 @@ final class RemoteSettings(val config: Config) {
|
||||||
val TrustedSelectionPaths: Set[String] =
|
val TrustedSelectionPaths: Set[String] =
|
||||||
immutableSeq(getStringList("akka.remote.trusted-selection-paths")).toSet
|
immutableSeq(getStringList("akka.remote.trusted-selection-paths")).toSet
|
||||||
|
|
||||||
val RemoteLifecycleEventsLogLevel: LogLevel = getString("akka.remote.log-remote-lifecycle-events").toLowerCase() match {
|
val RemoteLifecycleEventsLogLevel: LogLevel = getString("akka.remote.log-remote-lifecycle-events").toLowerCase(Locale.ROOT) match {
|
||||||
case "on" ⇒ Logging.DebugLevel
|
case "on" ⇒ Logging.DebugLevel
|
||||||
case other ⇒ Logging.levelFor(other) match {
|
case other ⇒ Logging.levelFor(other) match {
|
||||||
case Some(level) ⇒ level
|
case Some(level) ⇒ level
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue