org.apache.hadoop.hbase.classification.InterfaceAudience



Project apache/hbase in file ...ache.hadoop.hbase.security.HBaseKerberosUtils.java (2015-03-15)
@@ -17,19 +17,18 @@
  */
 package org.apache.hadoop.hbase.security;
 
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.CommonConfigurationKeys;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 
 import com.google.common.base.Strings;
 
-@InterfaceAudience.Private
-class HBaseKerberosUtils {
+public class HBaseKerberosUtils {
   public static final String KRB_PRINCIPAL = "hbase.regionserver.kerberos.principal";
+  public static final String MASTER_KRB_PRINCIPAL = "hbase.master.kerberos.principal";
   public static final String KRB_KEYTAB_FILE = "hbase.regionserver.keytab.file";
 
-  static boolean isKerberosPropertySetted() {
+  public static boolean isKerberosPropertySetted() {
     String krbPrincipal = System.getProperty(KRB_PRINCIPAL);
     String krbKeytab = System.getProperty(KRB_KEYTAB_FILE);
     if (Strings.isNullOrEmpty(krbPrincipal) || Strings.isNullOrEmpty(krbKeytab)) {
@@ -38,27 +37,27 @@ class HBaseKerberosUtils {
     return true;
   }
 
-  static void setPrincipalForTesting(String principal) {
+  public static void setPrincipalForTesting(String principal) {
     setSystemProperty(KRB_PRINCIPAL, principal);
   }
 
-  static void setKeytabFileForTesting(String keytabFile) {
+  public static void setKeytabFileForTesting(String keytabFile) {
     setSystemProperty(KRB_KEYTAB_FILE, keytabFile);
   }
 
-  static void setSystemProperty(String propertyName, String propertyValue) {
+  public static void setSystemProperty(String propertyName, String propertyValue) {
     System.setProperty(propertyName, propertyValue);
   }
 
-  static String getKeytabFileForTesting() {
+  public static String getKeytabFileForTesting() {
     return System.getProperty(KRB_KEYTAB_FILE);
   }
 
-  static String getPrincipalForTesting() {
+  public static String getPrincipalForTesting() {
     return System.getProperty(KRB_PRINCIPAL);
   }
 
-  static Configuration getConfigurationWoPrincipal() {
+  public static Configuration getConfigurationWoPrincipal() {
     Configuration conf = HBaseConfiguration.create();
     conf.set(CommonConfigurationKeys.HADOOP_SECURITY_AUTHENTICATION, "kerberos");
     conf.set("hbase.security.authentication", "kerberos");
@@ -66,13 +65,18 @@ class HBaseKerberosUtils {
     return conf;
   }
 
-  static Configuration getSecuredConfiguration() {
+  public static Configuration getSecuredConfiguration() {
     Configuration conf = HBaseConfiguration.create();
+    setSecuredConfiguration(conf);
+    return conf;
+  }
+
+  public static void setSecuredConfiguration(Configuration conf) {
     conf.set(CommonConfigurationKeys.HADOOP_SECURITY_AUTHENTICATION, "kerberos");
     conf.set("hbase.security.authentication", "kerberos");
     conf.setBoolean("hbase.security.authorization", true);
     conf.set(KRB_KEYTAB_FILE, System.getProperty(KRB_KEYTAB_FILE));
     conf.set(KRB_PRINCIPAL, System.getProperty(KRB_PRINCIPAL));
-    return conf;
+    conf.set(MASTER_KRB_PRINCIPAL, System.getProperty(KRB_PRINCIPAL));
   }
 }
Project apache/hbase in file ...c.main.java.org.apache.hadoop.hbase.Stoppable.java (2014-11-11)
@@ -1,38 +0,0 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase;
-
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
-
-/**
- * Implementers are Stoppable.
- */
-@InterfaceAudience.Private
-public interface Stoppable {
-  /**
-   * Stop this service.
-   * @param why Why we're stopping.
-   */
-  void stop(String why);
-
-  /**
-   * @return True if {@link #stop(String)} has been closed.
-   */
-  boolean isStopped();
-}
Project apache/hbase in file ...oop.hbase.exceptions.DeserializationException.java (2014-12-08)
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase.exceptions;
-
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
-
-/**
- * Failed deserialization.
- */
-@InterfaceAudience.Private
-@SuppressWarnings("serial")
-public class DeserializationException extends HBaseException {
-  public DeserializationException() {
-    super();
-  }
-
-  public DeserializationException(final String message) {
-    super(message);
-  }
-
-  public DeserializationException(final String message, final Throwable t) {
-    super(message, t);
-  }
-
-  public DeserializationException(final Throwable t) {
-    super(t);
-  }
-}
Project apache/hbase in file ...apache.hadoop.hbase.exceptions.HBaseException.java (2014-12-08)
@@ -1,44 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hbase.exceptions;
-
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
-
-/**
- * Base checked exception in HBase.
- * @see <a href="https://issues.apache.org/jira/browse/HBASE-5796">HBASE-5796</a>
- */
-@SuppressWarnings("serial")
-@InterfaceAudience.Private
-public class HBaseException extends Exception {
-  public HBaseException() {
-    super();
-  }
-
-  public HBaseException(final String message) {
-    super(message);
-  }
-
-  public HBaseException(final String message, final Throwable t) {
-    super(message, t);
-  }
-
-  public HBaseException(final Throwable t) {
-    super(t);
-  }
-}
Project apache/hbase in file ...n.java.org.apache.hadoop.hbase.rest.Constants.java (2014-10-07)
@@ -1,78 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hbase.rest;
-
-import org.apache.hadoop.hbase.classification.InterfaceAudience;
-import org.apache.hadoop.hbase.classification.InterfaceStability;
-
-/**
- * Common constants for org.apache.hadoop.hbase.rest
- */
-@InterfaceAudience.Public
-@InterfaceStability.Stable
-public interface Constants {
-  // All constants in a public interface are 'public static final'
-
-  String VERSION_STRING = "0.0.3";
-
-  int DEFAULT_MAX_AGE = 60 * 60 * 4;  // 4 hours
-
-  int DEFAULT_LISTEN_PORT = 8080;
-
-  String MIMETYPE_TEXT = "text/plain";
-  String MIMETYPE_HTML = "text/html";
-  String MIMETYPE_XML = "text/xml";
-  String MIMETYPE_BINARY = "application/octet-stream";
-  String MIMETYPE_PROTOBUF = "application/x-protobuf";
-  String MIMETYPE_PROTOBUF_IETF = "application/protobuf";
-  String MIMETYPE_JSON = "application/json";
-
-  String CRLF = "\r\n";
-
-  String REST_KEYTAB_FILE = "hbase.rest.keytab.file";
-  String REST_KERBEROS_PRINCIPAL = "hbase.rest.kerberos.principal";
-  String REST_AUTHENTICATION_TYPE = "hbase.rest.authentication.type";
-  String REST_AUTHENTICATION_PRINCIPAL = "hbase.rest.authentication.kerberos.principal";
-
-  String REST_SSL_ENABLED = "hbase.rest.ssl.enabled";
-  String REST_SSL_KEYSTORE_STORE = "hbase.rest.ssl.keystore.store";
-  String REST_SSL_KEYSTORE_PASSWORD = "hbase.rest.ssl.keystore.password";
-  String REST_SSL_KEYSTORE_KEYPASSWORD = "hbase.rest.ssl.keystore.keypassword";
-
-  String REST_DNS_NAMESERVER = "hbase.rest.dns.nameserver";
-  String REST_DNS_INTERFACE = "hbase.rest.dns.interface";
-
-  String FILTER_CLASSES = "hbase.rest.filter.classes";
-  String SCAN_START_ROW = "startrow";
-  String SCAN_END_ROW = "endrow";
-  String SCAN_COLUMN = "column";
-  String SCAN_START_TIME = "starttime";
-  String SCAN_END_TIME = "endtime";
-  String SCAN_MAX_VERSIONS = "maxversions";
-  String SCAN_BATCH_SIZE = "batchsize";
-  String SCAN_LIMIT = "limit";
-  String SCAN_FETCH_SIZE = "hbase.rest.scan.fetchsize";
-  String SCAN_FILTER = "filter"; 
-  String CUSTOM_FILTERS = "hbase.rest.custom.filters"; 
-
-  String ROW_KEYS_PARAM_NAME = "row";
-  /** If this query parameter is present when processing row or scanner resources,
-      it disables server side block caching */
-  String NOCACHE_PARAM_NAME = "nocache";
-}