[ 
https://issues.apache.org/jira/browse/BEAM-4018?focusedWorklogId=94302&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-94302
 ]

ASF GitHub Bot logged work on BEAM-4018:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Apr/18 21:13
            Start Date: 23/Apr/18 21:13
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on a change in pull request #5175: 
[BEAM-4018] Add a ByteKeyRangeTracker based on RestrictionTracker for SDF
URL: https://github.com/apache/beam/pull/5175#discussion_r183539553
 
 

 ##########
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/splittabledofn/ByteKeyRangeTracker.java
 ##########
 @@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.transforms.splittabledofn;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Preconditions.checkState;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.MoreObjects;
+import javax.annotation.Nullable;
+import org.apache.beam.sdk.io.range.ByteKey;
+import org.apache.beam.sdk.io.range.ByteKeyRange;
+import org.apache.beam.sdk.transforms.DoFn;
+
+/**
+ * A {@link RestrictionTracker} for claiming {@link ByteKey}s in a {@link 
ByteKeyRange} in a
+ * monotonically increasing fashion. The range is a semi-open bounded interval 
[startKey, endKey)
+ * where the limits are both represented by ByteKey.EMPTY.
 
 Review comment:
   Yes exactly that. ByteKey is quite tricky it is the lowest and the biggest 
value depending on it is use in the range. See 
https://github.com/apache/beam/blob/229e69d241049719fb53adcacab85292d876d7f9/sdks/java/core/src/main/java/org/apache/beam/sdk/io/range/ByteKey.java#L38
   So I am not overloading anything. I am just following the definition of 
ByteKey (and also this is consistent with the way HBase (and I suppose 
Bigtable) partition ranges work.
   

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 94302)
    Time Spent: 4h 40m  (was: 4.5h)

> Add a ByteKeyRangeTracker based on RestrictionTracker for SDF
> -------------------------------------------------------------
>
>                 Key: BEAM-4018
>                 URL: https://issues.apache.org/jira/browse/BEAM-4018
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-core
>            Reporter: Ismaël Mejía
>            Assignee: Ismaël Mejía
>            Priority: Minor
>          Time Spent: 4h 40m
>  Remaining Estimate: 0h
>
> We can have a RestrictionTracker for ByteKey ranges as part of the core sdk 
> so it can be reused by future SDF based IOs like Bigtable, HBase among others.



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

Reply via email to