You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by gallenvara <gi...@git.apache.org> on 2016/01/22 06:50:38 UTC

[GitHub] flink pull request: Enable range partition with custom data distri...

GitHub user gallenvara opened a pull request:

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

    Enable range partition with custom data distribution.

    

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

    $ git pull https://github.com/gallenvara/flink flink-2997

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

    https://github.com/apache/flink/pull/1540.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 #1540
    
----
commit 760858d7624a00d3f189222d9c9d578b9d42b335
Author: gallenvara <ga...@126.com>
Date:   2016-01-20T02:10:58Z

    Enable range partition with custom data distribution.

----


---
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: Enable range partition with custom data distri...

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

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


---
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: Enable range partition with custom data distri...

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

    https://github.com/apache/flink/pull/1540#discussion_r50505138
  
    --- Diff: flink-core/pom.xml ---
    @@ -70,6 +70,12 @@ under the License.
     			<scope>test</scope>
     		</dependency>
     
    +		<dependency>
    +			<groupId>org.apache.flink</groupId>
    --- End diff --
    
    recursive dependency.


---
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: Enable range partition with custom data distri...

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

    https://github.com/apache/flink/pull/1540#discussion_r50505395
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/operators/GenericDataSinkBase.java ---
    @@ -176,6 +182,31 @@ public void setLocalOrder(Ordering localOrder) {
     		this.localOrdering = localOrder;
     	}
     
    +	public Ordering getPartitionOrdering() {
    --- End diff --
    
    `partitionByRange` with `DataDistribution` is added in `DataSet`, so we could `partitionByRange` with `DataDistribution` at any point of Flink DAG, these interface/logic is duplicated.


---
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: Enable range partition with custom data distri...

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

    https://github.com/apache/flink/pull/1540#discussion_r50505552
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/distributions/DataDistribution.java ---
    @@ -47,6 +49,12 @@
     	 */
     	Object[] getBucketBoundary(int bucketNum, int totalNumBuckets);
     	
    +	public int[] getBoundaryKeyPositions();
    --- End diff --
    
    Why add these interfaces? the partition key position is defined by user through `partitionByRange` parameter, and the partition key type information is extracted by flink itself, you should not depends on `DataDistribution` to have these information.


---
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: Enable range partition with custom data distri...

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

    https://github.com/apache/flink/pull/1540#discussion_r50505273
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/DataSet.java ---
    @@ -1253,9 +1257,11 @@ public long count() throws Exception {
     	 * @param fields The field indexes on which the DataSet is range-partitioned.
     	 * @return The partitioned DataSet.
     	 */
    -	public PartitionOperator<T> partitionByRange(int... fields) {
    +	public PartitionOperator<T> partitionByRange(DataDistribution datadistribution, int... fields) {
    +		new ManualDistribution().setDistribution(datadistribution);
    --- End diff --
    
    Why wrapped with `ManualDistribution`, and you didn't actually use it.


---
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.
---