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 */ 018package org.apache.hadoop.hbase.rest; 019 020import org.apache.yetus.audience.InterfaceAudience; 021 022/** 023 * Common constants for org.apache.hadoop.hbase.rest 024 */ 025@InterfaceAudience.Public 026public interface Constants { 027 // All constants in a public interface are 'public static final' 028 029 String VERSION_STRING = "0.0.3"; 030 031 int DEFAULT_MAX_AGE = 60 * 60 * 4; // 4 hours 032 033 int DEFAULT_LISTEN_PORT = 8080; 034 035 String MIMETYPE_TEXT = "text/plain"; 036 String MIMETYPE_HTML = "text/html"; 037 String MIMETYPE_XML = "text/xml"; 038 String MIMETYPE_BINARY = "application/octet-stream"; 039 String MIMETYPE_PROTOBUF = "application/x-protobuf"; 040 String MIMETYPE_PROTOBUF_IETF = "application/protobuf"; 041 String MIMETYPE_JSON = "application/json"; 042 043 String CRLF = "\r\n"; 044 045 String REST_KEYTAB_FILE = "hbase.rest.keytab.file"; 046 String REST_KERBEROS_PRINCIPAL = "hbase.rest.kerberos.principal"; 047 String REST_AUTHENTICATION_TYPE = "hbase.rest.authentication.type"; 048 String REST_AUTHENTICATION_PRINCIPAL = "hbase.rest.authentication.kerberos.principal"; 049 050 String REST_SSL_ENABLED = "hbase.rest.ssl.enabled"; 051 String REST_SSL_KEYSTORE_STORE = "hbase.rest.ssl.keystore.store"; 052 String REST_SSL_KEYSTORE_PASSWORD = "hbase.rest.ssl.keystore.password"; 053 String REST_SSL_KEYSTORE_TYPE = "hbase.rest.ssl.keystore.type"; 054 String REST_SSL_TRUSTSTORE_STORE = "hbase.rest.ssl.truststore.store"; 055 String REST_SSL_TRUSTSTORE_PASSWORD = "hbase.rest.ssl.truststore.password"; 056 String REST_SSL_TRUSTSTORE_TYPE = "hbase.rest.ssl.truststore.type"; 057 String REST_SSL_KEYSTORE_KEYPASSWORD = "hbase.rest.ssl.keystore.keypassword"; 058 String REST_SSL_EXCLUDE_CIPHER_SUITES = "hbase.rest.ssl.exclude.cipher.suites"; 059 String REST_SSL_INCLUDE_CIPHER_SUITES = "hbase.rest.ssl.include.cipher.suites"; 060 String REST_SSL_EXCLUDE_PROTOCOLS = "hbase.rest.ssl.exclude.protocols"; 061 String REST_SSL_INCLUDE_PROTOCOLS = "hbase.rest.ssl.include.protocols"; 062 063 String REST_THREAD_POOL_THREADS_MAX = "hbase.rest.threads.max"; 064 String REST_THREAD_POOL_THREADS_MIN = "hbase.rest.threads.min"; 065 String REST_THREAD_POOL_TASK_QUEUE_SIZE = "hbase.rest.task.queue.size"; 066 String REST_THREAD_POOL_THREAD_IDLE_TIMEOUT = "hbase.rest.thread.idle.timeout"; 067 String REST_CONNECTOR_ACCEPT_QUEUE_SIZE = "hbase.rest.connector.accept.queue.size"; 068 069 String REST_DNS_NAMESERVER = "hbase.rest.dns.nameserver"; 070 String REST_DNS_INTERFACE = "hbase.rest.dns.interface"; 071 072 String FILTER_CLASSES = "hbase.rest.filter.classes"; 073 String SCAN_START_ROW = "startrow"; 074 String SCAN_END_ROW = "endrow"; 075 String SCAN_COLUMN = "column"; 076 String SCAN_START_TIME = "starttime"; 077 String SCAN_END_TIME = "endtime"; 078 String SCAN_MAX_VERSIONS = "maxversions"; 079 String SCAN_BATCH_SIZE = "batchsize"; 080 String SCAN_LIMIT = "limit"; 081 String SCAN_FETCH_SIZE = "hbase.rest.scan.fetchsize"; 082 String SCAN_FILTER = "filter"; 083 String SCAN_REVERSED = "reversed"; 084 String SCAN_CACHE_BLOCKS = "cacheblocks"; 085 String CUSTOM_FILTERS = "hbase.rest.custom.filters"; 086 087 String ROW_KEYS_PARAM_NAME = "row"; 088 /** 089 * If this query parameter is present when processing row or scanner resources, it disables server 090 * side block caching 091 */ 092 String NOCACHE_PARAM_NAME = "nocache"; 093 094 /** Configuration parameter to set rest client connection timeout */ 095 String REST_CLIENT_CONN_TIMEOUT = "hbase.rest.client.conn.timeout"; 096 int DEFAULT_REST_CLIENT_CONN_TIMEOUT = 2 * 1000; 097 098 /** Configuration parameter to set rest client socket timeout */ 099 String REST_CLIENT_SOCKET_TIMEOUT = "hbase.rest.client.socket.timeout"; 100 int DEFAULT_REST_CLIENT_SOCKET_TIMEOUT = 30 * 1000; 101}