Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-1335

Duplicated & time-consuming method call found in query

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.1.1
    • 1.2.0
    • data-query

    Description

      1. Scenario

      Currently we did a concurrent 14 queries on Carbondata. The queries are the same, but on different tables. We have noticed the following scene:

      + A single query took about 5s;
      + In concurrent scenario, each query took about 15s;

      By adding checkpoint in the log, we found that there was great latency in starting query jobs in spark.

      1. Analyze

      When we fire a query, Carbondata firstly do some job in the client side, including parse/analyze plans and prepare filtered blocks and inputSplits. Then Carbondata start to submit query job to spark.

      We found in the first step, Carbondata took about 7s in current scenario, but it only took about <1s in single scenario.
      By studying the related code, we found the most time consuming method call was `CarbonSessionCatalog.lookupRelation`. In side this method, it called `super.lookupRelation` twice, which consumed about 3s each time.

      1. Solution

      Carbondata only needs to call the `super.lookupRelation` only once, we need to remove the useless duplicated method call.

      I've tested in my environment and it works well. In concurrent scenario, each query takes about 12s (3s saved for the improvement).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              xuchuanyin Chuanyin Xu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m