HBASE-25199 Remove deprecated HStore#getStoreHomedir methods (#2562)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
5d7e4beec4
commit
1fa07cea80
|
@ -165,6 +165,28 @@ public class HRegionFileSystem {
|
|||
return new Path(this.getRegionDir(), familyName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tabledir {@link Path} to where the table is being stored
|
||||
* @param hri {@link RegionInfo} for the region.
|
||||
* @param family {@link ColumnFamilyDescriptor} describing the column family
|
||||
* @return Path to family/Store home directory.
|
||||
*/
|
||||
public static Path getStoreHomedir(final Path tabledir,
|
||||
final RegionInfo hri, final byte[] family) {
|
||||
return getStoreHomedir(tabledir, hri.getEncodedName(), family);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tabledir {@link Path} to where the table is being stored
|
||||
* @param encodedName Encoded region name.
|
||||
* @param family {@link ColumnFamilyDescriptor} describing the column family
|
||||
* @return Path to family/Store home directory.
|
||||
*/
|
||||
public static Path getStoreHomedir(final Path tabledir,
|
||||
final String encodedName, final byte[] family) {
|
||||
return new Path(tabledir, new Path(encodedName, Bytes.toString(family)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the store directory for the specified family name
|
||||
* @param familyName Column Family Name
|
||||
|
|
|
@ -515,32 +515,6 @@ public class HStore implements Store, HeapSize, StoreConfigInformation,
|
|||
return StoreUtils.getMaxMemStoreTSInList(this.getStorefiles());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tabledir {@link Path} to where the table is being stored
|
||||
* @param hri {@link RegionInfo} for the region.
|
||||
* @param family {@link ColumnFamilyDescriptor} describing the column family
|
||||
* @return Path to family/Store home directory.
|
||||
* @deprecated Since 05/05/2013, HBase-7808, hbase-1.0.0
|
||||
*/
|
||||
@Deprecated
|
||||
public static Path getStoreHomedir(final Path tabledir,
|
||||
final RegionInfo hri, final byte[] family) {
|
||||
return getStoreHomedir(tabledir, hri.getEncodedName(), family);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tabledir {@link Path} to where the table is being stored
|
||||
* @param encodedName Encoded region name.
|
||||
* @param family {@link ColumnFamilyDescriptor} describing the column family
|
||||
* @return Path to family/Store home directory.
|
||||
* @deprecated Since 05/05/2013, HBase-7808, hbase-1.0.0
|
||||
*/
|
||||
@Deprecated
|
||||
public static Path getStoreHomedir(final Path tabledir,
|
||||
final String encodedName, final byte[] family) {
|
||||
return new Path(tabledir, new Path(encodedName, Bytes.toString(family)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the data block encoder
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.apache.hadoop.hbase.HConstants;
|
|||
import org.apache.hadoop.hbase.TableName;
|
||||
import org.apache.hadoop.hbase.client.RegionInfo;
|
||||
import org.apache.hadoop.hbase.regionserver.HRegion;
|
||||
import org.apache.hadoop.hbase.regionserver.HStore;
|
||||
import org.apache.hadoop.hbase.regionserver.HRegionFileSystem;
|
||||
import org.apache.yetus.audience.InterfaceAudience;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +48,8 @@ public final class HFileArchiveUtil {
|
|||
public static Path getStoreArchivePath(final Configuration conf, final TableName tableName,
|
||||
final String regionName, final String familyName) throws IOException {
|
||||
Path tableArchiveDir = getTableArchivePath(conf, tableName);
|
||||
return HStore.getStoreHomedir(tableArchiveDir, regionName, Bytes.toBytes(familyName));
|
||||
return HRegionFileSystem.getStoreHomedir(tableArchiveDir, regionName,
|
||||
Bytes.toBytes(familyName));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -77,7 +78,7 @@ public final class HFileArchiveUtil {
|
|||
throws IOException {
|
||||
Path rootDir = CommonFSUtils.getRootDir(conf);
|
||||
Path tableArchiveDir = getTableArchivePath(rootDir, region.getTable());
|
||||
return HStore.getStoreHomedir(tableArchiveDir, region, family);
|
||||
return HRegionFileSystem.getStoreHomedir(tableArchiveDir, region, family);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,13 +94,13 @@ public final class HFileArchiveUtil {
|
|||
*/
|
||||
public static Path getStoreArchivePathForRootDir(Path rootDir, RegionInfo region, byte[] family) {
|
||||
Path tableArchiveDir = getTableArchivePath(rootDir, region.getTable());
|
||||
return HStore.getStoreHomedir(tableArchiveDir, region, family);
|
||||
return HRegionFileSystem.getStoreHomedir(tableArchiveDir, region, family);
|
||||
}
|
||||
|
||||
public static Path getStoreArchivePathForArchivePath(Path archivePath, RegionInfo region,
|
||||
byte[] family) {
|
||||
Path tableArchiveDir = CommonFSUtils.getTableDir(archivePath, region.getTable());
|
||||
return HStore.getStoreHomedir(tableArchiveDir, region, family);
|
||||
return HRegionFileSystem.getStoreHomedir(tableArchiveDir, region, family);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,7 +55,7 @@ import org.apache.hadoop.hbase.master.assignment.MockMasterServices;
|
|||
import org.apache.hadoop.hbase.master.janitor.CatalogJanitor.SplitParentFirstComparator;
|
||||
import org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility;
|
||||
import org.apache.hadoop.hbase.regionserver.ChunkCreator;
|
||||
import org.apache.hadoop.hbase.regionserver.HStore;
|
||||
import org.apache.hadoop.hbase.regionserver.HRegionFileSystem;
|
||||
import org.apache.hadoop.hbase.regionserver.MemStoreLAB;
|
||||
import org.apache.hadoop.hbase.testclassification.MasterTests;
|
||||
import org.apache.hadoop.hbase.testclassification.MediumTests;
|
||||
|
@ -133,7 +133,8 @@ public class TestCatalogJanitor {
|
|||
Path rootdir = this.masterServices.getMasterFileSystem().getRootDir();
|
||||
Path tabledir = CommonFSUtils.getTableDir(rootdir, td.getTableName());
|
||||
Path parentdir = new Path(tabledir, parent.getEncodedName());
|
||||
Path storedir = HStore.getStoreHomedir(tabledir, splita, td.getColumnFamilies()[0].getName());
|
||||
Path storedir = HRegionFileSystem.getStoreHomedir(tabledir, splita,
|
||||
td.getColumnFamilies()[0].getName());
|
||||
Reference ref = Reference.createTopReference(Bytes.toBytes("ccc"));
|
||||
long now = System.currentTimeMillis();
|
||||
// Reference name has this format: StoreFile#REF_NAME_PARSER
|
||||
|
@ -448,10 +449,10 @@ public class TestCatalogJanitor {
|
|||
// the single test passes, but when the full suite is run, things get borked).
|
||||
CommonFSUtils.setRootDir(fs.getConf(), rootdir);
|
||||
Path tabledir = CommonFSUtils.getTableDir(rootdir, td.getTableName());
|
||||
Path storedir = HStore.getStoreHomedir(tabledir, parent, td.getColumnFamilies()[0].getName());
|
||||
Path storeArchive =
|
||||
HFileArchiveUtil.getStoreArchivePath(this.masterServices.getConfiguration(), parent,
|
||||
tabledir, td.getColumnFamilies()[0].getName());
|
||||
Path storedir = HRegionFileSystem.getStoreHomedir(tabledir, parent,
|
||||
td.getColumnFamilies()[0].getName());
|
||||
Path storeArchive = HFileArchiveUtil.getStoreArchivePath(this.masterServices.getConfiguration(),
|
||||
parent, tabledir, td.getColumnFamilies()[0].getName());
|
||||
LOG.debug("Table dir:" + tabledir);
|
||||
LOG.debug("Store dir:" + storedir);
|
||||
LOG.debug("Store archive dir:" + storeArchive);
|
||||
|
@ -523,7 +524,8 @@ public class TestCatalogJanitor {
|
|||
// the single test passes, but when the full suite is run, things get borked).
|
||||
CommonFSUtils.setRootDir(fs.getConf(), rootdir);
|
||||
Path tabledir = CommonFSUtils.getTableDir(rootdir, parent.getTable());
|
||||
Path storedir = HStore.getStoreHomedir(tabledir, parent, td.getColumnFamilies()[0].getName());
|
||||
Path storedir = HRegionFileSystem.getStoreHomedir(tabledir, parent,
|
||||
td.getColumnFamilies()[0].getName());
|
||||
LOG.info("Old root:" + rootdir);
|
||||
LOG.info("Old table:" + tabledir);
|
||||
LOG.info("Old store:" + storedir);
|
||||
|
@ -618,7 +620,7 @@ public class TestCatalogJanitor {
|
|||
throws IOException {
|
||||
Path rootdir = services.getMasterFileSystem().getRootDir();
|
||||
Path tabledir = CommonFSUtils.getTableDir(rootdir, parent.getTable());
|
||||
Path storedir = HStore.getStoreHomedir(tabledir, daughter,
|
||||
Path storedir = HRegionFileSystem.getStoreHomedir(tabledir, daughter,
|
||||
td.getColumnFamilies()[0].getName());
|
||||
Reference ref =
|
||||
top? Reference.createTopReference(midkey): Reference.createBottomReference(midkey);
|
||||
|
|
|
@ -59,7 +59,8 @@ public class TestStripeStoreFileManager {
|
|||
private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
|
||||
private static final Path BASEDIR =
|
||||
TEST_UTIL.getDataTestDir(TestStripeStoreFileManager.class.getSimpleName());
|
||||
private static final Path CFDIR = HStore.getStoreHomedir(BASEDIR, "region", Bytes.toBytes("cf"));
|
||||
private static final Path CFDIR = HRegionFileSystem.getStoreHomedir(BASEDIR, "region",
|
||||
Bytes.toBytes("cf"));
|
||||
|
||||
private static final byte[] KEY_A = Bytes.toBytes("aaa");
|
||||
private static final byte[] KEY_B = Bytes.toBytes("aab");
|
||||
|
|
Loading…
Reference in New Issue