diff --git a/streampark-common/src/main/scala/org/apache/streampark/common/conf/ConfigOption.scala b/streampark-common/src/main/scala/org/apache/streampark/common/conf/ConfigOption.scala index 22ac7de647..81cda957d4 100644 --- a/streampark-common/src/main/scala/org/apache/streampark/common/conf/ConfigOption.scala +++ b/streampark-common/src/main/scala/org/apache/streampark/common/conf/ConfigOption.scala @@ -50,7 +50,7 @@ case class ConfigOption[T]( case null => if (required) { prop.get(fullKey) match { - case null => throw error("is require") + case null => throw error("Is require") case v => v.toString.cast[T](classType) } } else { diff --git a/streampark-common/src/main/scala/org/apache/streampark/common/conf/InternalConfigHolder.scala b/streampark-common/src/main/scala/org/apache/streampark/common/conf/InternalConfigHolder.scala index 5f00c20880..067c0d3518 100644 --- a/streampark-common/src/main/scala/org/apache/streampark/common/conf/InternalConfigHolder.scala +++ b/streampark-common/src/main/scala/org/apache/streampark/common/conf/InternalConfigHolder.scala @@ -103,7 +103,7 @@ object InternalConfigHolder extends Logger { SystemPropertyUtils.get(key) match { case v if v != null => v.cast[T](config.classType) case _ => - throw new IllegalArgumentException(s"config key has not been registered: $key") + throw new IllegalArgumentException(s"Config key has not been registered: $key") } case conf: InternalOption => conf.defaultValue.asInstanceOf[T] } diff --git a/streampark-common/src/main/scala/org/apache/streampark/common/util/ClassLoaderUtils.scala b/streampark-common/src/main/scala/org/apache/streampark/common/util/ClassLoaderUtils.scala index eb3f3dadcf..e830d20c69 100644 --- a/streampark-common/src/main/scala/org/apache/streampark/common/util/ClassLoaderUtils.scala +++ b/streampark-common/src/main/scala/org/apache/streampark/common/util/ClassLoaderUtils.scala @@ -18,7 +18,7 @@ package org.apache.streampark.common.util import java.io.{File, IOException} import java.net.{URL, URLClassLoader} -import java.util.function.{Consumer, Supplier} +import java.util.function.Supplier import scala.collection.mutable.ArrayBuffer diff --git a/streampark-common/src/main/scala/org/apache/streampark/common/util/HadoopUtils.scala b/streampark-common/src/main/scala/org/apache/streampark/common/util/HadoopUtils.scala index 715afa00da..4fd712f5f8 100644 --- a/streampark-common/src/main/scala/org/apache/streampark/common/util/HadoopUtils.scala +++ b/streampark-common/src/main/scala/org/apache/streampark/common/util/HadoopUtils.scala @@ -287,7 +287,7 @@ object HadoopUtils extends Logger { val tmpDir = FileUtils.createTempDir() val fs = FileSystem.get(new Configuration) val sourcePath = fs.makeQualified(new Path(jarOnHdfs)) - if (!fs.exists(sourcePath)) throw new IOException(s"jar file: $jarOnHdfs doesn't exist.") + if (!fs.exists(sourcePath)) throw new IOException(s"Jar file: $jarOnHdfs doesn't exist.") val destPath = new Path(tmpDir.getAbsolutePath + "/" + sourcePath.getName) fs.copyToLocalFile(sourcePath, destPath) new File(destPath.toString).getAbsolutePath diff --git a/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala b/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala index 0b97498b17..f17465e6be 100644 --- a/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala +++ b/streampark-common/src/main/scala/org/apache/streampark/common/util/Logger.scala @@ -121,7 +121,7 @@ private[this] object LoggerFactory extends LoggerFactoryBinder { override def getLoggerFactory: ILoggerFactory = { if (contextSelectorBinder.getContextSelector == null) { throw new IllegalStateException( - "contextSelector cannot be null. See also " + CoreConstants.CODES_URL + "#null_CS") + "'contextSelector' cannot be null. See also " + CoreConstants.CODES_URL + "#null_CS") } contextSelectorBinder.getContextSelector.getLoggerContext } diff --git a/streampark-common/src/main/scala/org/apache/streampark/common/util/SystemPropertyUtils.scala b/streampark-common/src/main/scala/org/apache/streampark/common/util/SystemPropertyUtils.scala index c29aa60bb0..8c9b213552 100644 --- a/streampark-common/src/main/scala/org/apache/streampark/common/util/SystemPropertyUtils.scala +++ b/streampark-common/src/main/scala/org/apache/streampark/common/util/SystemPropertyUtils.scala @@ -43,7 +43,7 @@ object SystemPropertyUtils extends Logger { def get(key: String, default: String): String = { require(key != null, "[StreamPark] key must not be null.") key match { - case empty if empty.isEmpty => throw new IllegalArgumentException("key must not be empty.") + case empty if empty.isEmpty => throw new IllegalArgumentException("Key must not be empty.") case other => Try { System.getSecurityManager match { diff --git a/streampark-common/src/main/scala/org/apache/streampark/common/util/Utils.scala b/streampark-common/src/main/scala/org/apache/streampark/common/util/Utils.scala index d91dc1d781..0c1f30a136 100644 --- a/streampark-common/src/main/scala/org/apache/streampark/common/util/Utils.scala +++ b/streampark-common/src/main/scala/org/apache/streampark/common/util/Utils.scala @@ -66,7 +66,7 @@ object Utils extends Logger { def required(expression: Boolean, errorMessage: Any): Unit = { if (!expression) { - throw new IllegalArgumentException(s"requirement failed: ${errorMessage.toString}") + throw new IllegalArgumentException(s"Requirement failed: ${errorMessage.toString}") } }