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

ASF GitHub Bot commented on FLINK-9962:
---------------------------------------

kl0u edited a comment on issue #6492: [FLINK-9962] [FS connector] allow users 
to specify TimeZone in DateTimeBucketer
URL: https://github.com/apache/flink/pull/6492#issuecomment-414608532
 
 
   Hi @bowenli86 ! I am in the process of reviewing the PR.
   
   There is no need to mock `ZoneId.systemDefault()`. 
   We have a constructor where we can specify the the `ZoneId`, so why not 
using this in order to provide a `ZoneId`?  This means that the 
`testGetBucketPathWithDefaultTimezone` will become:
   
   ```
   @Test
   public void testGetBucketPathWithDefaultTimezone() {
        ZoneId utc = ZoneId.of("UTC");
        DateTimeBucketAssigner bucketAssigner = new DateTimeBucketAssigner(utc);
        assertEquals("2018-08-04--06", bucketAssigner.getBucketId(null, 
mockedContext));
   }
   ``` 
   
   What do you think?
   
   And now that I see the tests, we do not even need that test, as we also have 
the  `testGetBucketPathWithSpecifiedTimezone` ;)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> allow users to specify TimeZone in DateTimeBucketer
> ---------------------------------------------------
>
>                 Key: FLINK-9962
>                 URL: https://issues.apache.org/jira/browse/FLINK-9962
>             Project: Flink
>          Issue Type: Improvement
>          Components: Streaming Connectors
>    Affects Versions: 1.5.1, 1.6.0
>            Reporter: Bowen Li
>            Assignee: Bowen Li
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> Currently {{DateTimeBucketer}} will return a bucket path by using local 
> timezone. We should add a {{timezone}} constructor param to allow users to 
> specify a timezone.



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

Reply via email to