HBASE-23738 Removed deprecated createLocalHRegion from HBaseTestingUtility

Signed-off-by: stack <stack@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
Jan Hentschel 2020-01-28 12:40:00 +01:00 committed by GitHub
parent 85d0208baa
commit e836f5684f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 38 deletions

View File

@ -2032,32 +2032,6 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
return HRegion.createHRegion(info, getDataTestDir(), getConfiguration(), desc, wal);
}
/**
* @param tableName the name of the table
* @param startKey the start key of the region
* @param stopKey the stop key of the region
* @param callingMethod the name of the calling method probably a test method
* @param conf the configuration to use
* @param isReadOnly {@code true} if the table is read only, {@code false} otherwise
* @param families the column families to use
* @throws IOException if an IO problem is encountered
* @return A region on which you must call {@link HBaseTestingUtility#closeRegionAndWAL(HRegion)}
* when done.
* @deprecated since 2.0.0 and will be removed in 3.0.0. Use
* {@link #createLocalHRegion(TableName, byte[], byte[], boolean, Durability, WAL, byte[]...)}
* instead.
* @see #createLocalHRegion(TableName, byte[], byte[], boolean, Durability, WAL, byte[]...)
* @see <a href="https://issues.apache.org/jira/browse/HBASE-13893">HBASE-13893</a>
*/
@Deprecated
public HRegion createLocalHRegion(byte[] tableName, byte[] startKey, byte[] stopKey,
String callingMethod, Configuration conf, boolean isReadOnly, Durability durability,
WAL wal, byte[]... families) throws IOException {
return this
.createLocalHRegion(TableName.valueOf(tableName), startKey, stopKey, isReadOnly, durability,
wal, families);
}
/**
* @param tableName
* @param startKey

View File

@ -1122,7 +1122,7 @@ public class TestHRegionReplayEvents {
byte[] tableName = Bytes.toBytes(method);
byte[] family = Bytes.toBytes("family");
HRegion region = initHRegion(tableName, method, family);
HRegion region = initHRegion(tableName, family);
try {
// replay an entry that is bigger than current read point
long readPoint = region.getMVCC().getReadPoint();
@ -1706,16 +1706,8 @@ public class TestHRegionReplayEvents {
}
}
private static HRegion initHRegion(byte[] tableName,
String callingMethod, byte[]... families) throws IOException {
return initHRegion(tableName, HConstants.EMPTY_START_ROW, HConstants.EMPTY_END_ROW,
callingMethod, TEST_UTIL.getConfiguration(), false, Durability.SYNC_WAL, null, families);
}
private static HRegion initHRegion(byte[] tableName, byte[] startKey, byte[] stopKey,
String callingMethod, Configuration conf, boolean isReadOnly, Durability durability,
WAL wal, byte[]... families) throws IOException {
return TEST_UTIL.createLocalHRegion(tableName, startKey, stopKey, callingMethod, conf,
isReadOnly, durability, wal, families);
private static HRegion initHRegion(byte[] tableName, byte[]... families) throws IOException {
return TEST_UTIL.createLocalHRegion(TableName.valueOf(tableName), HConstants.EMPTY_START_ROW,
HConstants.EMPTY_END_ROW, false, Durability.SYNC_WAL, null, families);
}
}