[
https://issues.apache.org/jira/browse/BEAM-4019?focusedWorklogId=92151&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-92151
]
ASF GitHub Bot logged work on BEAM-4019:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Apr/18 16:05
Start Date: 18/Apr/18 16:05
Worklog Time Spent: 10m
Work Description: iemejia commented on a change in pull request #5081:
[BEAM-4019] Refactor HBaseIO splitting to produce ByteKeyRange objects
URL: https://github.com/apache/beam/pull/5081#discussion_r182483046
##########
File path:
sdks/java/io/hbase/src/main/java/org/apache/beam/sdk/io/hbase/HBaseIO.java
##########
@@ -420,17 +313,38 @@ private long estimateSizeBytes() throws Exception {
}
try (Connection connection =
ConnectionFactory.createConnection(read.getConfiguration())) {
- List<HRegionLocation> regionLocations = getRegionLocations(connection);
- int realNumSplits = numSplits < regionLocations.size() ?
regionLocations.size() : numSplits;
- LOG.debug("Suggested {} bundle(s) based on size", numSplits);
- LOG.debug("Suggested {} bundle(s) based on number of regions",
regionLocations.size());
- final List<HBaseSource> sources = splitBasedOnRegions(regionLocations,
realNumSplits);
- LOG.debug("Split into {} bundle(s)", sources.size());
- if (numSplits >= 1) {
+ List<HRegionLocation> regionLocations =
+ HBaseUtils.getRegionLocations(connection, read.tableId,
read.serializableScan.get());
+ LOG.debug("Suggested {} source(s) based on size", numSplits);
+ LOG.debug("Suggested {} source(s) based on number of regions",
regionLocations.size());
+
+ List<ByteKeyRange> ranges =
+ HBaseUtils.getRanges(
+ regionLocations, read.tableId, read.serializableScan.get());
+ final int numSources = ranges.size();
+ LOG.debug("Spliting into {} source(s)", numSources);
+ if (numSources >= 1) {
Review comment:
yes sir !
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 92151)
Time Spent: 1h 10m (was: 1h)
> Refactor HBaseIO splitting to produce ByteKeyRange objects
> ----------------------------------------------------------
>
> Key: BEAM-4019
> URL: https://issues.apache.org/jira/browse/BEAM-4019
> Project: Beam
> Issue Type: Improvement
> Components: io-java-hbase
> Reporter: Ismaël Mejía
> Assignee: Ismaël Mejía
> Priority: Minor
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> This allows to reuse the splitting logic for a future SDF-based
> implementation by reusing it as part of the @SplitRestriction method.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)