From 5d71f9d85ff40801acbdbffd2b502e1c4069490e Mon Sep 17 00:00:00 2001 From: Beata Sudi Date: Tue, 26 Nov 2019 10:32:38 +0100 Subject: [PATCH 1/5] HBASE-18382 add transport type info into Thrift UI --- .../resources/hbase-webapps/thrift/thrift.jsp | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp index 432b0f4e7a34..288b2aafd5bd 100644 --- a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp +++ b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp @@ -31,9 +31,12 @@ long startcode = conf.getLong("startcode", System.currentTimeMillis()); String listenPort = conf.get("hbase.regionserver.thrift.port", "9090"); String serverInfo = listenPort + "," + String.valueOf(startcode); ImplType implType = ImplType.getServerImpl(conf); -String framed = implType.isAlwaysFramed() - ? "true" : conf.get("hbase.regionserver.thrift.framed", "false"); -String compact = conf.get("hbase.regionserver.thrift.compact", "false"); +String framed = (implType.isAlwaysFramed() + ? "true" : conf.get("hbase.regionserver.thrift.framed", "false")) + .equals("true") ? "Framed": "Standard"; +String compact = conf.get("hbase.regionserver.thrift.compact", "false") + .equals("true") ? "Compact" : "Binary"; +String qop = conf.get("hbase.thrift.security.qop", "none"); %> @@ -112,14 +115,19 @@ String compact = conf.get("hbase.regionserver.thrift.compact", "false"); Thrift RPC engine implementation type chosen by this Thrift server - Compact Protocol + Protocol <%= compact %> - Thrift RPC engine uses compact protocol + Thrift RPC engine protocol type - Framed Transport + Transport <%= framed %> - Thrift RPC engine uses framed transport + Thrift RPC engine transport type + + + Quality Of Protection + <%= qop %> + QOP settings for SASL From af3f37d4172e8844a904188a66dbaaeb282a5a15 Mon Sep 17 00:00:00 2001 From: Beata Sudi Date: Thu, 28 Nov 2019 11:02:17 +0100 Subject: [PATCH 2/5] HBASE-18382 fixing commit after PR comments --- .../main/resources/hbase-webapps/thrift/thrift.jsp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp index 5e723fdef401..2573269f7064 100644 --- a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp +++ b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp @@ -31,11 +31,8 @@ String serverType = (String)getServletContext().getAttribute("hbase.thrift.serve long startcode = conf.getLong("startcode", System.currentTimeMillis()); String listenPort = conf.get("hbase.regionserver.thrift.port", "9090"); ImplType implType = ImplType.getServerImpl(conf); -String framed = (implType.isAlwaysFramed() - ? "true" : conf.get("hbase.regionserver.thrift.framed", "false")) - .equals("true") ? "Framed": "Standard"; -String compact = conf.get("hbase.regionserver.thrift.compact", "false") - .equals("true") ? "Compact" : "Binary"; +String framed = (implType.isAlwaysFramed() || conf.getBoolean("hbase.regionserver.thrift.framed", false)) ? "Framed" : "Standard"; +String protocol = conf.getBoolean("hbase.regionserver.thrift.compact", false) ? "Compact" : "Binary"; String qop = conf.get("hbase.thrift.security.qop", "none"); %> @@ -116,7 +113,7 @@ String qop = conf.get("hbase.thrift.security.qop", "none"); Protocol - <%= compact %> + <%= protocol %> Thrift RPC engine protocol type @@ -127,7 +124,7 @@ String qop = conf.get("hbase.thrift.security.qop", "none"); Quality Of Protection <%= qop %> - QOP settings for SASL + QOP settings for SASL Thrift Server Type From b9e371d30ef2e1872a32950b97da21067c40ae02 Mon Sep 17 00:00:00 2001 From: Beata Sudi Date: Tue, 3 Dec 2019 10:08:32 +0100 Subject: [PATCH 3/5] HBASE-18382 fixing commit according to PR comments --- .../resources/hbase-webapps/thrift/thrift.jsp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp index 2573269f7064..866de1ecf1a1 100644 --- a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp +++ b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp @@ -31,9 +31,15 @@ String serverType = (String)getServletContext().getAttribute("hbase.thrift.serve long startcode = conf.getLong("startcode", System.currentTimeMillis()); String listenPort = conf.get("hbase.regionserver.thrift.port", "9090"); ImplType implType = ImplType.getServerImpl(conf); +<<<<<<< HEAD String framed = (implType.isAlwaysFramed() || conf.getBoolean("hbase.regionserver.thrift.framed", false)) ? "Framed" : "Standard"; String protocol = conf.getBoolean("hbase.regionserver.thrift.compact", false) ? "Compact" : "Binary"; String qop = conf.get("hbase.thrift.security.qop", "none"); +======= +String transport = implType.isAlwaysFramed() ||conf.getBoolean("hbase.regionserver.thrift.framed", false) ? "Framed" : "Standard"; +String protocol = conf.getBoolean("hbase.regionserver.thrift.compact", false) ? "Compact" : "Binary"; +String qop = conf.get("hbase.thrift.security.qop", "None"); +>>>>>>> 45fc8dc5a3... HBASE-18382 fixing commit according to PR comments %> @@ -118,19 +124,19 @@ String qop = conf.get("hbase.thrift.security.qop", "none"); Transport - <%= framed %> + <%= transport %> Thrift RPC engine transport type - - Quality Of Protection - <%= qop %> - QOP settings for SASL - Thrift Server Type <%= serverType %> The type of this Thrift server + + Quality of Protection + <%= qop %> + QOP Settings for SASL + From 7f2dde47dee6fe827a9b1b4ce5587a76cf905e4e Mon Sep 17 00:00:00 2001 From: Beata Sudi Date: Tue, 3 Dec 2019 11:12:28 +0100 Subject: [PATCH 4/5] HBASE-18382 fix --- .../src/main/resources/hbase-webapps/thrift/thrift.jsp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp index 866de1ecf1a1..c23b3dccdfb9 100644 --- a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp +++ b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp @@ -31,15 +31,11 @@ String serverType = (String)getServletContext().getAttribute("hbase.thrift.serve long startcode = conf.getLong("startcode", System.currentTimeMillis()); String listenPort = conf.get("hbase.regionserver.thrift.port", "9090"); ImplType implType = ImplType.getServerImpl(conf); -<<<<<<< HEAD -String framed = (implType.isAlwaysFramed() || conf.getBoolean("hbase.regionserver.thrift.framed", false)) ? "Framed" : "Standard"; -String protocol = conf.getBoolean("hbase.regionserver.thrift.compact", false) ? "Compact" : "Binary"; -String qop = conf.get("hbase.thrift.security.qop", "none"); -======= + String transport = implType.isAlwaysFramed() ||conf.getBoolean("hbase.regionserver.thrift.framed", false) ? "Framed" : "Standard"; String protocol = conf.getBoolean("hbase.regionserver.thrift.compact", false) ? "Compact" : "Binary"; String qop = conf.get("hbase.thrift.security.qop", "None"); ->>>>>>> 45fc8dc5a3... HBASE-18382 fixing commit according to PR comments + %> From cb5e09c564f6ea6e45c7173b8750d806a084a0bc Mon Sep 17 00:00:00 2001 From: Beata Sudi Date: Mon, 9 Dec 2019 09:28:11 +0100 Subject: [PATCH 5/5] fixing nits --- .../resources/hbase-webapps/thrift/thrift.jsp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp index c23b3dccdfb9..1763f67ac778 100644 --- a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp +++ b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp @@ -32,8 +32,11 @@ long startcode = conf.getLong("startcode", System.currentTimeMillis()); String listenPort = conf.get("hbase.regionserver.thrift.port", "9090"); ImplType implType = ImplType.getServerImpl(conf); -String transport = implType.isAlwaysFramed() ||conf.getBoolean("hbase.regionserver.thrift.framed", false) ? "Framed" : "Standard"; -String protocol = conf.getBoolean("hbase.regionserver.thrift.compact", false) ? "Compact" : "Binary"; +String transport = + (implType.isAlwaysFramed() || + conf.getBoolean("hbase.regionserver.thrift.framed", false)) ? "Framed" : "Standard"; +String protocol = + conf.getBoolean("hbase.regionserver.thrift.compact", false) ? "Compact" : "Binary"; String qop = conf.get("hbase.thrift.security.qop", "None"); %> @@ -55,12 +58,15 @@ String qop = conf.get("hbase.thrift.security.qop", "None");