You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/07/05 04:45:00 UTC

[jira] [Commented] (FLINK-9758) ContinuousFileProcessingTest failed due to not setting runtimeContext

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

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

GitHub user Myasuka opened a pull request:

    https://github.com/apache/flink/pull/6260

    [FLINK-9758] Fix ContinuousFileProcessingTest failure due to not setting runtimeContext

    ## What is the purpose of the change
    
    Fix ContinuousFileProcessingTest failue due to not setting runtimeContext
    
    ## Brief change log
    ContinuousFileProcessingTest did not set runtime context for monitoringFunction, which will result in UT failure due to IllegalStateException if log level is set to DEBUG, just setRuntimeContext in this test.
    
    
    ## Verifying this change
    
    *(Please pick either of the following options)*
    
    This change is already covered by existing tests, such as *ContinuousFileProcessingTest* with debug-level.
    
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): no
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
      - The serializers: no
      - The runtime per-record code paths (performance sensitive): no
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: no
      - The S3 file system connector: no
    
    ## Documentation
    
      - Does this pull request introduce a new feature? no


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Myasuka/flink fix-ContinuousFileProcessingTest-FLINK-9758

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/6260.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6260
    
----
commit 5c9332eeb4e2a55059937dfb544c2e150d87384b
Author: Yun Tang <my...@...>
Date:   2018-07-05T04:39:23Z

    [FLINK-9758] Fix ContinuousFileProcessingTest failure due to not setting runtimeContext

----


> ContinuousFileProcessingTest failed due to not setting runtimeContext
> ---------------------------------------------------------------------
>
>                 Key: FLINK-9758
>                 URL: https://issues.apache.org/jira/browse/FLINK-9758
>             Project: Flink
>          Issue Type: Bug
>          Components: DataStream API
>    Affects Versions: 1.5.0
>            Reporter: Yun Tang
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.5.2
>
>
> Currently, ContinuousFileMonitoringFunction#open() method will print runtime context if the log-level is Debug:
> {code:java}
> if (LOG.isDebugEnabled()) {
>    LOG.debug("Opened {} (taskIdx= {}) for path: {}",
>       getClass().getSimpleName(), getRuntimeContext().getIndexOfThisSubtask(), path);
> }
> {code}
> However, ContinuousFileProcessingTest did not set runtime context for monitoringFunction, which will result in UT failure due to IllegalStateException if log level is set to DEBUG
> {code:java}
> IllegalStateException("The runtime context has not been initialized."); 
> {code}



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