Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-46561

Use `exists` instead of `filter + nonEmpty` to get `showResourceColumn` in `MasterPage.scala`

    XMLWordPrintableJSON

Details

    Description

      def render(request: HttpServletRequest): Seq[Node] = {
        val state = getMasterState
      
        val showResourceColumn = state.workers.filter(_.resourcesInfoUsed.nonEmpty).nonEmpty

      we can use `exists` instead of `workers.filter(_.resourcesInfoUsed.nonEmpty).nonEmpty`

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              LuciferYang Yang Jie
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: