Skip to content

HBASE-30016 Cached table regions locations are not using in TableSnapshotInputFormatImpl#getSplits#7975

Open
srinireddy2020 wants to merge 1 commit intoapache:masterfrom
srinireddy2020:HBASE-30016
Open

HBASE-30016 Cached table regions locations are not using in TableSnapshotInputFormatImpl#getSplits#7975
srinireddy2020 wants to merge 1 commit intoapache:masterfrom
srinireddy2020:HBASE-30016

Conversation

@srinireddy2020
Copy link
Contributor

In org.apache.hadoop.hbase.mapreduce.TableSnapshotInputFormatImpl#getSplits(org.apache.hadoop.hbase.client.Scan, org.apache.hadoop.hbase.snapshot.SnapshotManifest, java.util.List<org.apache.hadoop.hbase.client.RegionInfo>, org.apache.hadoop.fs.Path, org.apache.hadoop.conf.Configuration, org.apache.hadoop.hbase.util.RegionSplitter.SplitAlgorithm, int)

Connection obj is closing early. RegionLocator references are using after connection obj closed.
so that cached table regions locations are not using.

newConf.setInt("hbase.hconnection.threads.max", 1);
try {
List<InputSplit> splits = new ArrayList<>();
try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we do try-with-resources here

}
}
} finally {
if (connection != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe all changes are just because we added an extra block {} and code got shifted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants