phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [1/4] phoenix git commit: PHOENIX-4672 Align the kerberos principal config keys
Date Tue, 10 Apr 2018 19:12:38 GMT
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 83038873a -> 97954332d
  refs/heads/4.x-HBase-1.3 768bff97e -> c4afcb2c8
  refs/heads/5.x-HBase-2.0 e35b18d3a -> 4d94f2f7d
  refs/heads/master ed6366161 -> 2e6dc818d


PHOENIX-4672 Align the kerberos principal config keys

Fix the configuration keys in a manner that won't break users
who are using the 'old' name.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/2e6dc818
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/2e6dc818
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/2e6dc818

Branch: refs/heads/master
Commit: 2e6dc818d74b9b0aade96ca9f85f30abe8b9e42e
Parents: ed63661
Author: Josh Elser <elserj@apache.org>
Authored: Tue Apr 10 14:08:57 2018 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Tue Apr 10 14:28:51 2018 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/phoenix/query/QueryServices.java    | 3 ++-
 .../java/org/apache/phoenix/queryserver/server/QueryServer.java  | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2e6dc818/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java
index 43b9e5a..21f043c 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java
@@ -237,7 +237,8 @@ public interface QueryServices extends SQLCloseable {
     public static final String QUERY_SERVER_KEYTAB_FILENAME_ATTRIB = "phoenix.queryserver.keytab.file";
     public static final String QUERY_SERVER_HTTP_KEYTAB_FILENAME_ATTRIB = "phoenix.queryserver.http.keytab.file";
     public static final String QUERY_SERVER_KERBEROS_PRINCIPAL_ATTRIB = "phoenix.queryserver.kerberos.principal";
-    public static final String QUERY_SERVER_KERBEROS_HTTP_PRINCIPAL_ATTRIB = "phoenix.queryserver.kerberos.http.principal";
+    public static final String QUERY_SERVER_KERBEROS_HTTP_PRINCIPAL_ATTRIB_LEGACY = "phoenix.queryserver.kerberos.http.principal";
+    public static final String QUERY_SERVER_KERBEROS_HTTP_PRINCIPAL_ATTRIB = "phoenix.queryserver.http.kerberos.principal";
     public static final String QUERY_SERVER_DNS_NAMESERVER_ATTRIB = "phoenix.queryserver.dns.nameserver";
     public static final String QUERY_SERVER_DNS_INTERFACE_ATTRIB = "phoenix.queryserver.dns.interface";
     public static final String QUERY_SERVER_HBASE_SECURITY_CONF_ATTRIB = "hbase.security.authentication";

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2e6dc818/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
----------------------------------------------------------------------
diff --git a/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
b/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
index 6b1fcfe..8436086 100644
--- a/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
+++ b/phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
@@ -246,6 +246,10 @@ public final class QueryServer extends Configured implements Tool, Runnable
{
         File keytab = new File(keytabPath);
         String httpKeytabPath = getConf().get(QueryServices.QUERY_SERVER_HTTP_KEYTAB_FILENAME_ATTRIB,
null);
         String httpPrincipal = getConf().get(QueryServices.QUERY_SERVER_KERBEROS_HTTP_PRINCIPAL_ATTRIB,
null);
+        // Backwards compat for a configuration key change
+        if (httpPrincipal == null) {
+          httpPrincipal = getConf().get(QueryServices.QUERY_SERVER_KERBEROS_HTTP_PRINCIPAL_ATTRIB_LEGACY,
null);
+        }
         File httpKeytab = null;
         if (null != httpKeytabPath)
           httpKeytab = new File(httpKeytabPath);


Mime
View raw message