Skip to content

Commit

Permalink
remove supports for hadoop2
Browse files Browse the repository at this point in the history
  • Loading branch information
naive-zhang committed Dec 20, 2024
1 parent 240393c commit 5f6597a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ class YarnLogPartitionReader(yarnLogPartition: YarnLogPartition)
* * hadoop3:
* * /tmp/logs/xxx/bucket-xxx-tfile/0001/application_1734531705578_0001/localhost_32422
* * /tmp/logs/xxx/bucket-logs-tfile/0001/application_1734530210878_0001/localhost_24232
* * hadoop2:
* * /tmp/logs/xxx/logs/application_1716268141594_240044/node10_35254
*
* @param logStatus
* @param user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ case class YarnLogScan(
* hadoop3:
* /tmp/logs/xxx/bucket-xxx-tfile/0001/application_1734531705578_0001/localhost_32422
* /tmp/logs/xxx/bucket-logs-tfile/0001/application_1734530210878_0001/localhost_24232
* hadoop2:
* /tmp/logs/xxx/logs/application_1716268141594_240044/node10_35254
*
* @return
*/
Expand All @@ -91,13 +89,9 @@ case class YarnLogScan(
case pushed if pushed.isEmpty => listFiles(remoteAppLogDir)
case pushed => pushed.collectFirst {
case EqualTo("app_id", appId: String) =>
listFiles(s"${remoteAppLogDir}/*/*/*/${appId}") ++
// compatible for hadoop2
listFiles(s"${remoteAppLogDir}/*/*/${appId}")
listFiles(s"${remoteAppLogDir}/*/*/*/${appId}")
case EqualTo("container_id", containerId: String) =>
listFiles(s"${remoteAppLogDir}/*/*/*/*/${containerId}") ++
// compatible for hadoop2
listFiles(s"${remoteAppLogDir}/*/*/*/${containerId}")
listFiles(s"${remoteAppLogDir}/*/*/*/*/${containerId}")
case EqualTo("user", user: String) => listFiles(s"${remoteAppLogDir}/${user}")
case _ => listFiles(remoteAppLogDir)
}.get
Expand Down

0 comments on commit 5f6597a

Please sign in to comment.