Skip to content

Commit

Permalink
[ISSUE-3062][Improve] Improve streampark-common module base on [5 Log] (
Browse files Browse the repository at this point in the history
  • Loading branch information
RocMarshal authored Oct 22, 2023
1 parent 81c2bc9 commit ed8d3ea
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ object InternalConfigHolder extends Logger {
/** log the current configuration info. */
def log(): Unit = {
val configKeys = keys()
logInfo(s"""registered configs:
logInfo(s"""Registered configs:
|ConfigHub collected configs: ${configKeys.size}
| ${configKeys
.map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ object HadoopUtils extends Logger {
val end = value.getEndTime.getTime
((end - start) * 0.90f).toLong
case _ =>
logWarn("get kerberos tgtRefreshTime failed, try get kerberos.ttl. ")
logWarn("Get kerberos tgtRefreshTime failed, try get kerberos.ttl. ")
val timeUnit = DateUtils.getTimeUnit(InternalConfigHolder.get(CommonConfig.KERBEROS_TTL))
timeUnit._2 match {
case TimeUnit.SECONDS => timeUnit._1 * 1000
Expand Down Expand Up @@ -199,7 +199,7 @@ object HadoopUtils extends Logger {
}

private[this] def getKerberosUGI(): UserGroupInformation = {
logInfo("kerberos login starting....")
logInfo("Kerberos login starting....")

require(
kerberosPrincipal.nonEmpty && kerberosKeytab.nonEmpty,
Expand All @@ -221,7 +221,7 @@ object HadoopUtils extends Logger {
val ugi =
UserGroupInformation.loginUserFromKeytabAndReturnUGI(kerberosPrincipal, kerberosKeytab)
UserGroupInformation.setLoginUser(ugi)
logInfo("kerberos authentication successful")
logInfo("Kerberos authentication successful")
ugi
} match {
case Success(ugi) => ugi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ object HdfsUtils extends Logger {
if (HadoopUtils.hdfs.exists(path)) {
HadoopUtils.hdfs.delete(path, true)
} else {
logWarn(s"hdfs delete $src,but file $src is not exists!")
logWarn(s"HDFS delete $src, but file $src is not exists!")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ object Utils extends Logger {
Try(f) match {
case Success(result) => Success(result)
case Failure(e) if retryCount > 0 =>
logWarn(s"retry failed, execution caused by: ", e)
logWarn(s"Retry failed, execution caused by: ", e)
logWarn(
s"$retryCount times retry remaining, the next attempt will be in ${interval.toMillis} ms")
LockSupport.parkNanos(interval.toNanos)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ object YarnUtils extends Logger {
val activeRMId = {
Option(RMHAUtils.findActiveRMHAId(yarnConf)) match {
case Some(x) =>
logInfo("findActiveRMHAId successful")
logInfo("'findActiveRMHAId' successful")
x
case None =>
// if you don't know why, don't modify it
logWarn(
s"findActiveRMHAId is null,config yarn.acl.enable:${yarnConf.get("yarn.acl.enable")},now http try it.")
s"'findActiveRMHAId' is null,config yarn.acl.enable:${yarnConf.get("yarn.acl.enable")},now http try it.")
// url ==> rmId
val idUrlMap = new JavaHashMap[String, String]
val rmIds = HAUtil.getRMHAIds(conf)
Expand Down Expand Up @@ -181,7 +181,7 @@ object YarnUtils extends Logger {
require(
activeRMId != null,
"[StreamPark] YarnUtils.getRMWebAppURL: can not found yarn active node")
logInfo(s"current activeRMHAId: $activeRMId")
logInfo(s"Current activeRMHAId: $activeRMId")
val appActiveRMKey = HAUtil.addSuffix(addressPrefix, activeRMId)
val hostnameActiveRMKey =
HAUtil.addSuffix(YarnConfiguration.RM_HOSTNAME, activeRMId)
Expand Down Expand Up @@ -220,7 +220,7 @@ object YarnUtils extends Logger {
.append(address.getPort)
.toString()
}
logInfo(s"yarn resourceManager webapp url:$rmHttpURL")
logInfo(s"Yarn resourceManager webapp url:$rmHttpURL")
}
}
rmHttpURL
Expand Down

0 comments on commit ed8d3ea

Please sign in to comment.