Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 1.10.0 hive engine add yarn log #669

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ object ComputationExecutorConf {

val PRINT_TASK_PARAMS_SKIP_KEYS = CommonVars(
"linkis.engineconn.print.task.params.skip.keys",
"jobId",
"jobId,wds.linkis.rm.yarnqueue",
"skip to print params key at job logs"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,13 @@ abstract class ComputationExecutor(val outputPrintLimit: Int = 1000)

def printTaskParamsLog(engineExecutorContext: EngineExecutionContext): Unit = {
val sb = new StringBuilder

EngineConnObject.getEngineCreationContext.getOptions.asScala.foreach({ case (key, value) =>
// skip log jobId because it corresponding jobid when the ec created
if (!ComputationExecutorConf.PRINT_TASK_PARAMS_SKIP_KEYS.getValue.contains(key)) {
if (
!ComputationExecutorConf.PRINT_TASK_PARAMS_SKIP_KEYS.getValue
.split(",")
.exists(_.equals(key))
) {
sb.append(s"${key}=${value}\n")
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ object HiveEngineConfiguration {

val HIVE_RANGER_ENABLE = CommonVars[Boolean]("linkis.hive.ranger.enabled", false).getValue

val HIVE_QUEUE_NAME: String = "mapreduce.job.queuename"

val BDP_QUEUE_NAME: String = "wds.linkis.rm.yarnqueue"

val HIVE_TEZ_QUEUE_NAME: String = "tez.queue.name"

}
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ import scala.collection.JavaConverters._

class HiveEngineConnFactory extends ComputationSingleExecutorEngineConnFactory with Logging {

private val HIVE_QUEUE_NAME: String = "mapreduce.job.queuename"
private val BDP_QUEUE_NAME: String = "wds.linkis.rm.yarnqueue"
private val HIVE_TEZ_QUEUE_NAME: String = "tez.queue.name"

override protected def newExecutor(
id: Int,
engineCreationContext: EngineCreationContext,
Expand Down Expand Up @@ -188,10 +184,10 @@ class HiveEngineConnFactory extends ComputationSingleExecutorEngineConnFactory w
}
.foreach { case (k, v) =>
logger.info(s"key is $k, value is $v")
if (BDP_QUEUE_NAME.equals(k)) {
hiveConf.set(HIVE_QUEUE_NAME, v)
if (HiveEngineConfiguration.BDP_QUEUE_NAME.equals(k)) {
hiveConf.set(HiveEngineConfiguration.HIVE_QUEUE_NAME, v)
if ("tez".equals(HiveEngineConfiguration.HIVE_ENGINE_TYPE)) {
hiveConf.set(HIVE_TEZ_QUEUE_NAME, v)
hiveConf.set(HiveEngineConfiguration.HIVE_TEZ_QUEUE_NAME, v)
}
} else hiveConf.set(k, v)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ class HiveEngineConcurrentConnExecutor(
engineExecutorContext.appendStdout(
s"Your hive taskId: $taskId has $numberOfJobs MR jobs to do"
)
val queueName = hiveConf.get(HiveEngineConfiguration.HIVE_QUEUE_NAME)
engineExecutorContext.appendStdout(
s"Your task will be submitted to the $queueName queue"
)
}

logger.info(s"there are ${numberOfJobs} jobs.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ class HiveEngineConnExecutor(
}
if (numberOfMRJobs > 0) {
engineExecutorContext.appendStdout(s"Your hive sql has $numberOfMRJobs MR jobs to do")
val queueName = hiveConf.get(HiveEngineConfiguration.HIVE_QUEUE_NAME)
engineExecutorContext.appendStdout(s"Your task will be submitted to the $queueName queue")
}
if (thread.isInterrupted) {
logger.error(
Expand Down
Loading