HBASE-25735 Add target Region to connection exceptions

Restore API for Phoenix (though it shouldn't be using
Private classes).
This commit is contained in:
stack 2021-04-08 13:24:29 -07:00
parent 6444e94c38
commit f9819f33b6
1 changed files with 9 additions and 3 deletions

View File

@ -18,15 +18,14 @@
package org.apache.hadoop.hbase.ipc;
import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.CellScannable;
import org.apache.hadoop.hbase.CellScanner;
import org.apache.hadoop.hbase.client.RegionInfo;
import org.apache.hadoop.hbase.util.ReflectionUtils;
import org.apache.yetus.audience.InterfaceAudience;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.hbase.util.ReflectionUtils;
/**
* Factory to create a {@link HBaseRpcController}
@ -52,16 +51,23 @@ public class RpcControllerFactory {
return new HBaseRpcControllerImpl();
}
public HBaseRpcController newController(CellScanner cellScanner) {
return new HBaseRpcControllerImpl(null, cellScanner);
}
public HBaseRpcController newController(RegionInfo regionInfo, CellScanner cellScanner) {
return new HBaseRpcControllerImpl(regionInfo, cellScanner);
}
public HBaseRpcController newController(final List<CellScannable> cellIterables) {
return new HBaseRpcControllerImpl(null, cellIterables);
}
public HBaseRpcController newController(RegionInfo regionInfo,
final List<CellScannable> cellIterables) {
return new HBaseRpcControllerImpl(regionInfo, cellIterables);
}
public static RpcControllerFactory instantiate(Configuration configuration) {
String rpcControllerFactoryClazz =
configuration.get(CUSTOM_CONTROLLER_CONF_KEY,