private Pair<Path, Path> splitStoreFile(HRegionFileSystem regionFs, byte[] family, HStoreFile sf) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("pid=" + getProcId() + " splitting started for store file: " + sf.getPath() + " for region: " + getParentRegion().getShortNameToLog()); } final byte[] splitRow = getSplitRow(); final String familyName = Bytes.toString(family); final Path path_first = regionFs.splitStoreFile(this.daughter_1_RI, familyName, sf, splitRow, false, splitPolicy); final Path path_second = regionFs.splitStoreFile(this.daughter_2_RI, familyName, sf, splitRow, true, splitPolicy); if (LOG.isDebugEnabled()) { LOG.debug("pid=" + getProcId() + " splitting complete for store file: " + sf.getPath() + " for region: " + getParentRegion().getShortNameToLog()); } return new Pair<Path,Path>(path_first, path_second); }
private Path splitStoreFile(final HRegionFileSystem regionFs, final HRegionInfo hri, final String family, final HStoreFile sf, final byte[] splitKey, boolean isTopRef) throws IOException { FileSystem fs = regionFs.getFileSystem(); Path path = regionFs.splitStoreFile(hri, family, sf, splitKey, isTopRef, null); if (null == path) { return null; } Path regionDir = regionFs.commitDaughterRegion(hri); return new Path(new Path(regionDir, family), path.getName()); }
assertFalse(region.hasReferences()); Path referencePath = region.getRegionFileSystem().splitStoreFile(region.getRegionInfo(), "f", storefiles.iterator().next(), Bytes.toBytes("row1"), false, region.getSplitPolicy()); assertNull(referencePath); referencePath = region.getRegionFileSystem().splitStoreFile(region.getRegionInfo(), "i_f", storefiles.iterator().next(), Bytes.toBytes("row1"), false, region.getSplitPolicy()); assertNotNull(referencePath);
private Path splitStoreFile(final HRegionFileSystem regionFs, final HRegionInfo hri, final String family, final HStoreFile sf, final byte[] splitKey, boolean isTopRef) throws IOException { FileSystem fs = regionFs.getFileSystem(); Path path = regionFs.splitStoreFile(hri, family, sf, splitKey, isTopRef, null); if (null == path) { return null; } Path regionDir = regionFs.commitDaughterRegion(hri); return new Path(new Path(regionDir, family), path.getName()); }
private Pair<Path, Path> splitStoreFile(final byte[] family, final StoreFile sf) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Splitting started for store file: " + sf.getPath() + " for region: " + this.parent); } HRegionFileSystem fs = this.parent.getRegionFileSystem(); String familyName = Bytes.toString(family); Path path_a = fs.splitStoreFile(this.hri_a, familyName, sf, this.splitrow, false, this.parent.getSplitPolicy()); Path path_b = fs.splitStoreFile(this.hri_b, familyName, sf, this.splitrow, true, this.parent.getSplitPolicy()); if (LOG.isDebugEnabled()) { LOG.debug("Splitting complete for store file: " + sf.getPath() + " for region: " + this.parent); } return new Pair<Path,Path>(path_a, path_b); }
assertFalse(region.hasReferences()); Path referencePath = region.getRegionFileSystem().splitStoreFile(region.getRegionInfo(), "f", storefiles.iterator().next(), Bytes.toBytes("row1"), false, region.getSplitPolicy()); assertNull(referencePath); referencePath = region.getRegionFileSystem().splitStoreFile(region.getRegionInfo(), "i_f", storefiles.iterator().next(), Bytes.toBytes("row1"), false, region.getSplitPolicy()); assertNotNull(referencePath);