001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.apache.hadoop.hbase.rest;
020
021import org.apache.yetus.audience.InterfaceAudience;
022
023/**
024 * Common constants for org.apache.hadoop.hbase.rest
025 */
026@InterfaceAudience.Public
027public interface Constants {
028  // All constants in a public interface are 'public static final'
029
030  String VERSION_STRING = "0.0.3";
031
032  int DEFAULT_MAX_AGE = 60 * 60 * 4;  // 4 hours
033
034  int DEFAULT_LISTEN_PORT = 8080;
035
036  String MIMETYPE_TEXT = "text/plain";
037  String MIMETYPE_HTML = "text/html";
038  String MIMETYPE_XML = "text/xml";
039  String MIMETYPE_BINARY = "application/octet-stream";
040  String MIMETYPE_PROTOBUF = "application/x-protobuf";
041  String MIMETYPE_PROTOBUF_IETF = "application/protobuf";
042  String MIMETYPE_JSON = "application/json";
043
044  String CRLF = "\r\n";
045
046  String REST_KEYTAB_FILE = "hbase.rest.keytab.file";
047  String REST_KERBEROS_PRINCIPAL = "hbase.rest.kerberos.principal";
048  String REST_AUTHENTICATION_TYPE = "hbase.rest.authentication.type";
049  String REST_AUTHENTICATION_PRINCIPAL = "hbase.rest.authentication.kerberos.principal";
050
051  String REST_SSL_ENABLED = "hbase.rest.ssl.enabled";
052  String REST_SSL_KEYSTORE_STORE = "hbase.rest.ssl.keystore.store";
053  String REST_SSL_KEYSTORE_PASSWORD = "hbase.rest.ssl.keystore.password";
054  String REST_SSL_KEYSTORE_KEYPASSWORD = "hbase.rest.ssl.keystore.keypassword";
055  String REST_SSL_EXCLUDE_CIPHER_SUITES = "hbase.rest.ssl.exclude.cipher.suites";
056  String REST_SSL_INCLUDE_CIPHER_SUITES = "hbase.rest.ssl.include.cipher.suites";
057  String REST_SSL_EXCLUDE_PROTOCOLS = "hbase.rest.ssl.exclude.protocols";
058  String REST_SSL_INCLUDE_PROTOCOLS = "hbase.rest.ssl.include.protocols";
059
060  String REST_THREAD_POOL_THREADS_MAX = "hbase.rest.threads.max";
061  String REST_THREAD_POOL_THREADS_MIN = "hbase.rest.threads.min";
062  String REST_THREAD_POOL_TASK_QUEUE_SIZE = "hbase.rest.task.queue.size";
063  String REST_THREAD_POOL_THREAD_IDLE_TIMEOUT = "hbase.rest.thread.idle.timeout";
064  String REST_CONNECTOR_ACCEPT_QUEUE_SIZE = "hbase.rest.connector.accept.queue.size";
065
066  String REST_DNS_NAMESERVER = "hbase.rest.dns.nameserver";
067  String REST_DNS_INTERFACE = "hbase.rest.dns.interface";
068
069  String FILTER_CLASSES = "hbase.rest.filter.classes";
070  String SCAN_START_ROW = "startrow";
071  String SCAN_END_ROW = "endrow";
072  String SCAN_COLUMN = "column";
073  String SCAN_START_TIME = "starttime";
074  String SCAN_END_TIME = "endtime";
075  String SCAN_MAX_VERSIONS = "maxversions";
076  String SCAN_BATCH_SIZE = "batchsize";
077  String SCAN_LIMIT = "limit";
078  String SCAN_FETCH_SIZE = "hbase.rest.scan.fetchsize";
079  String SCAN_FILTER = "filter";
080  String SCAN_REVERSED = "reversed";
081  String SCAN_CACHE_BLOCKS = "cacheblocks";
082  String CUSTOM_FILTERS = "hbase.rest.custom.filters"; 
083
084  String ROW_KEYS_PARAM_NAME = "row";
085  /** If this query parameter is present when processing row or scanner resources,
086      it disables server side block caching */
087  String NOCACHE_PARAM_NAME = "nocache";
088}