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_TYPE = "hbase.rest.ssl.keystore.type";
055  String REST_SSL_TRUSTSTORE_STORE = "hbase.rest.ssl.truststore.store";
056  String REST_SSL_TRUSTSTORE_PASSWORD = "hbase.rest.ssl.truststore.password";
057  String REST_SSL_TRUSTSTORE_TYPE = "hbase.rest.ssl.truststore.type";
058  String REST_SSL_KEYSTORE_KEYPASSWORD = "hbase.rest.ssl.keystore.keypassword";
059  String REST_SSL_EXCLUDE_CIPHER_SUITES = "hbase.rest.ssl.exclude.cipher.suites";
060  String REST_SSL_INCLUDE_CIPHER_SUITES = "hbase.rest.ssl.include.cipher.suites";
061  String REST_SSL_EXCLUDE_PROTOCOLS = "hbase.rest.ssl.exclude.protocols";
062  String REST_SSL_INCLUDE_PROTOCOLS = "hbase.rest.ssl.include.protocols";
063
064  String REST_THREAD_POOL_THREADS_MAX = "hbase.rest.threads.max";
065  String REST_THREAD_POOL_THREADS_MIN = "hbase.rest.threads.min";
066  String REST_THREAD_POOL_TASK_QUEUE_SIZE = "hbase.rest.task.queue.size";
067  String REST_THREAD_POOL_THREAD_IDLE_TIMEOUT = "hbase.rest.thread.idle.timeout";
068  String REST_CONNECTOR_ACCEPT_QUEUE_SIZE = "hbase.rest.connector.accept.queue.size";
069
070  String REST_DNS_NAMESERVER = "hbase.rest.dns.nameserver";
071  String REST_DNS_INTERFACE = "hbase.rest.dns.interface";
072
073  String FILTER_CLASSES = "hbase.rest.filter.classes";
074  String SCAN_START_ROW = "startrow";
075  String SCAN_END_ROW = "endrow";
076  String SCAN_COLUMN = "column";
077  String SCAN_START_TIME = "starttime";
078  String SCAN_END_TIME = "endtime";
079  String SCAN_MAX_VERSIONS = "maxversions";
080  String SCAN_BATCH_SIZE = "batchsize";
081  String SCAN_LIMIT = "limit";
082  String SCAN_FETCH_SIZE = "hbase.rest.scan.fetchsize";
083  String SCAN_FILTER = "filter";
084  String SCAN_REVERSED = "reversed";
085  String SCAN_CACHE_BLOCKS = "cacheblocks";
086  String CUSTOM_FILTERS = "hbase.rest.custom.filters"; 
087
088  String ROW_KEYS_PARAM_NAME = "row";
089  /** If this query parameter is present when processing row or scanner resources,
090      it disables server side block caching */
091  String NOCACHE_PARAM_NAME = "nocache";
092
093  /** Configuration parameter to set rest client connection timeout */
094  String REST_CLIENT_CONN_TIMEOUT = "hbase.rest.client.conn.timeout";
095  int DEFAULT_REST_CLIENT_CONN_TIMEOUT = 2 * 1000;
096
097  /** Configuration parameter to set rest client socket timeout */
098  String REST_CLIENT_SOCKET_TIMEOUT = "hbase.rest.client.socket.timeout";
099  int DEFAULT_REST_CLIENT_SOCKET_TIMEOUT = 30 * 1000;
100}