#include "util/webserver.h"
#include <boost/algorithm/string.hpp>
#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/mem_fn.hpp>
#include <boost/thread/locks.hpp>
#include <gutil/strings/substitute.h>
#include <map>
#include <fstream>
#include <stdio.h>
#include <signal.h>
#include <string>
#include <mustache/mustache.h>
#include <rapidjson/stringbuffer.h>
#include <rapidjson/prettywriter.h>
#include "common/logging.h"
#include "util/cpu-info.h"
#include "util/disk-info.h"
#include "util/mem-info.h"
#include "util/os-info.h"
#include "util/process-state-info.h"
#include "util/url-coding.h"
#include "util/debug-util.h"
#include "util/pretty-printer.h"
#include "util/stopwatch.h"
#include "rpc/thrift-util.h"
#include "common/names.h"
Go to the source code of this file.
|
| impala |
| This file contains type definitions that are used throughout the code base.
|
|
|
const char * | GetDefaultDocumentRoot () |
|
| DEFINE_int32 (webserver_port, 25000,"Port to start debug webserver on") |
|
| DEFINE_string (webserver_interface,"","Interface to start debug webserver on. If blank, webserver binds to 0.0.0.0") |
|
| DEFINE_string (webserver_doc_root, GetDefaultDocumentRoot(),"Files under <webserver_doc_root>/www are accessible via the debug webserver. ""Defaults to $IMPALA_HOME, or if $IMPALA_HOME is not set, disables the document ""root") |
|
| DEFINE_bool (enable_webserver_doc_root, true,"If true, webserver may serve static files from the webserver_doc_root") |
|
| DEFINE_string (webserver_certificate_file,"","The location of the debug webserver's SSL certificate file, in .pem format. If ""empty, webserver SSL support is not enabled") |
|
| DEFINE_string (webserver_authentication_domain,"","Domain used for debug webserver authentication") |
|
| DEFINE_string (webserver_password_file,"","(Optional) Location of .htpasswd file containing user names and hashed passwords for"" debug webserver authentication") |
|
string | impala::BuildHeaderString (ResponseCode response, ContentType content_type) |
|
DEFINE_bool |
( |
enable_webserver_doc_root |
, |
|
|
true |
, |
|
|
"If |
true, |
|
|
webserver may serve static files from the webserver_doc_root" |
|
|
) |
| |
DEFINE_int32 |
( |
webserver_port |
, |
|
|
25000 |
, |
|
|
"Port to start debug webserver on" |
|
|
) |
| |
DEFINE_string |
( |
webserver_interface |
, |
|
|
"" |
, |
|
|
"Interface to start debug webserver on. If |
blank, |
|
|
webserver binds to 0.0.0.0" |
|
|
) |
| |
DEFINE_string |
( |
webserver_doc_root |
, |
|
|
GetDefaultDocumentRoot() |
, |
|
|
"Files under <webserver_doc_root>/www are accessible via the debug webserver. ""Defaults to |
$IMPALA_HOME, |
|
|
or if $IMPALA_HOME is not |
set, |
|
|
disables the document""root" |
|
|
) |
| |
DEFINE_string |
( |
webserver_certificate_file |
, |
|
|
"" |
, |
|
|
"The location of the debug webserver's SSL certificate |
file, |
|
|
in.pem format.If"" |
empty, |
|
|
webserver SSL support is not enabled" |
|
|
) |
| |
DEFINE_string |
( |
webserver_authentication_domain |
, |
|
|
"" |
, |
|
|
"Domain used for debug webserver authentication" |
|
|
) |
| |
DEFINE_string |
( |
webserver_password_file |
, |
|
|
"" |
, |
|
|
"(Optional) Location of .htpasswd file containing user names and hashed passwords for"" debug webserver authentication" |
|
|
) |
| |
const char * GetDefaultDocumentRoot |
( |
| ) |
|
const char* COMMON_JSON_KEY = "__common__" |
|
static |
const char* DOC_FOLDER = "/www/" |
|
static |
const char* ERROR_KEY = "__error_msg__" |
|
static |
const uint32_t NOT_PROCESSED = 0 |
|
static |
const uint32_t PROCESSING_COMPLETE = 1 |
|
static |