HeartSaVioR commented on a change in pull request #23260: [SPARK-26311][CORE] New feature: apply custom log URL pattern for executor log URLs in SHS URL: https://github.com/apache/spark/pull/23260#discussion_r250023966
########## File path: core/src/main/scala/org/apache/spark/deploy/history/HistoryAppStatusStore.scala ########## @@ -0,0 +1,123 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.deploy.history + +import scala.util.matching.Regex + +import org.apache.spark.SparkConf +import org.apache.spark.internal.Logging +import org.apache.spark.internal.config.History.{APPLY_CUSTOM_EXECUTOR_LOG_URL_TO_INCOMPLETE_APP, CUSTOM_EXECUTOR_LOG_URL} +import org.apache.spark.status.{AppStatusListener, AppStatusStore} +import org.apache.spark.status.api.v1 +import org.apache.spark.status.api.v1.ExecutorSummary +import org.apache.spark.util.kvstore.KVStore + +private[spark] class HistoryAppStatusStore( + conf: SparkConf, + store: KVStore, + listener: Option[AppStatusListener] = None) + extends AppStatusStore(store, listener) with Logging { + + import HistoryAppStatusStore._ + + private val logUrlPattern: Option[String] = conf.get(CUSTOM_EXECUTOR_LOG_URL) Review comment: If my understanding is right, does it mean application information in AppStatusStore is not changed during AppStatusStore instance's lifetime? (Looks like it is, according to the javadoc of LoadedAppUI btw.) Sorry the patch was started from touching very narrow area of UI/SHS, but now the patch ended up touching broad area of codebase in SHS, which I'm not sure about the details. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
