Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-7359

Make local timezone deterministic during tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Infrastructure
    • None
    • ghx-label-6

    Description

      Currently Impala uses the timezone of the machine where impalad runs for local<-> utc time conversions. This makes it hard to test these functions, as they give different results depending on the location. Some tests solve this by starting a custom cluster after setting env var TZ, while others do not check the results precisely (only check that local!=utc, which is not true in some region).

      I would prefer to avoid starting custom clusters for these tests, because doing that makes the tests significantly slower.

      I see 3 possible solutions (easiest to hardest):

      • Start the minicluster with a specific timezone by default (e.g America/Los_Angeles). This could surprise people a bit, but wouldn't cause real issues as the minicluster is not meant for production. The simplest way to do this is setting env var TZ, but this could have some unintended side effects if other parts of the program use TZ too (e.g. logging).
      • Do the same but use a new startup flag instead of TZ. It would be possible to ensure that there are no side effects this way.
      • Add a query option to set local time. HIVE has a similar feature, see HIVE-16614.

      Attachments

        Issue Links

          Activity

            People

              csringhofer Csaba Ringhofer
              csringhofer Csaba Ringhofer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: