You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by zentol <gi...@git.apache.org> on 2016/04/26 14:46:20 UTC

[GitHub] flink pull request: [FLINK-3821] Reduce Guava usage in flink-java

GitHub user zentol opened a pull request:

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

    [FLINK-3821] Reduce Guava usage in flink-java

    Removes all Guava usages in non-test files.
    
    -replaced CharSets with StandardCharsets
    -added checkElementIndex() method to Flink Preconditions
    -replaced Guava Preconditions with Flink Preconditions
    -removed single usages of Ints.max() and Joiner()

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

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

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

    https://github.com/apache/flink/pull/1938.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 #1938
    
----
commit 1bd6d230e3c6499dae1ac1fd30614548dd1173ea
Author: zentol <ch...@apache.org>
Date:   2016-04-26T12:45:51Z

    [FLINK-3821] Reduce Guava usage in flink-java
    
    Removes all Guava usages in non-test files.
    
    -replaced CharSets with StandardCharsets
    -added checkElementIndex to Flink Preconditions
    -replaced Guava Preconditions with Flink Preconditions
    -removed single usages Ints.max() and Joiner()

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-3821] Reduce Guava usage in flink-java

Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1938#discussion_r61614176
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/utils/DataSetUtils.java ---
    @@ -104,7 +104,10 @@ public void open(Configuration parameters) throws Exception {
     							@Override
     							public List<Tuple2<Integer, Long>> initializeBroadcastVariable(Iterable<Tuple2<Integer, Long>> data) {
     								// sort the list by task id to calculate the correct offset
    -								List<Tuple2<Integer, Long>> sortedData = Lists.newArrayList(data);
    +								List<Tuple2<Integer, Long>> sortedData = new ArrayList();
    --- End diff --
    
    Add the diamond operator to ArrayList?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-3821] Reduce Guava usage in flink-java

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-3821] Reduce Guava usage in flink-java

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the pull request:

    https://github.com/apache/flink/pull/1938#issuecomment-216243462
  
    @greghogan Thanks for looking over it, I've addressed your comments.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-3821] Reduce Guava usage in flink-java

Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on the pull request:

    https://github.com/apache/flink/pull/1938#issuecomment-215830882
  
    +1 with two comments.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-3821] Reduce Guava usage in flink-java

Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1938#discussion_r61613247
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/io/CsvInputFormat.java ---
    @@ -133,13 +132,17 @@ public OUT readRecord(OUT reuse, byte[] bytes, int offset, int numBytes) throws
     	protected static boolean[] toBooleanMask(int[] sourceFieldIndices) {
     		Preconditions.checkNotNull(sourceFieldIndices);
     
    +		int max = 0;
     		for (int i : sourceFieldIndices) {
     			if (i < 0) {
     				throw new IllegalArgumentException("Field indices must not be smaller than zero.");
     			}
    +			if (i > max) {
    --- End diff --
    
    Use the intrinsic `max = Math.max(max, i);`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-3821] Reduce Guava usage in flink-java

Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the pull request:

    https://github.com/apache/flink/pull/1938#issuecomment-218220824
  
    Thanks @zentol. Will merge this PR


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---