[ 
https://issues.apache.org/jira/browse/IMPALA-7359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16639855#comment-16639855
 ] 

Csaba Ringhofer commented on IMPALA-7359:
-----------------------------------------

[~tarmstrong]
Implementing IMPALA-7362 made this change possible, but the test cluster still 
uses the local timezone.

My plan is to implement IMPALA-7557, which should make timezone conversions 
free if the timezone is UTC. After that the defaults of the test cluster could 
be changed like this:
- convert_legacy_hive_parquet_utc_timestamps=true
- use_local_tz_for_unix_timestamp_conversions=true
- default timezone would be UTC (but $TZ would remain local time)
This would mean that Impala would behave like currently (with the exception of 
function now()) and that functions that are affected by local time could be 
tested without cluster restart (by setting query option timezone to something 
else than UTC).

So my plan looks like this:
1. implement IMPALA-7557 first
2. ask the community's opinion about this change
3. (if accepted) change the defaults in the test cluster (but only test 
cluster, so not in impalad itself)
4. change the related custom cluster tests to be normal query tests

> Make local timezone deterministic during tests
> ----------------------------------------------
>
>                 Key: IMPALA-7359
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7359
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Infrastructure
>            Reporter: Csaba Ringhofer
>            Assignee: Csaba Ringhofer
>            Priority: Major
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to