flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8123) Bundle python library in jar
Date Tue, 12 Dec 2017 11:50:00 GMT

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

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

GitHub user zentol opened a pull request:

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

     [FLINK-8123][metrics] Guard against metric-related ClassCastExceptions

    ## What is the purpose of the change
    
    Originally this PR was intended to prevent some ClassCastExceptions that could occur due
to casts to internal metric group classes. These casts are somewhat necessary to keep the
separation of public/internal metric classes, which is admittedly tricky since this separation
isn't well defined when it comes to stream operators.
    
    The fallback behavior in case of exceptions generally created a plain `MetricGroup`, which,
while correct in terms of the API, tends to propagate problems downstream. What we needed
was a safe drop-in replacement for internal metric groups in case something went wrong. In
fact we already had them, but just as test classes.
    
    The first commit moves these into classes into the main scope of flink-runtime, along
with the `NoOpMetricRegistry`.
    
    The second commit guards all casts to internal metric groups with a try-catch block with
proper fallback behavior.
    
    To consolidate code, all usages of the existing test groups were replaced with the new
ones in flink-runtime in commit#3, and all usages of the existing NoOpMetricRegistry in commit#4.
    
    Finally, the fifth commit refactors 2 tests in the CheckpointStatsTrackerTest to not rely
on mocking / be more concise.
    
    ## Brief change log
    
    * added guards to various classes where casts to internal classes are being made
    * moved & refactored existing Dummy*MetricGroups into flink-runtime and replaced all
usages
    * moved NoOpRegistry implementation to flink-metrics and replaced all usages
    * replaced all mocked metric groups with the an actual object
    * refactored the CheckpointStatsTrackerTest to rely less on mocking
    
    ## Verifying this change
    
    Not covered by tests.
    
    ## 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)
      - If yes, how is the feature documented? (not applicable)


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

    $ git pull https://github.com/zentol/flink 8213

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

    https://github.com/apache/flink/pull/5154.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 #5154
    
----
commit 66a5ff27cd4b9b3fafb2b949fe624a50ec904e8c
Author: zentol <chesnay@apache.org>
Date:   2017-12-06T13:39:15Z

    [FLINK-8213][metrics] Add safe dummy ComponentMetricGroups to flink-runtime

commit 13a0802bbd8b635820a40da80aef36ced5664aac
Author: zentol <chesnay@apache.org>
Date:   2017-12-06T13:06:55Z

    [FLINK-8213][metrics] Add guards against ClassCastExceptions

commit 6e0be28d7f5c9d849b1b28bc9dd3935195a9cdb5
Author: zentol <chesnay@apache.org>
Date:   2017-12-06T13:56:20Z

    [FLINK-8213][metrics] Replace usages of existing dummy groups

commit 5af3ea30922ee3163282f3f83432a14b89083a74
Author: zentol <chesnay@apache.org>
Date:   2017-12-06T13:59:09Z

    [FLINK-8213][metrics] Replace usages of existing NoOpRegistry

commit c245269fff0653c5c6712603e92d77bd3e8ea07b
Author: zentol <chesnay@apache.org>
Date:   2017-12-06T13:59:18Z

    [hotfix][metrics] Refactor CheckpointStatsTrackerTest

----


> Bundle python library in jar
> ----------------------------
>
>                 Key: FLINK-8123
>                 URL: https://issues.apache.org/jira/browse/FLINK-8123
>             Project: Flink
>          Issue Type: Improvement
>          Components: Python API
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Minor
>             Fix For: 1.5.0
>
>
> Currently, the flink-python library is split into 2 parts in flink-dist; the flink-python
jar in the /lib directory, and the python scripts in the /resources directory.
> I propose to bundle the python scripts in the flink-python jar. This way, the jar is
self-contained and we no longer need to search for the python scripts (which was hacky and
had a separate codepath for tests).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message