HBASE-13499 AsyncRpcClient test cases failure in powerpc
This commit is contained in:
parent
ba8d985000
commit
ca7efc183a
|
@ -120,7 +120,7 @@ public class AsyncRpcClient extends AbstractRpcClient {
|
|||
boolean epollEnabled = conf.getBoolean(USE_NATIVE_TRANSPORT, false);
|
||||
|
||||
// Use the faster native epoll transport mechanism on linux if enabled
|
||||
if (epollEnabled && JVM.isLinux()) {
|
||||
if (epollEnabled && JVM.isLinux() && JVM.isAmd64()) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Create EpollEventLoopGroup with maxThreads = " + maxThreads);
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ public class JVM {
|
|||
private static final boolean linux =
|
||||
System.getProperty("os.name").startsWith("Linux");
|
||||
private static final String JVMVersion = System.getProperty("java.version");
|
||||
private static final boolean amd64 = System.getProperty("os.arch").contains("amd64");
|
||||
|
||||
/**
|
||||
* Constructor. Get the running Operating System instance
|
||||
|
@ -79,6 +80,14 @@ public class JVM {
|
|||
public static boolean isLinux() {
|
||||
return linux;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the arch is amd64;
|
||||
* @return whether this is amd64 or not.
|
||||
*/
|
||||
public static boolean isAmd64() {
|
||||
return amd64;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the finish() method of GZIPOutputStream is broken
|
||||
|
|
|
@ -100,7 +100,7 @@ public class TestAsyncIPC extends AbstractTestIPC {
|
|||
|
||||
private void setConf(Configuration conf) {
|
||||
conf.setBoolean(AsyncRpcClient.USE_NATIVE_TRANSPORT, useNativeTransport);
|
||||
conf.setBoolean(AsyncRpcClient.USE_NATIVE_TRANSPORT, useGlobalEventLoopGroup);
|
||||
conf.setBoolean(AsyncRpcClient.USE_GLOBAL_EVENT_LOOP_GROUP, useGlobalEventLoopGroup);
|
||||
if (useGlobalEventLoopGroup && AsyncRpcClient.GLOBAL_EVENT_LOOP_GROUP != null) {
|
||||
if (useNativeTransport
|
||||
&& !(AsyncRpcClient.GLOBAL_EVENT_LOOP_GROUP.getFirst() instanceof EpollEventLoopGroup)
|
||||
|
|
Loading…
Reference in New Issue