View Javadoc

1   /**
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  package org.apache.hadoop.hbase.rest;
20  
21  import org.apache.hadoop.hbase.classification.InterfaceAudience;
22  import org.apache.hadoop.hbase.classification.InterfaceStability;
23  
24  /**
25   * Common constants for org.apache.hadoop.hbase.rest
26   */
27  @InterfaceAudience.Public
28  @InterfaceStability.Stable
29  public interface Constants {
30    // All constants in a public interface are 'public static final'
31  
32    String VERSION_STRING = "0.0.3";
33  
34    int DEFAULT_MAX_AGE = 60 * 60 * 4;  // 4 hours
35  
36    int DEFAULT_LISTEN_PORT = 8080;
37  
38    String MIMETYPE_TEXT = "text/plain";
39    String MIMETYPE_HTML = "text/html";
40    String MIMETYPE_XML = "text/xml";
41    String MIMETYPE_BINARY = "application/octet-stream";
42    String MIMETYPE_PROTOBUF = "application/x-protobuf";
43    String MIMETYPE_PROTOBUF_IETF = "application/protobuf";
44    String MIMETYPE_JSON = "application/json";
45  
46    String CRLF = "\r\n";
47  
48    String REST_KEYTAB_FILE = "hbase.rest.keytab.file";
49    String REST_KERBEROS_PRINCIPAL = "hbase.rest.kerberos.principal";
50    String REST_AUTHENTICATION_TYPE = "hbase.rest.authentication.type";
51    String REST_AUTHENTICATION_PRINCIPAL = "hbase.rest.authentication.kerberos.principal";
52  
53    String REST_SSL_ENABLED = "hbase.rest.ssl.enabled";
54    String REST_SSL_KEYSTORE_STORE = "hbase.rest.ssl.keystore.store";
55    String REST_SSL_KEYSTORE_PASSWORD = "hbase.rest.ssl.keystore.password";
56    String REST_SSL_KEYSTORE_KEYPASSWORD = "hbase.rest.ssl.keystore.keypassword";
57  
58    String REST_DNS_NAMESERVER = "hbase.rest.dns.nameserver";
59    String REST_DNS_INTERFACE = "hbase.rest.dns.interface";
60  
61    String FILTER_CLASSES = "hbase.rest.filter.classes";
62    String SCAN_START_ROW = "startrow";
63    String SCAN_END_ROW = "endrow";
64    String SCAN_COLUMN = "column";
65    String SCAN_START_TIME = "starttime";
66    String SCAN_END_TIME = "endtime";
67    String SCAN_MAX_VERSIONS = "maxversions";
68    String SCAN_BATCH_SIZE = "batchsize";
69    String SCAN_LIMIT = "limit";
70    String SCAN_FETCH_SIZE = "hbase.rest.scan.fetchsize";
71    String SCAN_FILTER = "filter"; 
72    String CUSTOM_FILTERS = "hbase.rest.custom.filters"; 
73  
74    String ROW_KEYS_PARAM_NAME = "row";
75    /** If this query parameter is present when processing row or scanner resources,
76        it disables server side block caching */
77    String NOCACHE_PARAM_NAME = "nocache";
78  }