[
https://issues.apache.org/jira/browse/HBASE-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13551367#comment-13551367
]
Jonathan Hsieh commented on HBASE-7535:
---------------------------------------
I've been testing this at the system test level and this has fixed a commonly
occurring problem, so functionally I'm +1.
I'm not sure I get the OPEN part of this name. Can we just be more specific
with the comment and pick a better name for LINK_NAME_OPEN_PATTERN? Maybe
REF_OR_HFILE_LINK_PATTERN?
{code}
+ /** The link should be used for everything that can be found in
/hbase/table/region/family/ */
+ private static final Pattern LINK_NAME_OPEN_PATTERN =
+ Pattern.compile(String.format("^(%s)=(%s)-(.+)$",
HTableDescriptor.VALID_USER_TABLE_REGEX,
+ HRegionInfo.ENCODED_REGION_NAME_REGEX));
+
{code}
Add an example in comments of where we start from and what we get?
{code}
private void restoreReferenceFile(final Path familyDir, final HRegionInfo
regionInfo,
final String hfileName) throws IOException {
- Path inPath = new Path(new Path(new Path(snapshotDesc.getTable(),
- regionInfo.getEncodedName()), familyDir.getName()), hfileName);
- Path outPath = new Path(familyDir,
StoreFile.getReferredToFile(inPath).getName());
- InputStream in = new HFileLink(conf, inPath).open(fs);
+ // Extract the referred information (hfile name and parent region)
+
{code}
> Fix restore reference files
> ---------------------------
>
> Key: HBASE-7535
> URL: https://issues.apache.org/jira/browse/HBASE-7535
> Project: HBase
> Issue Type: Sub-task
> Reporter: Matteo Bertozzi
> Assignee: Matteo Bertozzi
> Priority: Blocker
> Attachments: HBASE-7535-v0.patch, HBASE-7535-v1.patch
>
>
> After HBASE-7419 the HFileLink regex became stricter, to have the proper
> isHFileLink() check.
> but HFileLink should open both reference and hfiles
> since the main idea behind it is open stuff in /table/region/family/XYZ
> This patch fix the reference (split files) restore problem and open the
> hfilelink regex for HFileLink(/table/region/family/xyz).open()
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira