HorizonNet commented on a change in pull request #1062: HBASE-23705 Add
CellComparator to HFileContext
URL: https://github.com/apache/hbase/pull/1062#discussion_r368310991
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestGetClosestAtOrBefore.java
##########
@@ -85,36 +89,37 @@
@Test
public void testUsingMetaAndBinary() throws IOException {
- FileSystem filesystem = FileSystem.get(conf);
Path rootdir = UTIL.getDataTestDirOnTestFS();
// Up flush size else we bind up when we use default catalog flush of 16k.
- TableDescriptorBuilder metaBuilder = UTIL.getMetaTableDescriptorBuilder()
- .setMemStoreFlushSize(64 * 1024 * 1024);
-
+ TableDescriptors tds = new FSTableDescriptors(UTIL.getConfiguration());
+ TableDescriptorBuilder metaBuilder = TableDescriptorBuilder.
+ newBuilder(tds.get(TableName.META_TABLE_NAME)).setMemStoreFlushSize(64 *
1024 * 1024);
+ TableDescriptor td = metaBuilder.build();
HRegion mr =
HBaseTestingUtility.createRegionAndWAL(HRegionInfo.FIRST_META_REGIONINFO,
- rootdir, this.conf, metaBuilder.build());
+ rootdir, this.conf, td);
try {
// Write rows for three tables 'A', 'B', and 'C'.
for (char c = 'A'; c < 'D'; c++) {
HTableDescriptor htd = new HTableDescriptor(TableName.valueOf("" + c));
final int last = 128;
final int interval = 2;
for (int i = 0; i <= last; i += interval) {
- HRegionInfo hri = new HRegionInfo(htd.getTableName(),
- i == 0 ? HConstants.EMPTY_BYTE_ARRAY : Bytes.toBytes((byte) i),
- i == last ? HConstants.EMPTY_BYTE_ARRAY : Bytes.toBytes((byte) i +
interval));
-
+ RegionInfo hri = RegionInfoBuilder.newBuilder(htd.getTableName()).
+ setStartKey(i == 0? HConstants.EMPTY_BYTE_ARRAY:
Bytes.toBytes((byte)i)).
Review comment:
NIT: Most of the time we use a leading `.`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services