├── python ├── LICENSE.txt ├── version.txt ├── setup.cfg ├── requirements.txt ├── pytest.ini ├── MANIFEST.in ├── kudu │ ├── __init__.pxd │ ├── tests │ │ └── __init__.py │ ├── errors.pxd │ └── config.pxi.in └── requirements_dev.txt ├── version.txt ├── examples ├── python │ └── graphite-kudu │ │ ├── setup.cfg │ │ ├── kudu │ │ └── __init__.py │ │ └── README.adoc ├── java │ └── .gitignore ├── README.md └── scala │ └── sbt-int-test-example │ ├── project │ ├── build.properties │ └── plugins.sbt │ └── src │ └── it │ └── resources │ └── logback.xml ├── www ├── key.png ├── logo.png ├── favicon.ico ├── bootstrap │ └── fonts │ │ └── glyphicons-halflings-regular.woff ├── swagger │ └── kudu-custom.css ├── index.html ├── tablet-consensus-status.mustache ├── home.mustache ├── log-anchors.mustache ├── tablet-rowsetlayout-svg.mustache ├── api │ └── docs.mustache ├── metrics.html ├── logs.mustache └── dashboards.mustache ├── src └── kudu │ ├── tools │ ├── testdata │ │ └── bad-diagnostics-log.txt │ └── color.h │ ├── gutil │ ├── utf │ │ ├── utfdef.h │ │ └── LICENSE │ ├── int128.cc │ ├── strings │ │ └── charset.cc │ ├── hash │ │ └── hash128to64.h │ ├── basictypes.h │ └── arm_instruction_set_select.h │ ├── util │ ├── debug │ │ ├── trace_event_impl_constants.cc │ │ ├── unwind_safeness.h │ │ └── trace_event_memory.h │ ├── prometheus_writer.cc │ ├── test_util_prod.cc │ ├── hash.proto │ ├── proto_container_test.proto │ ├── compression │ │ └── compression.proto │ ├── web_callback_registry.cc │ ├── prometheus_writer.h │ ├── file_cache_metrics.h │ ├── block_cache_metrics.h │ ├── proto_container_test2.proto │ ├── user.h │ ├── alignment.h │ ├── pb_util_test.proto │ ├── cow_object.cc │ ├── malloc.h │ ├── malloc.cc │ ├── errno.h │ ├── hexdump.h │ ├── ttl_cache_metrics.h │ ├── memory │ │ └── overwrite.h │ ├── version_info.proto │ ├── proto_container_test3.proto │ ├── test_util_prod.h │ ├── int128_util.h │ ├── init.h │ └── status_callback.cc │ ├── scripts │ ├── first_argument.sh │ ├── parse_real_out.sh │ ├── stop_kudu.sh │ └── si_vec.R │ ├── rpc │ ├── response_callback.h │ ├── rtest_diff_package.proto │ └── remote_user.cc │ ├── security │ └── kerberos_util.h │ ├── kserver │ ├── CMakeLists.txt │ └── kserver_options.h │ ├── thrift │ └── CMakeLists.txt │ ├── client │ ├── hash.h │ ├── symbols.map │ ├── clientConfig.cmake.in │ ├── write_op-internal.h │ ├── error-internal.cc │ ├── hash-internal.h │ ├── row_result.h │ ├── replica-internal.cc │ ├── tablet-internal.h │ ├── tablet_server-internal.cc │ ├── replica-internal.h │ └── tablet-internal.cc │ ├── server │ ├── pprof_path_handlers.h │ ├── rpcz-path-handler.h │ ├── tracing_path_handlers.h │ └── webui_util.h │ ├── master │ ├── master_runner.h │ └── table_locations_cache_metrics.h │ ├── tserver │ └── tablet_server_runner.h │ ├── common │ ├── key_range.cc │ └── id_mapping.cc │ ├── codegen │ ├── jit_wrapper.cc │ └── precompiled.ll.h │ ├── consensus │ └── opid.proto │ └── experiments │ └── CMakeLists.txt ├── java ├── kudu-client │ └── src │ │ ├── test │ │ └── resources │ │ │ ├── assign-location.py │ │ │ ├── test-key-and-cert.jks │ │ │ └── log4j2.properties │ │ └── main │ │ └── java │ │ └── org │ │ └── apache │ │ └── kudu │ │ └── client │ │ ├── RangePartitionBound.java │ │ ├── DeleteTableResponse.java │ │ ├── RecallDeletedTableResponse.java │ │ ├── Upsert.java │ │ ├── Insert.java │ │ ├── AbortTransactionResponse.java │ │ ├── CommitTransactionResponse.java │ │ └── Update.java ├── kudu-spark │ └── src │ │ ├── main │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── org.apache.spark.sql.sources.DataSourceRegister │ │ └── test │ │ └── resources │ │ └── log4j2.properties ├── gradle │ ├── wrapper │ │ └── gradle-wrapper.properties │ └── benchmarks.gradle ├── kudu-spark-tools │ └── src │ │ └── test │ │ └── resources │ │ ├── TestImportExportFiles.csv │ │ └── log4j2.properties ├── .scalafmt.conf ├── kudu-test-utils │ └── src │ │ └── test │ │ └── resources │ │ ├── fake-kudu-binary │ │ └── apache-kudu-1.9.0-SNAPSHOT │ │ │ └── bin │ │ │ └── kudu-tserver │ │ └── log4j2.properties ├── kudu-jepsen │ ├── src │ │ └── test │ │ │ └── resources │ │ │ ├── ntp.conf.server │ │ │ ├── kudu.flags │ │ │ └── ntp.conf.common │ └── .gitignore ├── config │ └── checkstyle │ │ └── suppressions.xml ├── .gitignore ├── kudu-backup-tools │ └── src │ │ ├── main │ │ └── resources │ │ │ └── log4j2.properties │ │ └── test │ │ └── resources │ │ └── log4j2.properties ├── kudu-subprocess │ └── src │ │ ├── main │ │ ├── resources │ │ │ └── log4j2.properties │ │ └── java │ │ │ └── org │ │ │ └── apache │ │ │ └── kudu │ │ │ └── subprocess │ │ │ └── log │ │ │ └── LoggingTestMain.java │ │ └── test │ │ └── resources │ │ └── log4j2.properties ├── kudu-backup │ └── src │ │ └── test │ │ └── resources │ │ ├── log4j2.properties │ │ └── logback-test.xml ├── kudu-hive │ └── src │ │ └── test │ │ └── resources │ │ └── log4j2.properties ├── kudu-backup-common │ └── src │ │ └── test │ │ └── resources │ │ └── log4j2.properties ├── kudu-replication │ └── src │ │ └── test │ │ └── resources │ │ ├── log4j2.properties │ │ └── log4j2-test.properties └── settings.gradle ├── docs ├── whitepaper │ ├── ycsb-results.pdf │ ├── .gitignore │ └── ycsb-data │ │ └── log-to-tsv.pl ├── images │ ├── kudu-architecture-2.png │ ├── design-docs_transactions.png │ ├── hash-partitioning-example.png │ ├── range-partitioning-example.png │ ├── hash-hash-partitioning-example.png │ └── hash-range-partitioning-example.png ├── media-src │ ├── kudu-architecture-2.pdf │ ├── kudu-tablet-flush-6b.pdf │ └── README ├── support │ ├── doxygen │ │ └── client_api.footer.in │ └── scripts │ │ └── Gemfile ├── .gitignore └── metrics_reference.adoc ├── thirdparty ├── README.txt ├── patches │ ├── llvm-add-iwyu.patch │ ├── postgres-no-check-root.patch │ ├── boost-bootstrap.patch │ ├── ranger-fixscripts.patch │ ├── cmake-fix-macos-compilation.patch │ ├── crcutil-fix-macos-arm64-flags.patch │ ├── protobuf-inlined_string_field.patch │ ├── postgres-root-can-run-initdb.patch │ ├── glog-make-internals-visible.patch │ ├── llvm-fix-missing-include.patch │ ├── rapidjson-document-assignment-operator-00.patch │ ├── rapidjson-document-assignment-operator-01.patch │ ├── curl-custom-openssl-library.patch │ ├── llvm-ignore-flto-values.patch │ ├── breakpad-guid-creator.patch │ ├── breakpad-minidump-descriptor.patch │ ├── gumbo-parser-autoconf-263.patch │ ├── rapidjson-assertions-for-clang-warnings.patch │ ├── cmake-issue-15873-dont-use-select.patch │ ├── sparsehash-0002-Add-workaround-for-dense_hashtable-move-constructor-.patch │ ├── llvm-include-llvm-support-signals.patch │ ├── curl-eventfd-double-close.patch │ ├── llvm-MicrosoftDemangleNodes-e0402b5c9813a2458b8dd3f640883110db280395.patch │ ├── breakpad-fread.patch │ ├── breakpad-syscall-rsp-clobber-fix.patch │ ├── llvm-iwyu-718e69875.patch │ ├── llvm-chrono-duration-00.patch │ ├── squeasel-tls-openssl10x.patch │ └── libunwind-trace-cache-destructor.patch └── .gitignore ├── NOTICE.txt ├── CONTRIBUTING.adoc ├── kubernetes ├── namespace.yaml └── helm │ ├── kudu-expose-all.yaml │ ├── kudu │ └── Chart.yaml │ └── kudu-rolebinding.yaml ├── docker └── Dockerfile-files └── cmake_modules ├── FindJwtCpp.cmake ├── FindCURL.cmake └── FindKerberos.cmake /python/LICENSE.txt: -------------------------------------------------------------------------------- 1 | ../LICENSE.txt -------------------------------------------------------------------------------- /python/version.txt: -------------------------------------------------------------------------------- 1 | ../version.txt -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | 1.19.0-SNAPSHOT 2 | -------------------------------------------------------------------------------- /python/setup.cfg: -------------------------------------------------------------------------------- 1 | [aliases] 2 | test=pytest 3 | -------------------------------------------------------------------------------- /python/requirements.txt: -------------------------------------------------------------------------------- 1 | six==1.16.0 2 | pytz==2024.1 3 | -------------------------------------------------------------------------------- /examples/python/graphite-kudu/setup.cfg: -------------------------------------------------------------------------------- 1 | [wheel] 2 | universal = 1 3 | -------------------------------------------------------------------------------- /www/key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/www/key.png -------------------------------------------------------------------------------- /www/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/www/logo.png -------------------------------------------------------------------------------- /www/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/www/favicon.ico -------------------------------------------------------------------------------- /python/pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | testpaths=kudu/ 3 | timeout = 100 4 | timeout_method = signal 5 | -------------------------------------------------------------------------------- /src/kudu/tools/testdata/bad-diagnostics-log.txt: -------------------------------------------------------------------------------- 1 | I0314 11:54:20.737790 symbols 1521053660737790 {"} 2 | -------------------------------------------------------------------------------- /java/kudu-client/src/test/resources/assign-location.py: -------------------------------------------------------------------------------- 1 | ../../../../../src/kudu/scripts/assign-location.py -------------------------------------------------------------------------------- /docs/whitepaper/ycsb-results.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/docs/whitepaper/ycsb-results.pdf -------------------------------------------------------------------------------- /docs/images/kudu-architecture-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/docs/images/kudu-architecture-2.png -------------------------------------------------------------------------------- /docs/media-src/kudu-architecture-2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/docs/media-src/kudu-architecture-2.pdf -------------------------------------------------------------------------------- /docs/images/design-docs_transactions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/docs/images/design-docs_transactions.png -------------------------------------------------------------------------------- /docs/media-src/kudu-tablet-flush-6b.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/docs/media-src/kudu-tablet-flush-6b.pdf -------------------------------------------------------------------------------- /docs/images/hash-partitioning-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/docs/images/hash-partitioning-example.png -------------------------------------------------------------------------------- /docs/images/range-partitioning-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/docs/images/range-partitioning-example.png -------------------------------------------------------------------------------- /examples/java/.gitignore: -------------------------------------------------------------------------------- 1 | dependency-reduced-pom.xml 2 | target/ 3 | .classpath 4 | .project 5 | .settings 6 | .idea 7 | *.iml 8 | -------------------------------------------------------------------------------- /docs/images/hash-hash-partitioning-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/docs/images/hash-hash-partitioning-example.png -------------------------------------------------------------------------------- /docs/images/hash-range-partitioning-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/docs/images/hash-range-partitioning-example.png -------------------------------------------------------------------------------- /java/kudu-spark/src/main/resources/META-INF/services/org.apache.spark.sql.sources.DataSourceRegister: -------------------------------------------------------------------------------- 1 | org.apache.kudu.spark.kudu.DefaultSource -------------------------------------------------------------------------------- /www/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/www/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /java/kudu-client/src/test/resources/test-key-and-cert.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/kudu/HEAD/java/kudu-client/src/test/resources/test-key-and-cert.jks -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # Kudu examples 2 | 3 | This directory holds example code and tutorials for Kudu. 4 | 5 | It was imported from https://github.com/cloudera/kudu-examples at commit 6 | 7545deccb8e12effa17a955ab5b841bdcc5afe85. 7 | -------------------------------------------------------------------------------- /docs/media-src/README: -------------------------------------------------------------------------------- 1 | Source files (i.e. .graffle, .psd, .eps, .xcf files) for artifacts used in docs 2 | or the web site. 3 | 4 | Don't put display-resolution images for the docs here, better to put those in 5 | the images/ directory, or even on a CDN. 6 | -------------------------------------------------------------------------------- /java/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /java/kudu-spark-tools/src/test/resources/TestImportExportFiles.csv: -------------------------------------------------------------------------------- 1 | key,column1_i,column2_d,column3_s,column4_b 2 | 1,3,2.3,some string,true 3 | 2,5,4.5,some more,false 4 | 3,7,1.2,wait this is not a double bad row,true 5 | 4,9,10.1,trailing separator isn't bad mkay?,true -------------------------------------------------------------------------------- /thirdparty/README.txt: -------------------------------------------------------------------------------- 1 | This directory contains scripts which download and install several third-party 2 | dependencies of Kudu. Most of these dependencies are statically linked into 3 | Kudu binaries, though a few are used only at build-time. 4 | 5 | See LICENSE.txt in this file for information on the licensing of each of these 6 | dependencies. 7 | -------------------------------------------------------------------------------- /docs/support/doxygen/client_api.footer.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /thirdparty/patches/llvm-add-iwyu.patch: -------------------------------------------------------------------------------- 1 | --- a/tools/clang/tools/CMakeLists.txt 2017-08-03 20:37:25.000000000 -0700 2 | +++ b/tools/clang/tools/CMakeLists.txt 2017-08-03 20:38:20.000000000 -0700 3 | @@ -30,3 +30,4 @@ 4 | 5 | # libclang may require clang-tidy in clang-tools-extra. 6 | add_clang_subdirectory(libclang) 7 | +add_subdirectory(include-what-you-use) 8 | -------------------------------------------------------------------------------- /python/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE.txt 2 | include MANIFEST.in 3 | include README.md 4 | include setup.py 5 | include setup_prerequisites.py 6 | include version.txt 7 | include requirements.txt 8 | 9 | graft kudu 10 | prune kudu/tests 11 | 12 | global-exclude *.so 13 | global-exclude *.pyc 14 | global-exclude *~ 15 | global-exclude \#* 16 | global-exclude .git* 17 | global-exclude .DS_Store 18 | -------------------------------------------------------------------------------- /src/kudu/gutil/utf/utfdef.h: -------------------------------------------------------------------------------- 1 | #define uchar _utfuchar 2 | #define ushort _utfushort 3 | #define uint _utfuint 4 | #define ulong _utfulong 5 | #define vlong _utfvlong 6 | #define uvlong _utfuvlong 7 | 8 | typedef unsigned char uchar; 9 | typedef unsigned short ushort; 10 | typedef unsigned int uint; 11 | typedef unsigned long ulong; 12 | 13 | #define nelem(x) (sizeof(x)/sizeof((x)[0])) 14 | #define nil ((void*)0) 15 | -------------------------------------------------------------------------------- /thirdparty/patches/postgres-no-check-root.patch: -------------------------------------------------------------------------------- 1 | --- src/backend/main/main.c.orig 2020-03-30 22:07:28.000000000 -0700 2 | +++ src/backend/main/main.c 2020-03-30 22:07:58.000000000 -0700 3 | @@ -190,13 +190,6 @@ 4 | } 5 | 6 | /* 7 | - * Make sure we are not running as root, unless it's safe for the selected 8 | - * option. 9 | - */ 10 | - if (do_check_root) 11 | - check_root(progname); 12 | - 13 | - /* 14 | * Dispatch to one of various subprograms depending on first argument. 15 | */ 16 | 17 | -------------------------------------------------------------------------------- /www/swagger/kudu-custom.css: -------------------------------------------------------------------------------- 1 | /* Hide any navbar/header elements */ 2 | .swagger-ui .topbar, 3 | .swagger-ui .swagger-ui-wrap > .topbar, 4 | .swagger-ui .header, 5 | .swagger-ui .info .title, 6 | .swagger-ui .info hgroup.main { 7 | display: none !important; 8 | } 9 | 10 | .swagger-ui { 11 | max-width: none !important; 12 | } 13 | 14 | .swagger-ui .wrapper { 15 | padding-top: 0 !important; 16 | } 17 | 18 | .swagger-ui .scheme-container { 19 | margin-top: 0 !important; 20 | padding-top: 0 !important; 21 | } 22 | -------------------------------------------------------------------------------- /src/kudu/util/debug/trace_event_impl_constants.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "kudu/util/debug/trace_event_impl.h" 6 | 7 | namespace kudu { 8 | namespace debug { 9 | 10 | // Enable everything but debug and test categories by default. 11 | const char* CategoryFilter::kDefaultCategoryFilterString = "-*Debug,-*Test"; 12 | 13 | } // namespace debug 14 | } // namespace kudu 15 | -------------------------------------------------------------------------------- /src/kudu/gutil/int128.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2004 Google Inc. 2 | // All Rights Reserved. 3 | // 4 | // 5 | 6 | #include 7 | using std::cout; 8 | using std::endl; 9 | #include "kudu/gutil/int128.h" 10 | #include "kudu/gutil/integral_types.h" 11 | 12 | const uint128_pod kuint128max = { 13 | static_cast(GG_LONGLONG(0xFFFFFFFFFFFFFFFF)), 14 | static_cast(GG_LONGLONG(0xFFFFFFFFFFFFFFFF)) 15 | }; 16 | 17 | std::ostream& operator<<(std::ostream& o, const uint128& b) { 18 | return (o << b.hi_ << "::" << b.lo_); 19 | } 20 | -------------------------------------------------------------------------------- /thirdparty/patches/boost-bootstrap.patch: -------------------------------------------------------------------------------- 1 | --- bootstrap.sh.orig 2024-03-28 10:43:30.211479344 -0700 2 | +++ bootstrap.sh 2024-03-28 10:45:08.738096743 -0700 3 | @@ -226,7 +226,10 @@ 4 | if test "x$BJAM" = x; then 5 | $ECHO "Building B2 engine.." 6 | pwd=`pwd` 7 | - CXX= CXXFLAGS= "$my_dir/tools/build/src/engine/build.sh" ${TOOLSET} 8 | + CXX= CXXFLAGS= "$my_dir/tools/build/src/engine/build.sh"\ 9 | + --cxx=${CXX}\ 10 | + --cxxflags=${CXXFLAGS}\ 11 | + ${TOOLSET} 12 | if [ $? -ne 0 ]; then 13 | echo 14 | echo "Failed to build B2 build engine" 15 | -------------------------------------------------------------------------------- /src/kudu/gutil/strings/charset.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008 Google Inc. All Rights Reserved. 2 | 3 | #include "kudu/gutil/strings/charset.h" 4 | 5 | #include 6 | 7 | namespace strings { 8 | 9 | CharSet::CharSet() { 10 | memset(this, 0, sizeof(*this)); 11 | } 12 | 13 | CharSet::CharSet(const char* characters) { 14 | memset(this, 0, sizeof(*this)); 15 | for (; *characters != '\0'; ++characters) { 16 | Add(*characters); 17 | } 18 | } 19 | 20 | CharSet::CharSet(const CharSet& other) { 21 | memcpy(this, &other, sizeof(*this)); 22 | } 23 | 24 | } // namespace strings 25 | -------------------------------------------------------------------------------- /java/.scalafmt.conf: -------------------------------------------------------------------------------- 1 | version = 1.5.1 // TODO: remove this and fix the formatting errors 2 | style = defaultWithAlign 3 | 4 | align = false 5 | binPack { 6 | literalArgumentLists = true 7 | parentConstructors = true 8 | } 9 | docstrings = JavaDoc 10 | lineEndings = unix 11 | maxColumn = 100 12 | newlines { 13 | alwaysBeforeTopLevelStatements = true 14 | penalizeSingleSelectMultiArgList = false 15 | } 16 | rewrite.rules = [ 17 | avoidinfix, 18 | expandimportselectors, 19 | prefercurlyfors, 20 | ] 21 | spaces { 22 | inImportCurlyBraces = false 23 | } 24 | unindentTopLevelOperators = true -------------------------------------------------------------------------------- /thirdparty/patches/ranger-fixscripts.patch: -------------------------------------------------------------------------------- 1 | *** ews/ranger-admin-services.sh.orig 2020-03-18 00:27:04.000000000 +0100 2 | --- ews/ranger-admin-services.sh 2020-03-18 00:27:14.000000000 +0100 3 | *************** action=$1 4 | *** 25,33 **** 5 | arg2=$2 6 | arg3=$3 7 | action=`echo $action | tr '[:lower:]' '[:upper:]'` 8 | - realScriptPath=`readlink -f $0` 9 | - realScriptDir=`dirname $realScriptPath` 10 | - XAPOLICYMGR_DIR=`(cd $realScriptDir/..; pwd)` 11 | 12 | XAPOLICYMGR_EWS_DIR=${XAPOLICYMGR_DIR}/ews 13 | RANGER_JAAS_LIB_DIR="${XAPOLICYMGR_EWS_DIR}/ranger_jaas" 14 | --- 25,30 ---- 15 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | Apache Kudu 2 | Copyright 2016 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | 7 | Portions of this software were developed at 8 | Cloudera, Inc (http://www.cloudera.com/). 9 | 10 | This product includes software developed by the OpenSSL 11 | Project for use in the OpenSSL Toolkit (http://www.openssl.org/) 12 | 13 | This product includes cryptographic software written by Eric Young 14 | (eay@cryptsoft.com). This product includes software written by Tim 15 | Hudson (tjh@cryptsoft.com). 16 | -------------------------------------------------------------------------------- /thirdparty/patches/cmake-fix-macos-compilation.patch: -------------------------------------------------------------------------------- 1 | --- a/Utilities/cmzlib/zutil.h 2025-07-18 14:44:11 2 | +++ b/Utilities/cmzlib/zutil.h 2025-07-18 14:47:27 3 | @@ -139,15 +139,6 @@ 4 | 5 | #if defined(MACOS) || defined(TARGET_OS_MAC) 6 | # define OS_CODE 7 7 | -# ifndef Z_SOLO 8 | -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os 9 | -# include /* for fdopen */ 10 | -# else 11 | -# ifndef fdopen 12 | -# define fdopen(fd,mode) NULL /* No fdopen() */ 13 | -# endif 14 | -# endif 15 | -# endif 16 | #endif 17 | 18 | #ifdef __acorn 19 | -------------------------------------------------------------------------------- /thirdparty/patches/crcutil-fix-macos-arm64-flags.patch: -------------------------------------------------------------------------------- 1 | ---- a/autogen.sh 2025-07-18 14:55:00 2 | +++ b/autogen.sh 2025-07-19 15:24:27 3 | @@ -91,6 +91,8 @@ 4 | crcutil_flags="${crcutil_flags}" 5 | elif [[ "$PROCESSOR" == "aarch64" ]]; then 6 | crcutil_flags="${crcutil_flags} -march=armv8-a" 7 | +elif [[ "$PROCESSOR" == "arm" && "$KERNEL_NAME" == "Darwin" ]]; then 8 | + crcutil_flags="${crcutil_flags} -mcpu=apple-m1" 9 | elif [[ "$IS_CLANG" = "0" ]]; then 10 | # Newer GCC versions output just the major version with -dumpversion flag, 11 | # but older GCC versions don't even recognize the -dumpfullversion flag which 12 | -------------------------------------------------------------------------------- /thirdparty/patches/protobuf-inlined_string_field.patch: -------------------------------------------------------------------------------- 1 | --- a/src/google/protobuf/inlined_string_field.h 2025-09-02 13:26:42.155029894 -0700 2 | +++ b/src/google/protobuf/inlined_string_field.h 2025-09-02 13:27:51.865002067 -0700 3 | @@ -427,7 +427,7 @@ 4 | MessageLite* lhs_msg, // 5 | InlinedStringField* rhs, Arena* rhs_arena, bool rhs_arena_dtor_registered, 6 | MessageLite* rhs_msg) { 7 | -#if GOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE 8 | +#if defined(GOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE) && GOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE != 0 9 | lhs->get_mutable()->swap(*rhs->get_mutable()); 10 | if (!lhs_arena_dtor_registered && rhs_arena_dtor_registered) { 11 | lhs_msg->OnDemandRegisterArenaDtor(lhs_arena); 12 | -------------------------------------------------------------------------------- /thirdparty/patches/postgres-root-can-run-initdb.patch: -------------------------------------------------------------------------------- 1 | --- src/bin/initdb/initdb.c.orig 2024-12-04 17:08:24.402706737 -0800 2 | +++ src/bin/initdb/initdb.c 2024-12-04 17:09:06.643734596 -0800 3 | @@ -805,23 +805,11 @@ 4 | 5 | /* 6 | * find the current user 7 | - * 8 | - * on unix make sure it isn't root 9 | */ 10 | static char * 11 | get_id(void) 12 | { 13 | const char *username; 14 | - 15 | -#ifndef WIN32 16 | - if (geteuid() == 0) /* 0 is root's uid */ 17 | - { 18 | - pg_log_error("cannot be run as root"); 19 | - pg_log_error_hint("Please log in (using, e.g., \"su\") as the (unprivileged) user that will own the server process."); 20 | - exit(1); 21 | - } 22 | -#endif 23 | - 24 | username = get_user_name_or_exit(progname); 25 | 26 | return pg_strdup(username); 27 | -------------------------------------------------------------------------------- /thirdparty/patches/glog-make-internals-visible.patch: -------------------------------------------------------------------------------- 1 | diff --git a/CMakeLists.txt b/CMakeLists.txt 2 | index 846b444..5c5d42e 100644 3 | --- a/CMakeLists.txt 4 | +++ b/CMakeLists.txt 5 | @@ -60,10 +60,7 @@ if (NOT WITH_THREADS) 6 | set (CMAKE_DISABLE_FIND_PACKAGE_Threads ON) 7 | endif (NOT WITH_THREADS) 8 | 9 | -set (CMAKE_C_VISIBILITY_PRESET hidden) 10 | -set (CMAKE_CXX_VISIBILITY_PRESET hidden) 11 | set (CMAKE_POSITION_INDEPENDENT_CODE ON) 12 | -set (CMAKE_VISIBILITY_INLINES_HIDDEN ON) 13 | 14 | set (CMAKE_DEBUG_POSTFIX d) 15 | set (CMAKE_THREAD_PREFER_PTHREAD 1) 16 | @@ -581,6 +578,7 @@ set (GLOG_PUBLIC_H 17 | ${CMAKE_CURRENT_BINARY_DIR}/glog/vlog_is_on.h 18 | src/glog/log_severity.h 19 | src/glog/platform.h 20 | + src/utilities.h 21 | ) 22 | 23 | set (GLOG_SRCS 24 | -------------------------------------------------------------------------------- /src/kudu/gutil/utf/LICENSE: -------------------------------------------------------------------------------- 1 | UTF-8 Library 2 | 3 | The authors of this software are Rob Pike and Ken Thompson. 4 | Copyright (c) 1998-2002 by Lucent Technologies. 5 | Permission to use, copy, modify, and distribute this software for any 6 | purpose without fee is hereby granted, provided that this entire notice 7 | is included in all copies of any software which is or includes a copy 8 | or modification of this software and in all copies of the supporting 9 | documentation for such software. 10 | THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED 11 | WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY 12 | REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY 13 | OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. 14 | -------------------------------------------------------------------------------- /thirdparty/patches/llvm-fix-missing-include.patch: -------------------------------------------------------------------------------- 1 | From b498303066a63a203d24f739b2d2e0e56dca70d1 Mon Sep 17 00:00:00 2001 2 | From: serge-sans-paille 3 | Date: Tue, 10 Nov 2020 14:55:25 +0100 4 | Subject: [PATCH] [nfc] Fix missing include 5 | 6 | --- 7 | llvm/utils/benchmark/src/benchmark_register.h | 1 + 8 | 1 file changed, 1 insertion(+) 9 | 10 | diff --git a/llvm/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h 11 | index 0705e219f2fa2..4caa5ad4da079 100644 12 | --- a/llvm/utils/benchmark/src/benchmark_register.h 13 | +++ b/llvm/utils/benchmark/src/benchmark_register.h 14 | @@ -1,6 +1,7 @@ 15 | #ifndef BENCHMARK_REGISTER_H 16 | #define BENCHMARK_REGISTER_H 17 | 18 | +#include 19 | #include 20 | 21 | #include "check.h" 22 | -------------------------------------------------------------------------------- /thirdparty/patches/rapidjson-document-assignment-operator-00.patch: -------------------------------------------------------------------------------- 1 | commit 3b2441b87f99ab65f37b141a7b548ebadb607b96 2 | Author: Janusz Chorko 3 | Date: Fri Aug 26 21:17:38 2016 +0200 4 | 5 | Removed non-compiling assignment operator. Fixed #718 6 | 7 | diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h 8 | index e3e20dfb..b0f1f70b 100644 9 | --- a/include/rapidjson/document.h 10 | +++ b/include/rapidjson/document.h 11 | @@ -316,8 +316,6 @@ struct GenericStringRef { 12 | 13 | GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {} 14 | 15 | - GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } 16 | - 17 | //! implicit conversion to plain CharType pointer 18 | operator const Ch *() const { return s; } 19 | 20 | -------------------------------------------------------------------------------- /thirdparty/patches/rapidjson-document-assignment-operator-01.patch: -------------------------------------------------------------------------------- 1 | commit 862c39be371278a45a88d4d1d75164be57bb7e2d 2 | Author: Janusz Chorko 3 | Date: Fri Aug 26 21:26:50 2016 +0200 4 | 5 | Explicitly disable copy assignment operator 6 | 7 | diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h 8 | index b0f1f70b..19f5a6a5 100644 9 | --- a/include/rapidjson/document.h 10 | +++ b/include/rapidjson/document.h 11 | @@ -326,6 +326,8 @@ private: 12 | //! Disallow construction from non-const array 13 | template 14 | GenericStringRef(CharType (&str)[N]) /* = delete */; 15 | + //! Copy assignment operator not permitted - immutable type 16 | + GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */; 17 | }; 18 | 19 | //! Mark a character pointer as constant string 20 | -------------------------------------------------------------------------------- /python/kudu/__init__.pxd: -------------------------------------------------------------------------------- 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, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | *.html 19 | 20 | -------------------------------------------------------------------------------- /thirdparty/patches/curl-custom-openssl-library.patch: -------------------------------------------------------------------------------- 1 | --- a/m4/curl-openssl.m4 2024-12-11 18:13:35 2 | +++ b/m4/curl-openssl.m4 2024-12-11 18:15:27 3 | @@ -137,10 +137,14 @@ 4 | fi 5 | fi 6 | 7 | - dnl finally, set flags to use SSL 8 | - CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS" 9 | - LDFLAGS="$LDFLAGS $SSL_LDFLAGS" 10 | - LDFLAGSPC="$LDFLAGSPC $SSL_LDFLAGS" 11 | + dnl Finally, set flags to use SSL. 12 | + dnl If another version of OpenSSL library is present under the 'standard' 13 | + dnl system paths, it's necessary to pick up the header and binary files 14 | + dnl of the custom OpenSSL library, so put OpenSSL's custom paths first 15 | + dnl for both the preprocessor and the linker. 16 | + CPPFLAGS="$SSL_CPPFLAGS $CPPFLAGS" 17 | + LDFLAGS="$SSL_LDFLAGS $LDFLAGS" 18 | + LDFLAGSPC="$SSL_LDFLAGS $LDFLAGSPC" 19 | 20 | AC_CHECK_LIB(crypto, HMAC_Update,[ 21 | HAVECRYPTO="yes" 22 | -------------------------------------------------------------------------------- /thirdparty/patches/llvm-ignore-flto-values.patch: -------------------------------------------------------------------------------- 1 | --- a/clang/include/clang/Driver/Options.td 2020-10-07 10:10:48.000000000 +0000 2 | +++ b/clang/include/clang/Driver/Options.td 2023-07-27 12:10:37.987953132 +0000 3 | @@ -1335,6 +1335,8 @@ 4 | def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group; 5 | def fapple_link_rtlib : Flag<["-"], "fapple-link-rtlib">, Group, 6 | HelpText<"Force linking the clang builtins runtime library">; 7 | +def : Flag<["-"], "flto=auto">, Group; 8 | +def : Flag<["-"], "flto=jobserver">, Group; 9 | def flto_EQ : Joined<["-"], "flto=">, Flags<[CoreOption, CC1Option]>, Group, 10 | HelpText<"Set LTO mode to either 'full' or 'thin'">, Values<"thin,full">; 11 | def flto : Flag<["-"], "flto">, Flags<[CoreOption, CC1Option]>, Group, 12 | -------------------------------------------------------------------------------- /thirdparty/patches/breakpad-guid-creator.patch: -------------------------------------------------------------------------------- 1 | commit 4beee493f626ffd6d05d8d05e603df9ff3b8717b 2 | Author: Mike Frysinger 3 | Date: Sat Aug 3 10:37:57 2019 -0400 4 | 5 | guid_creater: include string.h for memcpy 6 | 7 | Bug: google-breakpad:779 8 | Change-Id: If0cfb036ee924178033c89d4dc3e2ce75ddd46f2 9 | Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1732887 10 | Reviewed-by: Mark Mentovai 11 | 12 | diff --git a/src/common/linux/guid_creator.cc b/src/common/linux/guid_creator.cc 13 | index f81c2911..03e3d781 100644 14 | --- a/src/common/linux/guid_creator.cc 15 | +++ b/src/common/linux/guid_creator.cc 16 | @@ -39,6 +39,7 @@ 17 | #include 18 | #include 19 | #include 20 | +#include 21 | #include 22 | #include 23 | #include 24 | -------------------------------------------------------------------------------- /docs/whitepaper/.gitignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | *.aux 19 | *.log 20 | *.pdf 21 | -------------------------------------------------------------------------------- /python/kudu/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # This file left blank. 19 | -------------------------------------------------------------------------------- /examples/scala/sbt-int-test-example/project/build.properties: -------------------------------------------------------------------------------- 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, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | sbt.version=1.3.8 20 | -------------------------------------------------------------------------------- /src/kudu/gutil/hash/hash128to64.h: -------------------------------------------------------------------------------- 1 | // Copyright 2010 Google Inc. All Rights Reserved. 2 | // Authors: jyrki@google.com (Jyrki Alakuijala), gpike@google.com (Geoff Pike) 3 | 4 | #ifndef UTIL_HASH_HASH128TO64_H_ 5 | #define UTIL_HASH_HASH128TO64_H_ 6 | 7 | #include "kudu/gutil/int128.h" 8 | #include "kudu/gutil/integral_types.h" 9 | #include "kudu/gutil/port.h" 10 | 11 | // Hash 128 input bits down to 64 bits of output. 12 | // This is intended to be a reasonably good hash function. 13 | // It may change from time to time. 14 | ATTRIBUTE_NO_SANITIZE_INTEGER 15 | inline uint64 Hash128to64(const uint128& x) { 16 | // Murmur-inspired hashing. 17 | const uint64 kMul = 0xc6a4a7935bd1e995ULL; 18 | uint64 a = (Uint128Low64(x) ^ Uint128High64(x)) * kMul; 19 | a ^= (a >> 47); 20 | uint64 b = (Uint128High64(x) ^ a) * kMul; 21 | b ^= (b >> 47); 22 | b *= kMul; 23 | return b; 24 | } 25 | 26 | #endif // UTIL_HASH_HASH128TO64_H_ 27 | -------------------------------------------------------------------------------- /thirdparty/.gitignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | installed/ 19 | src/ 20 | build/ 21 | .build-hash* 22 | clang-toolchain 23 | -------------------------------------------------------------------------------- /python/kudu/errors.pxd: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from libkudu_client cimport * 19 | 20 | cdef check_status(const Status& status) 21 | -------------------------------------------------------------------------------- /thirdparty/patches/breakpad-minidump-descriptor.patch: -------------------------------------------------------------------------------- 1 | commit 7ea7ded187b4d739239f3ab7082fcd5a2ccc1eaa 2 | Author: mingtaoxt xt 3 | Date: Wed Oct 19 19:36:13 2022 +0800 4 | 5 | mainline version gcc-13 cannot use "uintptr_t" via "#include " 6 | 7 | Change-Id: I0049bb92658b4226e32783ad4d8271787deef5f3 8 | Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3964166 9 | Reviewed-by: Mike Frysinger 10 | 11 | diff --git a/src/client/linux/handler/minidump_descriptor.h b/src/client/linux/handler/minidump_descriptor.h 12 | index 4349b88f..d822c9d9 100644 13 | --- a/src/client/linux/handler/minidump_descriptor.h 14 | +++ b/src/client/linux/handler/minidump_descriptor.h 15 | @@ -32,6 +32,7 @@ 16 | #include 17 | #include 18 | 19 | +#include 20 | #include 21 | 22 | #include "client/linux/handler/microdump_extra_info.h" 23 | -------------------------------------------------------------------------------- /thirdparty/patches/gumbo-parser-autoconf-263.patch: -------------------------------------------------------------------------------- 1 | commit 36c07df 2 | Author: Adar Dembo 3 | Date: Tue Oct 29 10:13:37 2019 -0700 4 | 5 | Allow building gumbo-parser with autoconf 2.63 6 | 7 | This is found on CentOS 6.6. 8 | 9 | diff --git a/configure.ac b/configure.ac 10 | index 32dc9b9..c0fb407 100644 11 | --- a/configure.ac 12 | +++ b/configure.ac 13 | @@ -1,7 +1,7 @@ 14 | # -*- Autoconf -*- 15 | # Process this file with autoconf to produce a configure script. 16 | 17 | -AC_PREREQ([2.65]) 18 | +AC_PREREQ([2.63]) 19 | AC_INIT([gumbo], [0.10.1], [jonathan.d.tang@gmail.com]) 20 | AC_CONFIG_MACRO_DIR([m4]) 21 | AC_CONFIG_SRCDIR([src/parser.c]) 22 | diff --git a/m4/created b/m4/created 23 | new file mode 100644 24 | index 0000000..5159d8b 25 | --- /dev/null 26 | +++ b/m4/created 27 | @@ -0,0 +1 @@ 28 | +# This file exists so that the m4 directory can exist in the git repo. 29 | -------------------------------------------------------------------------------- /thirdparty/patches/rapidjson-assertions-for-clang-warnings.patch: -------------------------------------------------------------------------------- 1 | From 9d8df28c1dd92be8480fae8026fed0aa2c0d8cdd Mon Sep 17 00:00:00 2001 2 | From: Patrick Cheng 3 | Date: Fri, 30 Sep 2016 10:47:00 -0700 4 | Subject: [PATCH] added assertion to help suppress clang warnings 5 | 6 | --- 7 | include/rapidjson/internal/stack.h | 2 ++ 8 | 1 file changed, 2 insertions(+) 9 | 10 | diff --git a/include/rapidjson/internal/stack.h b/include/rapidjson/internal/stack.h 11 | index 022c9aab4..54ac77a82 100644 12 | --- a/include/rapidjson/internal/stack.h 13 | +++ b/include/rapidjson/internal/stack.h 14 | @@ -126,6 +127,7 @@ class Stack { 15 | 16 | template 17 | RAPIDJSON_FORCEINLINE T* PushUnsafe(size_t count = 1) { 18 | + RAPIDJSON_ASSERT(stackTop_); 19 | RAPIDJSON_ASSERT(stackTop_ + sizeof(T) * count <= stackEnd_); 20 | T* ret = reinterpret_cast(stackTop_); 21 | stackTop_ += sizeof(T) * count; 22 | -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 |

Kudu Webserver

23 | 24 | 25 | -------------------------------------------------------------------------------- /java/kudu-test-utils/src/test/resources/fake-kudu-binary/apache-kudu-1.9.0-SNAPSHOT/bin/kudu-tserver: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | fake kudu-tserver... -------------------------------------------------------------------------------- /CONTRIBUTING.adoc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | Please read the instructions for http://getkudu.io/docs/contributing.html[how to contribute to Kudu]. 19 | -------------------------------------------------------------------------------- /examples/python/graphite-kudu/kudu/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | from pkgutil import extend_path 19 | __path__ = extend_path(__path__, __name__) 20 | 21 | -------------------------------------------------------------------------------- /src/kudu/scripts/first_argument.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 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, 13 | # software distributed under the License is distributed on an 14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | # KIND, either express or implied. See the License for the 16 | # specific language governing permissions and limitations 17 | # under the License. 18 | 19 | # A script that prints the first argument and ignores all the others. 20 | echo "$1" 21 | -------------------------------------------------------------------------------- /kubernetes/namespace.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | apiVersion: v1 19 | kind: Namespace 20 | metadata: 21 | name: "apache-kudu" 22 | labels: 23 | name: "apache-kudu" 24 | -------------------------------------------------------------------------------- /www/tablet-consensus-status.mustache: -------------------------------------------------------------------------------- 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, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | }} 19 | {{#error}} 20 |
{{.}}
21 | {{/error}} 22 | {{^error}} 23 | {{{consensus_status}}} 24 | {{/error}} 25 | -------------------------------------------------------------------------------- /java/kudu-jepsen/src/test/resources/ntp.conf.server: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | # 18 | enable calibrate 19 | server 127.127.1.0 burst iburst minpoll 4 maxpoll 4 20 | fudge 127.127.1.0 stratum 10 21 | -------------------------------------------------------------------------------- /thirdparty/patches/cmake-issue-15873-dont-use-select.patch: -------------------------------------------------------------------------------- 1 | From cfdd1aebc180805d7148c2c385c2e0b97287bedc Mon Sep 17 00:00:00 2001 2 | From: Matthew Jacobs 3 | Date: Thu, 20 Jul 2017 09:28:41 -0700 4 | Subject: [PATCH] Don't use select() due to 5 | https://cmake.org/Bug/view.php?id=15873 6 | 7 | --- 8 | Source/kwsys/ProcessUNIX.c | 3 ++- 9 | 1 file changed, 2 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c 12 | index 9ebcfce..b448b03 100644 13 | --- a/Source/kwsys/ProcessUNIX.c 14 | +++ b/Source/kwsys/ProcessUNIX.c 15 | @@ -100,7 +100,8 @@ static inline void kwsysProcess_usleep(unsigned int msec) 16 | * without select(). 17 | */ 18 | #if !defined(__BEOS__) && !defined(__VMS) && !defined(__MINT__) 19 | -#define KWSYSPE_USE_SELECT 1 20 | +// Don't use select() due to https://cmake.org/Bug/view.php?id=15873 21 | +#define KWSYSPE_USE_SELECT 0 22 | #endif 23 | 24 | /* Some platforms do not have siginfo on their signal handlers. */ 25 | -- 26 | 1.9.1 27 | 28 | -------------------------------------------------------------------------------- /www/home.mustache: -------------------------------------------------------------------------------- 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, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | }} 19 | 20 |

Status Pages

21 | {{#path_handlers}} 22 | {{alias}}
23 | {{/path_handlers}} 24 |
25 |

Version Info

26 |
{{version_info}}
27 | -------------------------------------------------------------------------------- /src/kudu/util/prometheus_writer.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/util/prometheus_writer.h" 19 | 20 | #include 21 | 22 | void PrometheusWriter::WriteEntry(const std::string& data) { 23 | *output_ << data; 24 | } 25 | -------------------------------------------------------------------------------- /src/kudu/gutil/basictypes.h: -------------------------------------------------------------------------------- 1 | // Copyright 2001 - 2003 Google, Inc. 2 | // 3 | // Google-specific types 4 | 5 | #ifndef BASE_BASICTYPES_H_ 6 | #define BASE_BASICTYPES_H_ 7 | 8 | #include "kudu/gutil/integral_types.h" 9 | #include "kudu/gutil/macros.h" 10 | 11 | // Argument type used in interfaces that can optionally take ownership 12 | // of a passed in argument. If TAKE_OWNERSHIP is passed, the called 13 | // object takes ownership of the argument. Otherwise it does not. 14 | enum Ownership { 15 | DO_NOT_TAKE_OWNERSHIP, 16 | TAKE_OWNERSHIP 17 | }; 18 | 19 | // Used to explicitly mark the return value of a function as unused. If you are 20 | // really sure you don't want to do anything with the return value of a function 21 | // that has been marked WARN_UNUSED_RESULT, wrap it with this. Example: 22 | // 23 | // scoped_ptr my_var = ...; 24 | // if (TakeOwnership(my_var.get()) == SUCCESS) 25 | // ignore_result(my_var.release()); 26 | // 27 | template 28 | inline void ignore_result(const T&) { 29 | } 30 | 31 | 32 | #endif // BASE_BASICTYPES_H_ 33 | -------------------------------------------------------------------------------- /www/log-anchors.mustache: -------------------------------------------------------------------------------- 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, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | }} 19 | {{#error}} 20 |
{{.}}
21 | {{/error}} 22 | {{^error}} 23 |

Log Anchors for Tablet {{tablet_id}}

24 |
{{log_anchors}}
25 | {{/error}} 26 | -------------------------------------------------------------------------------- /src/kudu/rpc/response_callback.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | #include 20 | 21 | namespace kudu { 22 | namespace rpc { 23 | 24 | typedef std::function ResponseCallback; 25 | 26 | } // namespace rpc 27 | } // namespace kudu 28 | -------------------------------------------------------------------------------- /docs/whitepaper/ycsb-data/log-to-tsv.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | 20 | print "time\ttput\n"; 21 | while (<>) { 22 | next unless /sec;/; 23 | next if /CLEANUP/; 24 | if (/(\d+) sec.*?([\d.]+) current ops./) { 25 | print "$1\t$2\n"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /www/tablet-rowsetlayout-svg.mustache: -------------------------------------------------------------------------------- 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, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | }} 19 | {{#error}} 20 |
{{.}}
21 | {{/error}} 22 | {{^error}} 23 |

Rowset Layout Diagram for Tablet {{tablet_id}}

24 | {{{rowset_layout}}} 25 | {{/error}} 26 | -------------------------------------------------------------------------------- /thirdparty/patches/sparsehash-0002-Add-workaround-for-dense_hashtable-move-constructor-.patch: -------------------------------------------------------------------------------- 1 | From 517c4bce0f1c30f8868da9bf5a568c4db40e95ea Mon Sep 17 00:00:00 2001 2 | From: Todd Lipcon 3 | Date: Tue, 21 Jan 2020 13:52:41 -0800 4 | Subject: [PATCH] Add workaround for dense_hashtable move constructor in gcc 5 | 4.8 6 | 7 | --- 8 | sparsehash/internal/densehashtable.h | 5 ++++- 9 | 1 file changed, 4 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/sparsehash/internal/densehashtable.h b/sparsehash/internal/densehashtable.h 12 | index 72b3607..cc7ff69 100644 13 | --- a/sparsehash/internal/densehashtable.h 14 | +++ b/sparsehash/internal/densehashtable.h 15 | @@ -739,7 +739,10 @@ class dense_hashtable { 16 | } 17 | 18 | dense_hashtable(dense_hashtable&& ht) 19 | - : dense_hashtable() { 20 | + // NOTE: redundantly set num_buckets = 0 for gcc 4.8.x compatibility. 21 | + // It can't find the dense_hashtable constructor unless at least one 22 | + // argument is set. 23 | + : dense_hashtable(0) { 24 | swap(ht); 25 | } 26 | 27 | -- 28 | 2.17.1 29 | 30 | -------------------------------------------------------------------------------- /examples/scala/sbt-int-test-example/project/plugins.sbt: -------------------------------------------------------------------------------- 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, 13 | // software distributed under the License is distributed on an 14 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | // KIND, either express or implied. See the License for the 16 | // specific language governing permissions and limitations 17 | // under the License. 18 | 19 | resolvers += "phData Releases" at "https://repository.phdata.io/artifactory/libs-release" 20 | classpathTypes += "maven-plugin" 21 | addSbtPlugin("io.phdata" % "sbt-os-detector" % "0.2.0") 22 | -------------------------------------------------------------------------------- /docs/support/scripts/Gemfile: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | source 'https://rubygems.org' 19 | 20 | gem 'thread_safe' 21 | gem 'redcarpet' 22 | gem 'jekyll' 23 | gem 'ref' 24 | gem 'json' 25 | gem 'rdoc' 26 | gem 'yajl-ruby', '>= 1.3.1' # Due to CVE-2017-16516. 27 | 28 | gem 'asciidoctor' 29 | gem 'tilt' 30 | -------------------------------------------------------------------------------- /src/kudu/util/test_util_prod.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/util/test_util_prod.h" 19 | 20 | #include 21 | 22 | namespace kudu { 23 | 24 | bool IsGTest() { 25 | return dlsym(RTLD_DEFAULT, "_ZN4kudu10g_is_gtestE") != nullptr; 26 | } 27 | 28 | } // namespace kudu 29 | -------------------------------------------------------------------------------- /thirdparty/patches/llvm-include-llvm-support-signals.patch: -------------------------------------------------------------------------------- 1 | commit ff1681ddb303223973653f7f5f3f3435b48a1983 2 | Author: Sergei Trofimovich 3 | Date: Mon May 23 08:03:23 2022 +0100 4 | 5 | [Support] Add missing header to Signals.h 6 | 7 | Without the change llvm build fails on this week's gcc-13 snapshot as: 8 | 9 | [ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o 10 | In file included from llvm/lib/Support/Signals.cpp:14: 11 | llvm/include/llvm/Support/Signals.h:119:8: error: variable or field 'CleanupOnSignal' declared void 12 | 119 | void CleanupOnSignal(uintptr_t Context); 13 | | ^~~~~~~~~~~~~~~ 14 | 15 | diff --git a/include/llvm/Support/Signals.h b/include/llvm/Support/Signals.h 16 | index 44f5a750ff5c..937e0572d4a7 100644 17 | --- a/include/llvm/Support/Signals.h 18 | +++ b/include/llvm/Support/Signals.h 19 | @@ -14,6 +14,7 @@ 20 | #ifndef LLVM_SUPPORT_SIGNALS_H 21 | #define LLVM_SUPPORT_SIGNALS_H 22 | 23 | +#include 24 | #include 25 | 26 | namespace llvm { 27 | -------------------------------------------------------------------------------- /python/kudu/config.pxi.in: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | // This file is processed by setup.py 19 | // See generate_config_pxi. 20 | 21 | // KUDU_INT128_SUPPORTED is substituted from the C++ macro. 22 | // PYKUDU_INT128_SUPPORTED becomes a Cython macro. 23 | DEF PYKUDU_INT128_SUPPORTED = KUDU_INT128_SUPPORTED 24 | -------------------------------------------------------------------------------- /src/kudu/util/hash.proto: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | syntax = "proto2"; 18 | package kudu; 19 | 20 | option java_package = "org.apache.kudu"; 21 | 22 | // Implemented hash algorithms. 23 | enum HashAlgorithm { 24 | UNKNOWN_HASH = 0; 25 | MURMUR_HASH_2 = 1; 26 | CITY_HASH = 2; 27 | FAST_HASH = 3; 28 | } 29 | -------------------------------------------------------------------------------- /python/requirements_dev.txt: -------------------------------------------------------------------------------- 1 | # For Python 2.7: 2 | # - Use the highest possible version of each package that still supports Python 2.7. 3 | # 4 | # For Python 3.6 and above: 5 | # - Use the latest version of each package that still supports Python 3.6, 6 | # except for numpy and pandas, which have version restrictions to ensure compatibility with 7 | # macOS during testing. 8 | 9 | 10 | pytest==4.6.11; python_version == "2.7" 11 | pytest==6.2.5; python_version >= "3.6" 12 | 13 | pytest-timeout==1.4.2; python_version == "2.7" 14 | pytest-timeout==2.1.0; python_version >= "3.6" 15 | 16 | pytest-runner<5.3.0; python_version == "2.7" 17 | pytest-runner==5.3.2; python_version >= "3.6" 18 | 19 | unittest2==1.1.0 20 | 21 | setuptools==44.1.1; python_version == "2.7" 22 | setuptools==58.5.3; python_version >= "3.6" 23 | 24 | pandas==0.23.4; python_version == "2.7" 25 | pandas==1.1.5; python_version >= "3.6" and python_version < "3.8" 26 | pandas==1.5.3; python_version >= "3.8" 27 | 28 | numpy==1.16.6; python_version == "2.7" 29 | numpy==1.19.5; python_version >= "3.6" and python_version < "3.8" 30 | numpy==1.23.5; python_version >= "3.8" 31 | -------------------------------------------------------------------------------- /src/kudu/util/proto_container_test.proto: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | syntax = "proto2"; 18 | package kudu; 19 | 20 | // Arbitrary protobuf to test writing a containerized protobuf. 21 | message ProtoContainerTestPB { 22 | required string name = 1; 23 | required int32 value = 2; 24 | optional string note = 3; 25 | } 26 | -------------------------------------------------------------------------------- /java/kudu-jepsen/.gitignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # Ignore files containing information on prior Leiningen runs/sessions. 19 | .lein-failures 20 | .lein-repl-history 21 | # Ignore jepsen files generated by local test runs. 22 | store/ 23 | # Ignore the result of processing README.adoc with the asciidoctor tool. 24 | README.html 25 | -------------------------------------------------------------------------------- /src/kudu/security/kerberos_util.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | #include 20 | 21 | class StringPiece; 22 | 23 | namespace kudu { 24 | namespace security { 25 | 26 | std::array SplitKerberosPrincipal(StringPiece principal); 27 | 28 | } // namespace security 29 | } // namespace kudu 30 | -------------------------------------------------------------------------------- /src/kudu/kserver/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | ######################################### 19 | # kserver 20 | ######################################### 21 | 22 | set(KSERVER_SRCS 23 | kserver.cc 24 | ) 25 | 26 | add_library(kserver ${KSERVER_SRCS}) 27 | target_link_libraries(kserver 28 | gutil 29 | kudu_util 30 | server_process) 31 | -------------------------------------------------------------------------------- /src/kudu/util/compression/compression.proto: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | syntax = "proto2"; 18 | package kudu; 19 | 20 | option java_package = "org.apache.kudu"; 21 | 22 | enum CompressionType { 23 | UNKNOWN_COMPRESSION = 999; 24 | DEFAULT_COMPRESSION = 0; 25 | NO_COMPRESSION = 1; 26 | SNAPPY = 2; 27 | LZ4 = 3; 28 | ZLIB = 4; 29 | } 30 | -------------------------------------------------------------------------------- /thirdparty/patches/curl-eventfd-double-close.patch: -------------------------------------------------------------------------------- 1 | commit ff5091aa9f73802e894b1cbdf24ab84e103200e2 2 | Author: Andy Pan 3 | Date: Thu Dec 12 12:48:56 2024 +0000 4 | 5 | async-thread: avoid closing eventfd twice 6 | 7 | When employing eventfd for socketpair, there is only one file 8 | descriptor. Closing that fd twice might result in fd corruption. 9 | Thus, we should avoid closing the eventfd twice, following the 10 | pattern in lib/multi.c. 11 | 12 | Fixes #15725 13 | Closes #15727 14 | Reported-by: Christian Heusel 15 | 16 | diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c 17 | index a58e4b790..32d496b10 100644 18 | --- a/lib/asyn-thread.c 19 | +++ b/lib/asyn-thread.c 20 | @@ -195,9 +195,11 @@ void destroy_thread_sync_data(struct thread_sync_data *tsd) 21 | * close one end of the socket pair (may be done in resolver thread); 22 | * the other end (for reading) is always closed in the parent thread. 23 | */ 24 | +#ifndef USE_EVENTFD 25 | if(tsd->sock_pair[1] != CURL_SOCKET_BAD) { 26 | wakeup_close(tsd->sock_pair[1]); 27 | } 28 | +#endif 29 | #endif 30 | memset(tsd, 0, sizeof(*tsd)); 31 | } 32 | -------------------------------------------------------------------------------- /src/kudu/scripts/parse_real_out.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | # 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # 20 | # This script takes a line in stdin and parses the real time out of it. 21 | # Input example: 22 | # "Times for Insert 10000000 keys: real 16.438s user 16.164s sys 0.229s" 23 | # Output: 24 | # 16.438 25 | 26 | awk -F 'real ' '{ print $2 }' | awk -F s '{ print $1 }' 27 | -------------------------------------------------------------------------------- /src/kudu/rpc/rtest_diff_package.proto: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | // 18 | // Request/Response in different package to test that RPC methods 19 | // handle arguments with packages different from the service itself. 20 | syntax = "proto2"; 21 | package kudu.rpc_test_diff_package; 22 | 23 | message ReqDiffPackagePB { 24 | } 25 | message RespDiffPackagePB { 26 | } 27 | -------------------------------------------------------------------------------- /src/kudu/scripts/stop_kudu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ######################################################################## 4 | # 5 | # Licensed to the Apache Software Foundation (ASF) under one 6 | # or more contributor license agreements. See the NOTICE file 7 | # distributed with this work for additional information 8 | # regarding copyright ownership. The ASF licenses this file 9 | # to you under the Apache License, Version 2.0 (the 10 | # "License"); you may not use this file except in compliance 11 | # with the License. You may obtain a copy of the License at 12 | # 13 | # http://www.apache.org/licenses/LICENSE-2.0 14 | # 15 | # Unless required by applicable law or agreed to in writing, 16 | # software distributed under the License is distributed on an 17 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 18 | # KIND, either express or implied. See the License for the 19 | # specific language governing permissions and limitations 20 | # under the License. 21 | # 22 | ######################################################################## 23 | 24 | # Killing Kudu master and tablet servers 25 | pkill -9 -u $(id -u) -x kudu-tserver 26 | pkill -9 -u $(id -u) -x kudu-master 27 | -------------------------------------------------------------------------------- /src/kudu/util/web_callback_registry.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/util/web_callback_registry.h" 19 | 20 | #include "kudu/gutil/map-util.h" 21 | 22 | namespace kudu { 23 | 24 | bool WebCallbackRegistry::IsProxiedViaKnox(const WebRequest& req) { 25 | return ContainsKey(req.request_headers, "x-forwarded-context"); 26 | } 27 | 28 | } // namespace kudu 29 | -------------------------------------------------------------------------------- /src/kudu/util/prometheus_writer.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | class PrometheusWriter { 23 | 24 | public: 25 | explicit PrometheusWriter(std::ostringstream* output): output_(output) {} 26 | 27 | void WriteEntry(const std::string& data); 28 | 29 | private: 30 | std::ostringstream* output_; 31 | }; 32 | -------------------------------------------------------------------------------- /kubernetes/helm/kudu-expose-all.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | serviceEndpoints: 19 | - name: "kudu-master-service" 20 | type: NodePort 21 | app: "kudu-master" 22 | ports: 23 | ui: "8050" 24 | rpc-port: "8051" 25 | 26 | - name: "kudu-tserver-service" 27 | type: NodePort 28 | app: "kudu-tserver" 29 | ports: 30 | ui: "7050" 31 | rpc-port: "7051" 32 | -------------------------------------------------------------------------------- /java/config/checkstyle/suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 24 | 25 | 26 | 28 | -------------------------------------------------------------------------------- /thirdparty/patches/llvm-MicrosoftDemangleNodes-e0402b5c9813a2458b8dd3f640883110db280395.patch: -------------------------------------------------------------------------------- 1 | commit e0402b5c9813a2458b8dd3f640883110db280395 2 | Author: Than McIntosh 3 | Date: Fri Jul 19 13:13:54 2019 +0000 4 | 5 | [NFC] include cstdint/string prior to using uint8_t/string 6 | 7 | Summary: include proper header prior to use of uint8_t typedef 8 | and std::string. 9 | 10 | Subscribers: llvm-commits 11 | 12 | Reviewers: cherry 13 | 14 | Tags: #llvm 15 | 16 | Differential Revision: https://reviews.llvm.org/D64937 17 | 18 | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366572 91177308-0d34-0410-b5e6-96231b3b80d8 19 | 20 | diff --git a/include/llvm/Demangle/MicrosoftDemangleNodes.h b/include/llvm/Demangle/MicrosoftDemangleNodes.h 21 | index da9d9d5bfdc..3d47471f0ef 100644 22 | --- a/include/llvm/Demangle/MicrosoftDemangleNodes.h 23 | +++ b/include/llvm/Demangle/MicrosoftDemangleNodes.h 24 | @@ -16,6 +16,8 @@ 25 | #include "llvm/Demangle/DemangleConfig.h" 26 | #include "llvm/Demangle/StringView.h" 27 | #include 28 | +#include 29 | +#include 30 | 31 | namespace llvm { 32 | namespace itanium_demangle { 33 | -------------------------------------------------------------------------------- /src/kudu/util/file_cache_metrics.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #pragma once 19 | 20 | #include "kudu/gutil/ref_counted.h" 21 | #include "kudu/util/cache_metrics.h" 22 | 23 | namespace kudu { 24 | 25 | class MetricEntity; 26 | 27 | struct FileCacheMetrics : public CacheMetrics { 28 | explicit FileCacheMetrics(const scoped_refptr& entity); 29 | }; 30 | 31 | } // namespace kudu 32 | -------------------------------------------------------------------------------- /examples/python/graphite-kudu/README.adoc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | = Kudu Python client Graphite example 19 | :author: Kudu Team 20 | :homepage: https://kudu.apache.org/ 21 | 22 | This uses the Python client to implement a plugin for using graphite-web with 23 | Kudu as a backend. Be aware it's meant just as an example of how to use the 24 | Python client. It is not a well-tested integration. 25 | -------------------------------------------------------------------------------- /java/.gitignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # Eclipse files 19 | .metadata/ 20 | .classpath 21 | .project 22 | .settings/ 23 | 24 | # Maven build artifacts 25 | target/ 26 | dependency-reduced-pom.xml 27 | 28 | # Gradle build artifacts 29 | .gradle 30 | build 31 | gradle/wrapper/*.jar 32 | 33 | # IntelliJ 34 | *.ipr 35 | *.iws 36 | *.iml 37 | .idea/ 38 | classes 39 | **/out 40 | 41 | # jenv 42 | .java-version 43 | -------------------------------------------------------------------------------- /src/kudu/thrift/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | ############################## 19 | # kudu_thrift 20 | ############################## 21 | 22 | set(THRIFT_SRCS 23 | client.cc 24 | sasl_client_transport.cc) 25 | set(THRIFT_DEPS 26 | gflags 27 | glog 28 | krpc 29 | kudu_util 30 | thrift) 31 | 32 | add_library(kudu_thrift ${THRIFT_SRCS}) 33 | target_link_libraries(kudu_thrift ${THRIFT_DEPS}) 34 | -------------------------------------------------------------------------------- /src/kudu/util/block_cache_metrics.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #pragma once 19 | 20 | #include "kudu/gutil/ref_counted.h" 21 | #include "kudu/util/cache_metrics.h" 22 | 23 | namespace kudu { 24 | 25 | class MetricEntity; 26 | 27 | struct BlockCacheMetrics : public CacheMetrics { 28 | explicit BlockCacheMetrics(const scoped_refptr& entity); 29 | }; 30 | 31 | } // namespace kudu 32 | -------------------------------------------------------------------------------- /src/kudu/util/debug/unwind_safeness.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | namespace kudu { 20 | namespace debug { 21 | 22 | // Return true if it is currently safe to unwind the call stack. 23 | // 24 | // It's almost always safe unless we are in a signal handler context 25 | // inside a call into libdl. 26 | bool SafeToUnwindStack(); 27 | 28 | } // namespace debug 29 | } // namespace kudu 30 | -------------------------------------------------------------------------------- /src/kudu/util/proto_container_test2.proto: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | syntax = "proto2"; 18 | package kudu; 19 | 20 | // Dependency chain: 21 | // 22 | // this file --> proto_container_test.proto 23 | 24 | import "kudu/util/proto_container_test.proto"; 25 | 26 | // Arbitrary protobuf that has one PB dependency. 27 | message ProtoContainerTest2PB { 28 | required kudu.ProtoContainerTestPB record = 1; 29 | } 30 | -------------------------------------------------------------------------------- /src/kudu/tools/color.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | #include 20 | 21 | #include "kudu/gutil/strings/stringpiece.h" 22 | 23 | namespace kudu { 24 | namespace tools { 25 | 26 | enum class AnsiCode { 27 | RED, 28 | YELLOW, 29 | GREEN, 30 | BLUE, 31 | RESET 32 | }; 33 | 34 | std::string Color(AnsiCode color, StringPiece s); 35 | 36 | } // namespace tools 37 | } // namespace kudu 38 | -------------------------------------------------------------------------------- /src/kudu/client/hash.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #ifndef KUDU_CLIENT_HASH_H 18 | #define KUDU_CLIENT_HASH_H 19 | 20 | namespace kudu { 21 | namespace client { 22 | 23 | /// @brief: Hash algorithm types. 24 | enum HashAlgorithm { 25 | UNKNOWN_HASH = 0, 26 | MURMUR_HASH_2 = 1, 27 | CITY_HASH = 2, 28 | FAST_HASH = 3 29 | }; 30 | 31 | } // namespace client 32 | } // namespace kudu 33 | #endif // KUDU_CLIENT_HASH_H 34 | -------------------------------------------------------------------------------- /src/kudu/util/user.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #ifndef KUDU_UTIL_USER_H 18 | #define KUDU_UTIL_USER_H 19 | 20 | #include 21 | 22 | #include "kudu/util/status.h" 23 | 24 | namespace kudu { 25 | 26 | // Get current logged-in user with getpwuid_r(). 27 | // user name is written to user_name. 28 | Status GetLoggedInUser(std::string* user_name); 29 | 30 | } // namespace kudu 31 | 32 | #endif // KUDU_UTIL_USER_H 33 | -------------------------------------------------------------------------------- /src/kudu/server/pprof_path_handlers.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #ifndef KUDU_SERVER_PPROF_DEFAULT_PATH_HANDLERS_H 18 | #define KUDU_SERVER_PPROF_DEFAULT_PATH_HANDLERS_H 19 | 20 | namespace kudu { 21 | class Webserver; 22 | 23 | // Adds set of path handlers to support pprof profiling of a remote server. 24 | void AddPprofPathHandlers(Webserver* webserver); 25 | } 26 | 27 | #endif // KUDU_SERVER_PPROF_DEFAULT_PATH_HANDLERS_H 28 | -------------------------------------------------------------------------------- /src/kudu/client/symbols.map: -------------------------------------------------------------------------------- 1 | { 2 | # Symbols marked as 'local' are not exported by the DSO and thus may not 3 | # be used by client applications. 4 | local: 5 | # libunwind 6 | _U*; 7 | unw_backtrace; 8 | 9 | # libev 10 | ev_*; 11 | 12 | # zlib 13 | adler32*; 14 | crc32*; 15 | deflate*; 16 | get_crc_table; 17 | inflate*; 18 | zError; 19 | zlib*; 20 | uncompress*; 21 | 22 | # devtoolset 23 | __cxa_throw_bad_array*; 24 | 25 | # breakpad 26 | ConvertUTF*; 27 | isLegalUTF8Sequence; 28 | my_*; 29 | 30 | extern "C++" { 31 | # glog, gflags, and protobuf 32 | *google::*; 33 | fL*::FLAGS_*; 34 | gflags_mutex_namespace::*; 35 | glog_internal_namespace_::*; 36 | 37 | # breakpad 38 | google_breakpad::*; 39 | logger::write*; 40 | CreateGUID*; 41 | GUIDToString*; 42 | 43 | # crcutil 44 | crcutil::*; 45 | crcutil_interface::*; 46 | 47 | # devtoolset - the Red Hat devtoolset statically links c++17 symbols 48 | # into binaries so that the result may be executed on a system with an 49 | # older libstdc++ which doesn't include the necessary c++17 symbols. 50 | std::*; 51 | }; 52 | }; 53 | -------------------------------------------------------------------------------- /java/gradle/benchmarks.gradle: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | // This file contains common tasks and configuration for benchmarking. 19 | 20 | apply plugin: "me.champeau.gradle.jmh" 21 | 22 | // Add the JMH plugin dependencies. 23 | dependencies { 24 | jmh libs.jmhCore 25 | jmh libs.jmhGenerator 26 | } 27 | 28 | // Configure the JMH plugin. 29 | jmh { 30 | duplicateClassesStrategy = 'exclude' 31 | zip64 = true 32 | } 33 | -------------------------------------------------------------------------------- /docker/Dockerfile-files: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # This docker file is a minimal build useful for debugging 19 | # what files are being included/excluded via the .dockerignore file. 20 | 21 | # Usage 22 | # docker build -f docker/Dockerfile-files -t kudu-files --no-cache . 23 | # docker run -i -t --rm=true kudu-files /bin/bash 24 | # $ ls -als 25 | # $ du -h 26 | # $ du -sh 27 | 28 | FROM centos 29 | 30 | WORKDIR /kudu 31 | COPY . /kudu -------------------------------------------------------------------------------- /src/kudu/util/alignment.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | // 18 | // Macros for dealing with memory alignment. 19 | #ifndef KUDU_UTIL_ALIGNMENT_H 20 | #define KUDU_UTIL_ALIGNMENT_H 21 | 22 | // Round down 'x' to the nearest 'align' boundary 23 | #define KUDU_ALIGN_DOWN(x, align) ((x) & (~(align) + 1)) 24 | 25 | // Round up 'x' to the nearest 'align' boundary 26 | #define KUDU_ALIGN_UP(x, align) (((x) + ((align) - 1)) & (~(align) + 1)) 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/kudu/client/clientConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # Workaround so the generated cmake file works in older versions of 19 | # cmake 20 | if(NOT CMAKE_CURRENT_LIST_DIR) 21 | get_filename_component(CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) 22 | endif() 23 | 24 | @PACKAGE_INIT@ 25 | 26 | set_and_check(KUDU_CLIENT_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") 27 | 28 | include("${CMAKE_CURRENT_LIST_DIR}/kuduClientTargets.cmake") 29 | -------------------------------------------------------------------------------- /src/kudu/client/write_op-internal.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #ifndef KUDU_CLIENT_WRITE_OP_INTERNAL_H 18 | #define KUDU_CLIENT_WRITE_OP_INTERNAL_H 19 | 20 | #include "kudu/client/write_op.h" 21 | #include "kudu/common/wire_protocol.pb.h" 22 | 23 | namespace kudu { 24 | 25 | namespace client { 26 | 27 | RowOperationsPB_Type ToInternalWriteType(KuduWriteOperation::Type type); 28 | 29 | } // namespace client 30 | } // namespace kudu 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/kudu/master/master_runner.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | #include "kudu/util/status.h" 20 | 21 | namespace kudu { 22 | namespace master { 23 | 24 | // Adjusts the default values of some gflags for use with the master server. 25 | void SetMasterFlagDefaults(); 26 | 27 | // Initialize and start a master server. Will run until interrupted. 28 | Status RunMasterServer(); 29 | 30 | } // namespace master 31 | } // namespace kudu 32 | -------------------------------------------------------------------------------- /java/kudu-backup-tools/src/main/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDERR 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = error 28 | rootLogger.appenderRefs = stderr 29 | rootLogger.appenderRef.stderr.ref = STDERR -------------------------------------------------------------------------------- /java/kudu-subprocess/src/main/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = info 28 | rootLogger.appenderRefs = stdout 29 | rootLogger.appenderRef.stdout.ref = STDOUT 30 | -------------------------------------------------------------------------------- /src/kudu/tserver/tablet_server_runner.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | #include "kudu/util/status.h" 20 | 21 | namespace kudu { 22 | namespace tserver { 23 | 24 | // Adjusts the default values of some gflags for use with the tablet server. 25 | void SetTabletServerFlagDefaults(); 26 | 27 | // Initialize and start a tablet server. Will run until interrupted. 28 | Status RunTabletServer(); 29 | 30 | } // namespace tserver 31 | } // namespace kudu 32 | -------------------------------------------------------------------------------- /src/kudu/common/key_range.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/common/key_range.h" 19 | 20 | #include "kudu/common/common.pb.h" 21 | 22 | namespace kudu { 23 | 24 | void KeyRange::ToPB(KeyRangePB* pb) const { 25 | if (!start_key_.empty()) { 26 | pb->set_start_primary_key(start_key_); 27 | } 28 | if (!stop_key_.empty()) { 29 | pb->set_stop_primary_key(stop_key_); 30 | } 31 | pb->set_size_bytes_estimates(size_bytes_); 32 | } 33 | 34 | } // namespace kudu 35 | -------------------------------------------------------------------------------- /src/kudu/util/pb_util_test.proto: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | syntax = "proto2"; 18 | package kudu; 19 | 20 | import "kudu/util/pb_util.proto"; 21 | 22 | message TestSecurePrintingPB { 23 | optional string insecure1 = 1; 24 | optional string secure1 = 2 [(kudu.REDACT) = true]; 25 | optional string insecure2 = 3; 26 | optional string secure2 = 4 [(kudu.REDACT) = true]; 27 | repeated string repeated_secure = 5 [(kudu.REDACT) = true]; 28 | optional string insecure3 = 6; 29 | } 30 | -------------------------------------------------------------------------------- /www/api/docs.mustache: -------------------------------------------------------------------------------- 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, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | }} 19 | 20 | 21 | 22 | 23 |
24 |

Loading Swagger UI...

25 |
26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/kudu/util/cow_object.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/util/cow_object.h" 19 | 20 | using std::ostream; 21 | 22 | namespace kudu { 23 | 24 | ostream& operator<<(ostream& o, LockMode m) { 25 | switch (m) { 26 | case LockMode::READ: o << "READ"; break; 27 | case LockMode::WRITE: o << "WRITE"; break; 28 | case LockMode::RELEASED: o << "RELEASED"; break; 29 | default: o << "UNKNOWN"; break; 30 | } 31 | return o; 32 | } 33 | 34 | } // namespace kudu 35 | -------------------------------------------------------------------------------- /src/kudu/util/malloc.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #ifndef KUDU_UTIL_MALLOC_H 18 | #define KUDU_UTIL_MALLOC_H 19 | 20 | #include 21 | 22 | namespace kudu { 23 | 24 | // Simple wrapper for malloc_usable_size(). 25 | // 26 | // Really just centralizes the const_cast, as this function is often called 27 | // on const pointers (i.e. "this" in a const method). 28 | int64_t kudu_malloc_usable_size(const void* obj); 29 | 30 | } // namespace kudu 31 | 32 | #endif // KUDU_UTIL_MALLOC_H 33 | -------------------------------------------------------------------------------- /thirdparty/patches/breakpad-fread.patch: -------------------------------------------------------------------------------- 1 | commit 00f76018ccb4d27265d92a993f5443ae2a8d043c 2 | Author: Lei Zhang 3 | Date: Wed Sep 7 09:38:41 2022 -0700 4 | 5 | Fix fread() check in ExploitabilityLinux. 6 | 7 | This fread() call did not intend to always fill the buffer, so the 8 | change in https://crrev.com/c/3872234 is incorrect. Revert that one line 9 | change. 10 | 11 | Change-Id: I3fbe38fce11c24aa77b39dc229c7c5ed2a8d6960 12 | Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3879289 13 | Reviewed-by: Mike Frysinger 14 | 15 | diff --git a/src/processor/exploitability_linux.cc b/src/processor/exploitability_linux.cc 16 | index c54cb046..bc1b0b08 100644 17 | --- a/src/processor/exploitability_linux.cc 18 | +++ b/src/processor/exploitability_linux.cc 19 | @@ -522,7 +522,7 @@ bool ExploitabilityLinux::DisassembleBytes(const string& architecture, 20 | BPLOG(ERROR) << "Failed to call objdump."; 21 | return false; 22 | } 23 | - if (fread(objdump_output_buffer, 1, buffer_len, objdump_fp) != buffer_len) { 24 | + if (fread(objdump_output_buffer, 1, buffer_len, objdump_fp) <= 0) { 25 | pclose(objdump_fp); 26 | unlink(raw_bytes_tmpfile); 27 | BPLOG(ERROR) << "Failed to read objdump output."; 28 | -------------------------------------------------------------------------------- /cmake_modules/FindJwtCpp.cmake: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # Find jwt-cpp headers. 19 | # This module defines: 20 | # - JWT_CPP_INCLUDE_DIR, where to find jwt-cpp header files. 21 | # - JwtCpp_FOUND, If false, do not try to use jwt-cpp. 22 | 23 | find_path(JWT_CPP_INCLUDE_DIR jwt-cpp/jwt.h 24 | DOC "Path to the jwt-cpp header file" 25 | NO_CMAKE_SYSTEM_PATH 26 | NO_SYSTEM_ENVIRONMENT_PATH) 27 | 28 | find_package_handle_standard_args(JwtCpp REQUIRED_VARS 29 | JWT_CPP_INCLUDE_DIR) 30 | -------------------------------------------------------------------------------- /src/kudu/util/debug/trace_event_memory.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #ifndef KUDU_DEBUG_TRACE_EVENT_MEMORY_H 18 | #define KUDU_DEBUG_TRACE_EVENT_MEMORY_H 19 | 20 | // Stub for this part of chromium tracing we haven't yet 21 | // imported. 22 | // The Chromium code relies on a locally patch tcmalloc. 23 | // See 5bc71bae28ea03689dbf50fe6baa15b574319091 in the Chromium 24 | // repository. 25 | 26 | #define INTERNAL_TRACE_MEMORY(category_group, name) 27 | 28 | #endif /* KUDU_DEBUG_TRACE_EVENT_MEMORY_H */ 29 | -------------------------------------------------------------------------------- /src/kudu/util/malloc.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #include "kudu/util/malloc.h" 18 | 19 | #if defined(__linux__) 20 | #include 21 | #else 22 | #include 23 | #endif // defined(__linux__) 24 | 25 | namespace kudu { 26 | 27 | int64_t kudu_malloc_usable_size(const void* obj) { 28 | #if defined(__linux__) 29 | return malloc_usable_size(const_cast(obj)); 30 | #else 31 | return malloc_size(obj); 32 | #endif // defined(__linux__) 33 | } 34 | 35 | } // namespace kudu 36 | -------------------------------------------------------------------------------- /src/kudu/master/table_locations_cache_metrics.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #pragma once 19 | 20 | #include "kudu/gutil/ref_counted.h" 21 | #include "kudu/util/cache_metrics.h" 22 | 23 | namespace kudu { 24 | 25 | class MetricEntity; 26 | 27 | namespace master { 28 | 29 | struct TableLocationsCacheMetrics : public CacheMetrics { 30 | explicit TableLocationsCacheMetrics( 31 | const scoped_refptr& metric_entity); 32 | }; 33 | 34 | } // namespace master 35 | } // namespace kudu 36 | -------------------------------------------------------------------------------- /src/kudu/util/errno.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #ifndef KUDU_ERRNO_H 18 | #define KUDU_ERRNO_H 19 | 20 | #include 21 | #include 22 | 23 | namespace kudu { 24 | 25 | void ErrnoToCString(int err, char *buf, size_t buf_len); 26 | 27 | // Return a string representing an errno. 28 | inline static std::string ErrnoToString(int err) { 29 | char buf[512]; 30 | ErrnoToCString(err, buf, sizeof(buf)); 31 | return std::string(buf); 32 | } 33 | 34 | } // namespace kudu 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/kudu/client/error-internal.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/client/error-internal.h" 19 | 20 | #include 21 | #include 22 | 23 | #include "kudu/util/status.h" 24 | 25 | namespace kudu { 26 | namespace client { 27 | 28 | KuduError::Data::Data(std::unique_ptr failed_op, 29 | Status status) : 30 | failed_op_(std::move(failed_op)), 31 | status_(std::move(status)) { 32 | } 33 | 34 | } // namespace client 35 | } // namespace kudu 36 | -------------------------------------------------------------------------------- /src/kudu/codegen/jit_wrapper.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/codegen/jit_wrapper.h" 19 | 20 | #include 21 | 22 | #include 23 | 24 | using llvm::ExecutionEngine; 25 | using std::unique_ptr; 26 | 27 | namespace kudu { 28 | namespace codegen { 29 | 30 | JITWrapper::JITWrapper(unique_ptr owner) 31 | : owner_(std::move(owner)) {} 32 | 33 | JITWrapper::~JITWrapper() {} 34 | 35 | } // namespace codegen 36 | } // namespace kudu 37 | -------------------------------------------------------------------------------- /www/metrics.html: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | Kudu metrics gauges 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /kubernetes/helm/kudu/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # Helm Chart Definitions. 19 | apiVersion: v1 20 | description: Apache Kudu, A new addition to the open source Apache Hadoop ecosystem, Apache Kudu completes Hadoop's 21 | storage layer to enable fast analytics on fast data. 22 | name: kudu 23 | version: 1.0 24 | keywords: [apache, kudu, apache-kudu] 25 | sources: [https://github.com/apache/kudu] 26 | home: https://kudu.apache.org/ 27 | icon: https://raw.githubusercontent.com/apache/kudu/master/www/logo.png 28 | -------------------------------------------------------------------------------- /src/kudu/client/hash-internal.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #pragma once 19 | 20 | #include "kudu/client/hash.h" 21 | #include "kudu/util/hash.pb.h" 22 | 23 | namespace kudu { 24 | namespace client { 25 | 26 | // Helper functions to convert hash algorithm between client-facing and internal PB enums. 27 | kudu::HashAlgorithm ToInternalHashAlgorithm(HashAlgorithm hash_algorithm); 28 | HashAlgorithm FromInternalHashAlgorithm(kudu::HashAlgorithm hash_algorithm); 29 | 30 | } // namespace client 31 | } // namespace kudu 32 | -------------------------------------------------------------------------------- /src/kudu/consensus/opid.proto: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | syntax = "proto2"; 18 | package kudu.consensus; 19 | 20 | option java_package = "org.apache.kudu.consensus"; 21 | 22 | // An id for a generic state machine operation. Composed of the leaders' term 23 | // plus the index of the operation in that term, e.g., the th operation 24 | // of the th leader. 25 | message OpId { 26 | // The term of an operation or the leader's sequence id. 27 | required int64 term = 1; 28 | required int64 index = 2; 29 | } 30 | -------------------------------------------------------------------------------- /src/kudu/server/rpcz-path-handler.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #ifndef KUDU_SERVER_RPCZ_PATH_HANDLER_H 18 | #define KUDU_SERVER_RPCZ_PATH_HANDLER_H 19 | 20 | #include 21 | 22 | namespace kudu { 23 | 24 | namespace rpc { 25 | class Messenger; 26 | } // namespace rpc 27 | 28 | class Webserver; 29 | 30 | void AddRpczPathHandlers(const std::shared_ptr& messenger, 31 | Webserver* webserver); 32 | 33 | } // namespace kudu 34 | #endif /* KUDU_SERVER_RPCZ_PATH_HANDLER_H */ 35 | -------------------------------------------------------------------------------- /src/kudu/kserver/kserver_options.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | #include "kudu/server/server_base_options.h" 24 | #include "kudu/util/monotime.h" 25 | 26 | namespace kudu { 27 | namespace kserver { 28 | 29 | struct KuduServerOptions : public server::ServerBaseOptions { 30 | KuduServerOptions() = default; 31 | 32 | MonoDelta apply_queue_overload_threshold; 33 | }; 34 | 35 | } // namespace kserver 36 | } // namespace kudu 37 | -------------------------------------------------------------------------------- /www/logs.mustache: -------------------------------------------------------------------------------- 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, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | }}{{?raw}} 19 | INFO logs 20 | Log path is: {{logfile}} 21 | {{?log}} 22 | Showing last {{web_log_bytes}} bytes of log 23 | 24 | {{{log}}} 25 | {{/log}} 26 | {{^log}} 27 | Couldn't open INFO log file: {{logfile}} 28 | {{/log}} 29 | {{/raw}} 30 | 31 | {{^raw}} 32 |

INFO logs

33 | Log path is: {{logfile}} 34 |
35 | {{?log}} 36 | Showing last {{web_log_bytes}} bytes of log 37 | 38 |
{{log}}
39 | {{/log}} 40 | {{^log}} 41 | Couldn't open INFO log file: {{logfile}} 42 | {{/log}} 43 | {{/raw}} 44 | -------------------------------------------------------------------------------- /java/kudu-backup/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = info 28 | rootLogger.appenderRefs = stdout 29 | rootLogger.appenderRef.stdout.ref = STDOUT 30 | 31 | logger.kudu.name = org.apache.kudu 32 | logger.kudu.level = debug -------------------------------------------------------------------------------- /java/kudu-hive/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = info 28 | rootLogger.appenderRefs = stdout 29 | rootLogger.appenderRef.stdout.ref = STDOUT 30 | 31 | logger.kudu.name = org.apache.kudu 32 | logger.kudu.level = debug 33 | -------------------------------------------------------------------------------- /src/kudu/experiments/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # Everything in this module depends on test infrastructure. 19 | if (NO_TESTS) 20 | return() 21 | endif() 22 | 23 | # Disabled on macOS because it relies on sched_getcpu(). 24 | if(NOT APPLE) 25 | add_executable(rwlock-perf rwlock-perf.cc) 26 | target_link_libraries(rwlock-perf 27 | ${KUDU_MIN_TEST_LIBS} 28 | kudu_util) 29 | endif() 30 | 31 | add_executable(merge-test merge-test.cc) 32 | target_link_libraries(merge-test 33 | ${KUDU_MIN_TEST_LIBS} 34 | kudu_util) 35 | -------------------------------------------------------------------------------- /thirdparty/patches/breakpad-syscall-rsp-clobber-fix.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/third_party/lss/linux_syscall_support.h b/src/third_party/lss/linux_syscall_support.h 2 | index 129aa75..9276f56 100644 3 | --- a/src/third_party/lss/linux_syscall_support.h 4 | +++ b/src/third_party/lss/linux_syscall_support.h 5 | @@ -1964,7 +1964,7 @@ struct kernel_statfs { 6 | __asm__ volatile(LSS_ENTRYPOINT \ 7 | : "=a" (__res) \ 8 | : "0" (__NR_##name) \ 9 | - : "esp", "memory"); \ 10 | + : "memory"); \ 11 | LSS_RETURN(type,__res); \ 12 | } 13 | #undef _syscall1 14 | @@ -2405,7 +2405,7 @@ struct kernel_statfs { 15 | "d"(LSS_SYSCALL_ARG(parent_tidptr)), 16 | "r"(LSS_SYSCALL_ARG(newtls)), 17 | "r"(LSS_SYSCALL_ARG(child_tidptr)) 18 | - : "rsp", "memory", "r8", "r10", "r11", "rcx"); 19 | + : "memory", "r8", "r10", "r11", "rcx"); 20 | } 21 | LSS_RETURN(int, __res); 22 | } 23 | -------------------------------------------------------------------------------- /java/kudu-backup-common/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = info 28 | rootLogger.appenderRefs = stdout 29 | rootLogger.appenderRef.stdout.ref = STDOUT 30 | 31 | logger.kudu.name = org.apache.kudu 32 | logger.kudu.level = debug -------------------------------------------------------------------------------- /java/kudu-backup-tools/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = info 28 | rootLogger.appenderRefs = stdout 29 | rootLogger.appenderRef.stdout.ref = STDOUT 30 | 31 | logger.kudu.name = org.apache.kudu 32 | logger.kudu.level = debug -------------------------------------------------------------------------------- /java/kudu-client/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = info 28 | rootLogger.appenderRefs = stdout 29 | rootLogger.appenderRef.stdout.ref = STDOUT 30 | 31 | logger.kudu.name = org.apache.kudu 32 | logger.kudu.level = debug 33 | -------------------------------------------------------------------------------- /java/kudu-spark/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = info 28 | rootLogger.appenderRefs = stdout 29 | rootLogger.appenderRef.stdout.ref = STDOUT 30 | 31 | logger.kudu.name = org.apache.kudu 32 | logger.kudu.level = debug 33 | -------------------------------------------------------------------------------- /java/kudu-replication/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = info 28 | rootLogger.appenderRefs = stdout 29 | rootLogger.appenderRef.stdout.ref = STDOUT 30 | 31 | logger.kudu.name = org.apache.kudu 32 | logger.kudu.level = debug 33 | -------------------------------------------------------------------------------- /java/kudu-spark-tools/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = info 28 | rootLogger.appenderRefs = stdout 29 | rootLogger.appenderRef.stdout.ref = STDOUT 30 | 31 | logger.kudu.name = org.apache.kudu 32 | logger.kudu.level = debug 33 | -------------------------------------------------------------------------------- /java/kudu-subprocess/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = info 28 | rootLogger.appenderRefs = stdout 29 | rootLogger.appenderRef.stdout.ref = STDOUT 30 | 31 | logger.kudu.name = org.apache.kudu 32 | logger.kudu.level = debug 33 | -------------------------------------------------------------------------------- /java/kudu-test-utils/src/test/resources/log4j2.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | status = error 19 | name = PropertiesConfig 20 | appenders = console 21 | 22 | appender.console.type = Console 23 | appender.console.name = STDOUT 24 | appender.console.layout.type = PatternLayout 25 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 26 | 27 | rootLogger.level = info 28 | rootLogger.appenderRefs = stdout 29 | rootLogger.appenderRef.stdout.ref = STDOUT 30 | 31 | logger.kudu.name = org.apache.kudu 32 | logger.kudu.level = debug 33 | -------------------------------------------------------------------------------- /src/kudu/client/row_result.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #ifndef KUDU_CLIENT_ROW_RESULT_H 18 | #define KUDU_CLIENT_ROW_RESULT_H 19 | 20 | #include "kudu/client/scan_batch.h" 21 | 22 | namespace kudu { 23 | namespace client { 24 | 25 | /// @deprecated Kudu 0.7.0 renamed KuduRowResult to KuduScanBatch::RowPtr. 26 | /// The newer name is clearer that the row result's lifetime is tied to the 27 | /// lifetime of a batch. 28 | typedef KuduScanBatch::RowPtr KuduRowResult; 29 | 30 | } // namespace client 31 | } // namespace kudu 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /java/kudu-jepsen/src/test/resources/kudu.flags: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # This overrides all flags in a flag file. 19 | # 20 | # The block cache capacity is set to not exceed 1/2 of the effective 21 | # memory pressure threshold on smaller machines: current Kudu Jepsen 22 | # tests do not require a lot of memory of block cache capacity around. 23 | # An alternative approach would be replacing that with the 24 | # --force_block_cache_capacity flag. 25 | --unlock_experimental_flags 26 | --unlock_unsafe_flags 27 | --block_cache_capacity_mb=128 28 | --logtostderr 29 | -------------------------------------------------------------------------------- /src/kudu/client/replica-internal.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/client/replica-internal.h" 19 | 20 | #include 21 | #include 22 | 23 | #include "kudu/client/client.h" 24 | 25 | namespace kudu { 26 | namespace client { 27 | 28 | using std::unique_ptr; 29 | 30 | KuduReplica::Data::Data(bool is_leader, bool is_voter, unique_ptr ts) 31 | : is_leader_(is_leader), 32 | is_voter_(is_voter), 33 | ts_(std::move(ts)) { 34 | } 35 | 36 | } // namespace client 37 | } // namespace kudu 38 | -------------------------------------------------------------------------------- /java/kudu-jepsen/src/test/resources/ntp.conf.common: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | tinker panic 0 19 | enable kernel 20 | enable ntp 21 | enable stats 22 | statistics loopstats peerstats clockstats sysstats 23 | filegen loopstats file loopstats type day enable 24 | filegen peerstats file peerstats type day enable 25 | filegen clockstats file clockstats type day enable 26 | filegen sysstats file sysstats type day enable 27 | logconfig =syncall +clockall +sysall +peerall 28 | logfile /var/log/ntpd.log 29 | statsdir /var/log/ntpstats/ 30 | driftfile /var/lib/ntp/ntp.drift 31 | -------------------------------------------------------------------------------- /kubernetes/helm/kudu-rolebinding.yaml: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # Role-based access control (RBAC) definitions. 19 | 20 | apiVersion: v1 21 | kind: ServiceAccount 22 | metadata: 23 | name: kudu-helm 24 | namespace: apache-kudu 25 | --- 26 | apiVersion: rbac.authorization.k8s.io/v1beta1 27 | kind: ClusterRoleBinding 28 | metadata: 29 | name: kudu-helm 30 | roleRef: 31 | apiGroup: rbac.authorization.k8s.io 32 | kind: ClusterRole 33 | name: cluster-admin 34 | subjects: 35 | - kind: ServiceAccount 36 | name: kudu-helm 37 | namespace: apache-kudu 38 | -------------------------------------------------------------------------------- /src/kudu/util/hexdump.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #ifndef KUDU_UTIL_HEXDUMP_H 18 | #define KUDU_UTIL_HEXDUMP_H 19 | 20 | #include 21 | 22 | namespace kudu { 23 | 24 | class Slice; 25 | 26 | // Generate an 'xxd'-style hexdump of the given slice. This should only be used 27 | // for debugging, as the format is subject to change and it has not been 28 | // implemented for speed. 29 | // 30 | // The returned string will be redacted if redaction is enabled. 31 | std::string HexDump(const Slice &slice); 32 | 33 | } // namespace kudu 34 | #endif 35 | -------------------------------------------------------------------------------- /src/kudu/util/ttl_cache_metrics.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #pragma once 19 | 20 | #include "kudu/gutil/ref_counted.h" 21 | #include "kudu/util/cache_metrics.h" 22 | 23 | namespace kudu { 24 | 25 | class MetricEntity; 26 | 27 | struct TTLCacheMetrics : public CacheMetrics { 28 | // Number of cache hits that found an expired entry. 29 | scoped_refptr cache_hits_expired; 30 | // Number of evicted entries that had already been expired upon eviction. 31 | scoped_refptr evictions_expired; 32 | }; 33 | 34 | } // namespace kudu 35 | -------------------------------------------------------------------------------- /src/kudu/codegen/precompiled.ll.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #ifndef KUDU_CODEGEN_PRECOMPILED_LL_H 19 | #define KUDU_CODEGEN_PRECOMPILED_LL_H 20 | 21 | namespace kudu { 22 | namespace codegen { 23 | 24 | // Declare the precompiled LLVM bitcode data. The actual data is provided by a 25 | // cc file generated at build time using xxd. See codegen/CMakeLists.txt. 26 | extern const char precompiled_ll_data[]; 27 | extern const unsigned int precompiled_ll_len; 28 | 29 | } // namespace codegen 30 | } // namespace kudu 31 | 32 | #endif // KUDU_CODEGEN_PRECOMPILED_LL_H 33 | -------------------------------------------------------------------------------- /src/kudu/util/memory/overwrite.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #ifndef KUDU_MEMORY_OVERWRITE_H 18 | #define KUDU_MEMORY_OVERWRITE_H 19 | 20 | #include 21 | 22 | #include "kudu/gutil/strings/stringpiece.h" 23 | 24 | namespace kudu { 25 | 26 | // Overwrite 'p' with enough repetitions of 'pattern' to fill 'len' 27 | // bytes. This is optimized at -O3 even in debug builds, so is 28 | // reasonably efficient to use. 29 | void OverwriteWithPattern(char* p, size_t len, StringPiece pattern); 30 | 31 | } // namespace kudu 32 | #endif /* KUDU_MEMORY_OVERWRITE_H */ 33 | 34 | -------------------------------------------------------------------------------- /java/kudu-backup/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 24 | 25 | %d{HH:mm:ss.SSS} [%level - %thread] %logger{36} - %msg%n 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /thirdparty/patches/llvm-iwyu-718e69875.patch: -------------------------------------------------------------------------------- 1 | commit 718e6987556d765425df63cc114cbd3fb021c917 2 | Author: Kim Gräsman 3 | Date: Sat Jul 24 14:27:03 2021 +0200 4 | 5 | Link with all target libraries 6 | 7 | In the parent commit, I forgot to update the build so that include-what-you-use 8 | links with all targets, which led to link failures for builds against LLVM build 9 | trees (as opposed to the Debian packages). 10 | 11 | While troubleshooting this, I found a patch by @Romain-Geissler-1A that I had 12 | previously misunderstood/overlooked: 13 | https://github.com/include-what-you-use/include-what-you-use/pull/854#issuecomment-732487734 14 | 15 | Borrowing the link dependencies from that patch to complete my accidental 16 | plagiarism fixes the build again. 17 | 18 | diff --git a/tools/clang/tools/include-what-you-use/CMakeLists.txt b/tools/clang/tools/include-what-you-use/CMakeLists.txt 19 | index e1b03f3..0a0d683 100644 20 | --- a/tools/clang/tools/include-what-you-use/CMakeLists.txt 21 | +++ b/tools/clang/tools/include-what-you-use/CMakeLists.txt 22 | @@ -68,9 +68,9 @@ endif() 23 | set(LLVM_LINK_COMPONENTS 24 | Option 25 | Support 26 | - X86AsmParser 27 | - X86Desc 28 | - X86Info 29 | + AllTargetsAsmParsers 30 | + AllTargetsDescs 31 | + AllTargetsInfos 32 | ) 33 | 34 | add_llvm_executable(include-what-you-use 35 | -------------------------------------------------------------------------------- /src/kudu/client/tablet-internal.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | #include "kudu/client/client.h" 23 | #include "kudu/gutil/macros.h" 24 | 25 | namespace kudu { 26 | namespace client { 27 | 28 | class KuduTablet::Data { 29 | public: 30 | Data(std::string id, std::vector replicas); 31 | ~Data(); 32 | 33 | const std::string id_; 34 | std::vector replicas_; 35 | 36 | DISALLOW_COPY_AND_ASSIGN(Data); 37 | }; 38 | 39 | } // namespace client 40 | } // namespace kudu 41 | -------------------------------------------------------------------------------- /src/kudu/util/version_info.proto: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | syntax = "proto2"; 18 | package kudu; 19 | 20 | option java_package = "org.apache.kudu"; 21 | 22 | // Information about the build environment, configuration, etc. 23 | message VersionInfoPB { 24 | optional string git_hash = 1; 25 | optional string build_hostname = 2; 26 | optional string build_timestamp = 3; 27 | optional string build_username = 4; 28 | optional bool build_clean_repo = 5; 29 | optional string build_id = 6; 30 | optional string build_type = 7; 31 | optional string version_string = 8; 32 | } 33 | -------------------------------------------------------------------------------- /src/kudu/server/tracing_path_handlers.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | #include "kudu/gutil/macros.h" 20 | 21 | namespace kudu { 22 | 23 | class Webserver; 24 | 25 | namespace server { 26 | 27 | // Web handlers for Chromium tracing. 28 | // These handlers provide AJAX endpoints for /tracing.html provided by 29 | // the trace-viewer package. 30 | class TracingPathHandlers { 31 | public: 32 | static void RegisterHandlers(Webserver* server); 33 | 34 | DISALLOW_IMPLICIT_CONSTRUCTORS(TracingPathHandlers); 35 | }; 36 | 37 | } // namespace server 38 | } // namespace kudu 39 | -------------------------------------------------------------------------------- /cmake_modules/FindCURL.cmake: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | find_path(CURL_INCLUDE_DIR curl/curl.h 19 | # Don't accidentally pick up CURL elsewhere (i.e. somewhere not in thirdparty) 20 | NO_CMAKE_SYSTEM_PATH 21 | NO_SYSTEM_ENVIRONMENT_PATH) 22 | find_library(CURL_STATIC_LIB libcurl.a 23 | NO_CMAKE_SYSTEM_PATH 24 | NO_SYSTEM_ENVIRONMENT_PATH) 25 | find_library(CURL_SHARED_LIB curl 26 | NO_CMAKE_SYSTEM_PATH 27 | NO_SYSTEM_ENVIRONMENT_PATH) 28 | 29 | include(FindPackageHandleStandardArgs) 30 | find_package_handle_standard_args(CURL REQUIRED_VARS 31 | CURL_STATIC_LIB CURL_SHARED_LIB CURL_INCLUDE_DIR) 32 | -------------------------------------------------------------------------------- /examples/scala/sbt-int-test-example/src/it/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 24 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /java/kudu-client/src/main/java/org/apache/kudu/client/RangePartitionBound.java: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | package org.apache.kudu.client; 19 | 20 | import org.apache.yetus.audience.InterfaceAudience; 21 | import org.apache.yetus.audience.InterfaceStability; 22 | 23 | /** Specifies whether a range partition bound is inclusive or exclusive. */ 24 | @InterfaceAudience.Public 25 | @InterfaceStability.Evolving 26 | public enum RangePartitionBound { 27 | /** An exclusive range partition bound. */ 28 | EXCLUSIVE_BOUND, 29 | /** An inclusive range partition bound. */ 30 | INCLUSIVE_BOUND, 31 | } 32 | -------------------------------------------------------------------------------- /java/settings.gradle: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | // This file contains the configuration of the project hierarchy. 19 | // Mainly we just define what subprojects are in the build. 20 | 21 | rootProject.name = "kudu-parent" 22 | include "kudu-backup" 23 | include "kudu-backup-common" 24 | include "kudu-backup-tools" 25 | include "kudu-client" 26 | include "kudu-flatbuffers" 27 | include "kudu-hive" 28 | include "kudu-jepsen" 29 | include "kudu-proto" 30 | include 'kudu-replication' 31 | include "kudu-spark" 32 | include "kudu-spark-tools" 33 | include "kudu-subprocess" 34 | include "kudu-test-utils" 35 | -------------------------------------------------------------------------------- /src/kudu/rpc/remote_user.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/rpc/remote_user.h" 19 | 20 | #include 21 | 22 | #include "kudu/gutil/strings/substitute.h" 23 | 24 | using std::string; 25 | 26 | namespace kudu { 27 | namespace rpc { 28 | 29 | string RemoteUser::ToString() const { 30 | string ret; 31 | strings::SubstituteAndAppend(&ret, "{username='$0'", username_); 32 | if (principal_) { 33 | strings::SubstituteAndAppend(&ret, ", principal='$0'", *principal_); 34 | } 35 | ret.append("}"); 36 | return ret; 37 | } 38 | 39 | } // namespace rpc 40 | } // namespace kudu 41 | -------------------------------------------------------------------------------- /src/kudu/client/tablet_server-internal.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/client/tablet_server-internal.h" 19 | 20 | #include 21 | #include 22 | 23 | #include "kudu/util/net/net_util.h" 24 | 25 | using std::string; 26 | 27 | namespace kudu { 28 | namespace client { 29 | 30 | KuduTabletServer::Data::Data(string uuid, HostPort hp, string location) 31 | : uuid_(std::move(uuid)), 32 | location_(std::move(location)), 33 | hp_(std::move(hp)) { 34 | } 35 | 36 | KuduTabletServer::Data::~Data() { 37 | } 38 | 39 | } // namespace client 40 | } // namespace kudu 41 | -------------------------------------------------------------------------------- /thirdparty/patches/llvm-chrono-duration-00.patch: -------------------------------------------------------------------------------- 1 | commit eaadc451566f0d1aec873b7fe8b1a9dc3a7b29bd 2 | Author: Tiago Macarios 3 | Date: Thu Feb 3 10:23:15 2022 -0500 4 | 5 | [libc++] Fix chrono::duration constructor constraint 6 | 7 | As per [time.duration.cons]/1, the constructor constraint should be on 8 | const Rep2&. As it is now the code will fail to compile in certain 9 | cases, for example (https://godbolt.org/z/c7fPrcTYM): 10 | 11 | struct S{ 12 | operator int() const&& noexcept = delete; 13 | operator int() const& noexcept; 14 | }; 15 | 16 | const S &fun(); 17 | 18 | auto k = std::chrono::microseconds{fun()}; 19 | 20 | Differential Revision: https://reviews.llvm.org/D118902 21 | 22 | diff --git a/projects/libcxx/include/chrono b/projects/libcxx/include/chrono 23 | index 24801772ec5d..b7d88cb52ea8 100644 24 | --- a/projects/libcxx/include/chrono 25 | +++ b/projects/libcxx/include/chrono 26 | @@ -1073,7 +1073,7 @@ public: 27 | explicit duration(const _Rep2& __r, 28 | typename enable_if 29 | < 30 | - is_convertible<_Rep2, rep>::value && 31 | + is_convertible::value && 32 | (treat_as_floating_point::value || 33 | !treat_as_floating_point<_Rep2>::value) 34 | >::type* = 0) 35 | -------------------------------------------------------------------------------- /src/kudu/common/id_mapping.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/common/id_mapping.h" 19 | 20 | #include "kudu/util/malloc.h" 21 | 22 | namespace kudu { 23 | 24 | const int IdMapping::kNoEntry = -1; 25 | 26 | size_t IdMapping::memory_footprint_excluding_this() const { 27 | if (entries_.capacity() > 0) { 28 | return kudu_malloc_usable_size(entries_.data()); 29 | } else { 30 | return 0; 31 | } 32 | } 33 | 34 | size_t IdMapping::memory_footprint_including_this() const { 35 | return kudu_malloc_usable_size(this) + memory_footprint_excluding_this(); 36 | } 37 | 38 | } // namespace kudu 39 | -------------------------------------------------------------------------------- /java/kudu-client/src/main/java/org/apache/kudu/client/DeleteTableResponse.java: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | package org.apache.kudu.client; 19 | 20 | import org.apache.yetus.audience.InterfaceAudience; 21 | import org.apache.yetus.audience.InterfaceStability; 22 | 23 | @InterfaceAudience.Public 24 | @InterfaceStability.Evolving 25 | public class DeleteTableResponse extends KuduRpcResponse { 26 | 27 | /** 28 | * @param elapsedMillis Time in milliseconds since RPC creation to now. 29 | */ 30 | DeleteTableResponse(long elapsedMillis, String tsUUID) { 31 | super(elapsedMillis, tsUUID); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/kudu/gutil/arm_instruction_set_select.h: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. 2 | // All Rights Reserved. 3 | // 4 | // 5 | // Generalizes the plethora of ARM flavors available to an easier to manage set 6 | // Defs reference is at https://wiki.edubuntu.org/ARM/Thumb2PortingHowto 7 | 8 | #ifndef ARM_INSTRUCTION_SET_SELECT_H_ 9 | #define ARM_INSTRUCTION_SET_SELECT_H_ 10 | 11 | #if defined(__ARM_ARCH_7__) || \ 12 | defined(__ARM_ARCH_7R__) || \ 13 | defined(__ARM_ARCH_7A__) 14 | # define ARMV7 1 15 | #endif 16 | 17 | #if defined(ARMV7) || \ 18 | defined(__ARM_ARCH_6__) || \ 19 | defined(__ARM_ARCH_6J__) || \ 20 | defined(__ARM_ARCH_6K__) || \ 21 | defined(__ARM_ARCH_6Z__) || \ 22 | defined(__ARM_ARCH_6T2__) || \ 23 | defined(__ARM_ARCH_6ZK__) 24 | # define ARMV6 1 25 | #endif 26 | 27 | #if defined(ARMV6) || \ 28 | defined(__ARM_ARCH_5T__) || \ 29 | defined(__ARM_ARCH_5E__) || \ 30 | defined(__ARM_ARCH_5TE__) || \ 31 | defined(__ARM_ARCH_5TEJ__) 32 | # define ARMV5 1 33 | #endif 34 | 35 | #if defined(ARMV5) || \ 36 | defined(__ARM_ARCH_4__) || \ 37 | defined(__ARM_ARCH_4T__) 38 | # define ARMV4 1 39 | #endif 40 | 41 | #if defined(ARMV4) || \ 42 | defined(__ARM_ARCH_3__) || \ 43 | defined(__ARM_ARCH_3M__) 44 | # define ARMV3 1 45 | #endif 46 | 47 | #if defined(ARMV3) || \ 48 | defined(__ARM_ARCH_2__) 49 | # define ARMV2 1 50 | #endif 51 | 52 | #endif // ARM_INSTRUCTION_SET_SELECT_H_ 53 | -------------------------------------------------------------------------------- /src/kudu/util/proto_container_test3.proto: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | syntax = "proto2"; 18 | package kudu; 19 | 20 | // Dependency chain: 21 | // 22 | // this file --> proto_container_test.proto 23 | // --> proto_container_test2.proto --> proto_container_test.proto 24 | 25 | import "kudu/util/proto_container_test.proto"; 26 | import "kudu/util/proto_container_test2.proto"; 27 | 28 | // Arbitrary protobuf has two PB dependencies. 29 | // dependency. 30 | message ProtoContainerTest3PB { 31 | required kudu.ProtoContainerTestPB record_one = 1; 32 | required kudu.ProtoContainerTest2PB record_two = 2; 33 | } 34 | -------------------------------------------------------------------------------- /src/kudu/util/test_util_prod.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | // Test-related utility methods that can be called from non-test 19 | // code. This module is part of the 'util' module and is built into 20 | // all binaries, not just tests, whereas 'test_util.cc' is linked 21 | // only into test binaries. 22 | 23 | #pragma once 24 | 25 | namespace kudu { 26 | 27 | // Return true if the current binary is a gtest. More specifically, 28 | // returns true if the 'test_util.cc' module has been linked in 29 | // (either dynamically or statically) to the running process. 30 | bool IsGTest(); 31 | 32 | } // namespace kudu 33 | -------------------------------------------------------------------------------- /thirdparty/patches/squeasel-tls-openssl10x.patch: -------------------------------------------------------------------------------- 1 | From 698e5c1d3c82d52b41890753314d7c4af22050ae Mon Sep 17 00:00:00 2001 2 | From: Abhishek Chennaka 3 | Date: Wed, 20 Aug 2025 14:05:23 -0700 4 | Subject: [PATCH] Exclude SSL_CTX_set_ciphersuites call for OpenSSL 1.0.x 5 | 6 | --- 7 | squeasel.c | 2 ++ 8 | 1 file changed, 2 insertions(+) 9 | 10 | diff --git a/squeasel.c b/squeasel.c 11 | index c38c52e..fdd6375 100644 12 | --- a/squeasel.c 13 | +++ b/squeasel.c 14 | @@ -3983,6 +3983,7 @@ static int set_ssl_option(struct sq_context *ctx) { 15 | // non-empty list of default TLSv1.3 ciphers when given an empty list of 16 | // TLSv1.2 ciphers, and SSL_CTX_set_ciphersuites() would allow an empty set 17 | // of TLSv1.3 ciphers in a subsequent call. 18 | +#if OPENSSL_VERSION_NUMBER >= 0x10101000L 19 | if (ctx->config[SSL_CIPHERSUITES] != NULL) { 20 | if (SSL_CTX_set_ciphersuites(ctx->ssl_ctx, ctx->config[SSL_CIPHERSUITES]) != 1) { 21 | cry(fc(ctx), "SSL_CTX_set_ciphersuites: error setting ciphers (%s): %s", 22 | @@ -3990,6 +3991,7 @@ static int set_ssl_option(struct sq_context *ctx) { 23 | return 0; 24 | } 25 | } 26 | +#endif 27 | if (ctx->config[SSL_CIPHERS] != NULL) { 28 | if (SSL_CTX_set_cipher_list(ctx->ssl_ctx, ctx->config[SSL_CIPHERS]) != 1) { 29 | cry(fc(ctx), "SSL_CTX_set_cipher_list: error setting ciphers (%s): %s", 30 | -- 31 | 1.8.3.1 32 | 33 | -------------------------------------------------------------------------------- /src/kudu/util/int128_util.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #pragma once 19 | 20 | #include "kudu/util/int128.h" 21 | 22 | #include 23 | #include 24 | 25 | #include "kudu/gutil/strings/numbers.h" 26 | 27 | namespace std { 28 | 29 | // Support the << operator on int128_t and uint128_t types. 30 | // 31 | inline std::ostream& operator<<(std::ostream& os, const __int128& val) { 32 | os << SimpleItoa(val); 33 | return os; 34 | } 35 | inline std::ostream& operator<<(std::ostream& os, const unsigned __int128& val) { 36 | os << SimpleItoa(val); 37 | return os; 38 | } 39 | 40 | } // namespace std 41 | -------------------------------------------------------------------------------- /java/kudu-replication/src/test/resources/log4j2-test.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # Override Flink's log4j2-test.properties that sets rootLogger.level = OFF 19 | 20 | status = error 21 | name = PropertiesConfig 22 | appenders = console 23 | 24 | appender.console.type = Console 25 | appender.console.name = STDOUT 26 | appender.console.layout.type = PatternLayout 27 | appender.console.layout.pattern = %d{HH:mm:ss.SSS} [%p - %t] (%F:%L) %m%n 28 | 29 | rootLogger.level = info 30 | rootLogger.appenderRefs = stdout 31 | rootLogger.appenderRef.stdout.ref = STDOUT 32 | 33 | logger.kudu.name = org.apache.kudu 34 | logger.kudu.level = debug -------------------------------------------------------------------------------- /src/kudu/client/replica-internal.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | #include 20 | 21 | #include "kudu/client/client.h" 22 | #include "kudu/gutil/macros.h" 23 | 24 | namespace kudu { 25 | namespace client { 26 | 27 | class KuduReplica::Data { 28 | public: 29 | Data(bool is_leader, bool is_voter, std::unique_ptr ts); 30 | ~Data() = default; 31 | 32 | const bool is_leader_; 33 | const bool is_voter_; 34 | const std::unique_ptr ts_; 35 | 36 | private: 37 | DISALLOW_COPY_AND_ASSIGN(Data); 38 | }; 39 | 40 | } // namespace client 41 | } // namespace kudu 42 | -------------------------------------------------------------------------------- /www/dashboards.mustache: -------------------------------------------------------------------------------- 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, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | }} 19 | 20 |

Dashboards

21 | 22 | 23 | 25 | 26 | 27 |
DashboardDescription
ScansList of currently running and recently completed scans.
TransactionsList of transactions that are currently running.
Maintenance ManagerList of operations that are currently running and those that are registered.
28 | -------------------------------------------------------------------------------- /src/kudu/client/tablet-internal.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/client/tablet-internal.h" 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #include "kudu/gutil/stl_util.h" 25 | 26 | using std::string; 27 | using std::vector; 28 | 29 | namespace kudu { 30 | namespace client { 31 | 32 | KuduTablet::Data::Data(string id, vector replicas) 33 | : id_(std::move(id)), 34 | replicas_(std::move(replicas)) { 35 | } 36 | 37 | KuduTablet::Data::~Data() { 38 | STLDeleteElements(&replicas_); 39 | } 40 | 41 | } // namespace client 42 | } // namespace kudu 43 | -------------------------------------------------------------------------------- /cmake_modules/FindKerberos.cmake: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | # Find the native Kerberos includes and library 19 | # 20 | # KERBEROS_INCLUDE_DIR - Where to find krb5.h, etc. 21 | # KERBEROS_LIBRARY - List of libraries when using krb5. 22 | # KERBEROS_FOUND - True if krb5 found. 23 | 24 | find_path(KERBEROS_INCLUDE_DIR krb5.h) 25 | find_library(KERBEROS_LIBRARY NAMES krb5) 26 | 27 | # handle the QUIETLY and REQUIRED arguments and set KERBEROS_FOUND to TRUE if 28 | # all listed variables are TRUE 29 | include(FindPackageHandleStandardArgs) 30 | find_package_handle_standard_args(Kerberos DEFAULT_MSG KERBEROS_LIBRARY KERBEROS_INCLUDE_DIR) 31 | -------------------------------------------------------------------------------- /java/kudu-client/src/main/java/org/apache/kudu/client/RecallDeletedTableResponse.java: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | package org.apache.kudu.client; 19 | 20 | import org.apache.yetus.audience.InterfaceAudience; 21 | import org.apache.yetus.audience.InterfaceStability; 22 | 23 | @InterfaceAudience.Public 24 | @InterfaceStability.Evolving 25 | public class RecallDeletedTableResponse extends KuduRpcResponse { 26 | 27 | /** 28 | * @param elapsedMillis Time in milliseconds since RPC creation to now. 29 | */ 30 | RecallDeletedTableResponse(long elapsedMillis, String tsUUID) { 31 | super(elapsedMillis, tsUUID); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /java/kudu-client/src/main/java/org/apache/kudu/client/Upsert.java: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | package org.apache.kudu.client; 19 | 20 | import org.apache.yetus.audience.InterfaceAudience; 21 | import org.apache.yetus.audience.InterfaceStability; 22 | 23 | /** 24 | * Represents a single row upsert. Instances of this class should not be reused. 25 | */ 26 | @InterfaceAudience.Public 27 | @InterfaceStability.Evolving 28 | public class Upsert extends Operation { 29 | 30 | Upsert(KuduTable table) { 31 | super(table); 32 | } 33 | 34 | @Override 35 | ChangeType getChangeType() { 36 | return ChangeType.UPSERT; 37 | } 38 | } -------------------------------------------------------------------------------- /src/kudu/server/webui_util.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | #pragma once 18 | 19 | #include 20 | 21 | template 22 | class scoped_refptr; 23 | 24 | namespace kudu { 25 | 26 | class EasyJson; 27 | class Schema; 28 | class MonitoredTask; 29 | 30 | // Appends a JSON array describing 'schema' to 'output', under the key "columns". 31 | void SchemaToJson(const Schema& schema, EasyJson* output); 32 | 33 | // Appends a JSON array describing the tasks in 'tasks' to 'output', under the key "tasks". 34 | void TaskListToJson(const std::vector>& tasks, EasyJson* output); 35 | 36 | } // namespace kudu 37 | -------------------------------------------------------------------------------- /src/kudu/util/init.h: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #pragma once 19 | 20 | #include "kudu/gutil/port.h" 21 | #include "kudu/util/status.h" 22 | 23 | namespace kudu { 24 | 25 | // Return a NotSupported Status if the current CPU does not support the CPU flags 26 | // required for Kudu. 27 | Status CheckCPUFlags() WARN_UNUSED_RESULT; 28 | 29 | // Initialize Kudu, checking that the platform we are running on is supported, 30 | // etc. Returns non-OK status if we fail to init. Calls abort() if it turns out 31 | // that at least one of the standard descriptors is not open. 32 | Status InitKudu() WARN_UNUSED_RESULT; 33 | 34 | } // namespace kudu 35 | -------------------------------------------------------------------------------- /java/kudu-subprocess/src/main/java/org/apache/kudu/subprocess/log/LoggingTestMain.java: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | package org.apache.kudu.subprocess.log; 19 | 20 | import org.apache.yetus.audience.InterfaceAudience; 21 | import org.slf4j.Logger; 22 | import org.slf4j.LoggerFactory; 23 | 24 | @InterfaceAudience.Private 25 | class LoggingTestMain { 26 | private static final Logger logger = LoggerFactory.getLogger(LoggingTestMain.class); 27 | 28 | public static void main(String[] args) throws Exception { 29 | for (int i = 0; i < 100000; i++) { 30 | logger.debug("This is a test log message number: " + i); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/kudu/scripts/si_vec.R: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | 18 | si_num <- function (x) { 19 | 20 | if (!is.na(x)) { 21 | if (x >= 1e9) { 22 | rem <- format(x/1e9, digits=3) 23 | rem <- append(rem, "B"); 24 | } else if (x >= 1e6) { 25 | rem <- format(x/1e6, digits=3) 26 | rem <- append(rem, "M"); 27 | } else if (x > 1e3) { 28 | rem <- format(x/1e3, digits=3) 29 | rem <- append(rem, "K"); 30 | } 31 | else { 32 | return(x); 33 | } 34 | 35 | return(paste(rem, sep="", collapse="")); 36 | } 37 | else return(NA); 38 | } 39 | 40 | si_vec <- function(x) { 41 | sapply(x, FUN=si_num); 42 | } 43 | 44 | -------------------------------------------------------------------------------- /java/kudu-client/src/main/java/org/apache/kudu/client/Insert.java: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | package org.apache.kudu.client; 19 | 20 | import org.apache.yetus.audience.InterfaceAudience; 21 | import org.apache.yetus.audience.InterfaceStability; 22 | 23 | /** 24 | * Represents a single row insert. 25 | * Instances of this class should not be reused. 26 | */ 27 | @InterfaceAudience.Public 28 | @InterfaceStability.Evolving 29 | public class Insert extends Operation { 30 | 31 | Insert(KuduTable table) { 32 | super(table); 33 | } 34 | 35 | @Override 36 | ChangeType getChangeType() { 37 | return ChangeType.INSERT; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /thirdparty/patches/libunwind-trace-cache-destructor.patch: -------------------------------------------------------------------------------- 1 | commit 17df56c50e9bacebeabe69d0cad35b3247163f03 2 | Author: Todd Lipcon 3 | Date: Mon Mar 26 17:06:51 2018 -0700 4 | 5 | trace_cache: free on second-to-last destructor invocation 6 | 7 | Freeing a trace cache requires acquiring a mutex, and when running in 8 | ThreadSanitizer, TSAN itself unhooks from a thread in the last 9 | destructor iteration. So, if we try to free the trace cache in the last 10 | destructor iteration, we end up crashing TSAN because the mutex 11 | acquisition attempts to use already-destructed TSAN context info 12 | for the thread. 13 | 14 | diff --git a/src/x86_64/Gtrace.c b/src/x86_64/Gtrace.c 15 | index 7412271..6cd8aee 100644 16 | --- a/src/x86_64/Gtrace.c 17 | +++ b/src/x86_64/Gtrace.c 18 | @@ -58,12 +58,12 @@ static void 19 | trace_cache_free (void *arg) 20 | { 21 | unw_trace_cache_t *cache = arg; 22 | - if (++cache->dtor_count < PTHREAD_DESTRUCTOR_ITERATIONS) 23 | + if (++cache->dtor_count < PTHREAD_DESTRUCTOR_ITERATIONS - 1) 24 | { 25 | /* Not yet our turn to get destroyed. Re-install ourselves into the key. */ 26 | pthread_setspecific(trace_cache_key, cache); 27 | Debug(5, "delayed freeing cache %p (%zx to go)\n", cache, 28 | - PTHREAD_DESTRUCTOR_ITERATIONS - cache->dtor_count); 29 | + PTHREAD_DESTRUCTOR_ITERATIONS - 1 - cache->dtor_count); 30 | return; 31 | } 32 | tls_cache_destroyed = 1; 33 | -------------------------------------------------------------------------------- /java/kudu-client/src/main/java/org/apache/kudu/client/AbortTransactionResponse.java: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | package org.apache.kudu.client; 19 | 20 | import com.google.common.base.Preconditions; 21 | import org.apache.yetus.audience.InterfaceAudience; 22 | 23 | @InterfaceAudience.Private 24 | public class AbortTransactionResponse extends KuduRpcResponse { 25 | /** 26 | * @param elapsedMillis time in milliseconds since RPC creation to now 27 | * @param serverUUID UUID of the server that sent the response 28 | */ 29 | AbortTransactionResponse(long elapsedMillis, String serverUUID) { 30 | super(elapsedMillis, serverUUID); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /java/kudu-client/src/main/java/org/apache/kudu/client/CommitTransactionResponse.java: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | package org.apache.kudu.client; 19 | 20 | import com.google.common.base.Preconditions; 21 | import org.apache.yetus.audience.InterfaceAudience; 22 | 23 | @InterfaceAudience.Private 24 | public class CommitTransactionResponse extends KuduRpcResponse { 25 | /** 26 | * @param elapsedMillis time in milliseconds since RPC creation to now 27 | * @param serverUUID UUID of the server that sent the response 28 | */ 29 | CommitTransactionResponse(long elapsedMillis, String serverUUID) { 30 | super(elapsedMillis, serverUUID); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /java/kudu-client/src/main/java/org/apache/kudu/client/Update.java: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | package org.apache.kudu.client; 19 | 20 | import org.apache.yetus.audience.InterfaceAudience; 21 | import org.apache.yetus.audience.InterfaceStability; 22 | 23 | /** 24 | * Operation to update columns on an existing row. 25 | * Instances of this class should not be reused. 26 | */ 27 | @InterfaceAudience.Public 28 | @InterfaceStability.Evolving 29 | public class Update extends Operation { 30 | 31 | Update(KuduTable table) { 32 | super(table); 33 | } 34 | 35 | @Override 36 | ChangeType getChangeType() { 37 | return ChangeType.UPDATE; 38 | } 39 | } -------------------------------------------------------------------------------- /src/kudu/util/status_callback.cc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | #include "kudu/util/status_callback.h" 19 | 20 | #include 21 | 22 | #include 23 | 24 | #include "kudu/gutil/port.h" 25 | #include "kudu/util/status.h" 26 | 27 | using std::string; 28 | 29 | namespace kudu { 30 | 31 | void DoNothingStatusCB(const Status& status) {} 32 | 33 | void CrashIfNotOkStatusCB(const string& message, const Status& status) { 34 | if (PREDICT_FALSE(!status.ok())) { 35 | LOG(FATAL) << message << ": " << status.ToString(); 36 | } 37 | } 38 | 39 | Status DoNothingStatusClosure() { return Status::OK(); } 40 | 41 | } // end namespace kudu 42 | -------------------------------------------------------------------------------- /docs/metrics_reference.adoc: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one 2 | // or more contributor license agreements. See the NOTICE file 3 | // distributed with this work for additional information 4 | // regarding copyright ownership. The ASF licenses this file 5 | // to you under the Apache License, Version 2.0 (the 6 | // "License"); you may not use this file except in compliance 7 | // with the License. You may obtain a copy of the License at 8 | // 9 | // http://www.apache.org/licenses/LICENSE-2.0 10 | // 11 | // Unless required by applicable law or agreed to in writing, 12 | // software distributed under the License is distributed on an 13 | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | // KIND, either express or implied. See the License for the 15 | // specific language governing permissions and limitations 16 | // under the License. 17 | 18 | [[metrics_reference]] 19 | = Apache Kudu Metrics Reference 20 | 21 | :author: Kudu Team 22 | :imagesdir: ./images 23 | :icons: font 24 | :toc: left 25 | :toclevels: 2 26 | :doctype: book 27 | :backend: html5 28 | :sectlinks: 29 | :experimental: 30 | 31 | include::top.adoc[tags=version] 32 | 33 | // The contents of this file are generated from the output of the 34 | // `--dump_metrics_xml` flag for each binary, during the build of 35 | // the documentation. Do not edit this file or the included files 36 | // manually. 37 | 38 | // This gets replaced by the script that builds the docs 39 | @@METRICS_REFERENCE@@ --------------------------------------------------------------------------------