[ 
https://issues.apache.org/jira/browse/HBASE-10336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13878979#comment-13878979
 ] 

Haohui Mai commented on HBASE-10336:
------------------------------------

The following code has been deprecated:

{code}
+
+  static {
+    Configuration conf = new Configuration();
+    boolean sslEnabled = conf.getBoolean(
+            CommonConfigurationKeysPublic.HADOOP_SSL_ENABLED_KEY,
+            CommonConfigurationKeysPublic.HADOOP_SSL_ENABLED_DEFAULT);
+    policy = sslEnabled ? Policy.HTTPS_ONLY : Policy.HTTP_ONLY;
+  }
+
+  public static void setPolicy(Policy policy) {
+    HttpConfig.policy = policy;
+  }
+
+  public static boolean isSecure() {
+    return policy == Policy.HTTPS_ONLY;
+  }
+
+  public static String getSchemePrefix() {
+    return (isSecure()) ? "https://"; : "http://";;
+  }
+
+  public static String getScheme(Policy policy) {
+    return policy == Policy.HTTPS_ONLY ? "https://"; : "http://";;
+  }
{code}

{code}
+    /**
+     * Use setAppDir() instead.
+     */
+    @Deprecated
+    public Builder setName(String name){
+      this.name = name;
+      return this;
+    }
+
+    /**
+     * Use addEndpoint() instead.
+     */
+    @Deprecated
+    public Builder setBindAddress(String bindAddress){
+      this.bindAddress = bindAddress;
+      return this;
+    }
+
+    /**
+     * Use addEndpoint() instead.
+     */
+    @Deprecated
+    public Builder setPort(int port) {
+      this.port = port;
+      return this;
+    }
+    
{code}

And there are significant amount of code in {{HttpServer}} has been marked as 
deprecated. You might want to get rid of them as well.

> Remove deprecated usage of Hadoop HttpServer in InfoServer
> ----------------------------------------------------------
>
>                 Key: HBASE-10336
>                 URL: https://issues.apache.org/jira/browse/HBASE-10336
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.99.0
>            Reporter: Eric Charles
>            Assignee: Eric Charles
>         Attachments: HBASE-10336-1.patch, HBASE-10336-2.patch, 
> HBASE-10336-3.patch, HBASE-10336-4.patch, HBASE-10336-5.patch
>
>
> Recent changes in Hadoop HttpServer give NPE when running on hadoop 
> 3.0.0-SNAPSHOT. This way we use HttpServer is deprecated and will probably be 
> not fixed (see HDFS-5760). We'd better move to the new proposed builder 
> pattern, which means we can no more use inheritance to build our nice 
> InfoServer.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to