### Install Doris Go SDK Source: https://github.com/apache/doris/blob/master/sdk/go-doris-sdk/README.md Use 'go get' to install the Doris Go SDK. Ensure your Go version is 1.19 or higher. ```bash go get github.com/apache/doris/sdk/go-doris-sdk ``` -------------------------------- ### Build and Run Production Examples Source: https://github.com/apache/doris/blob/master/sdk/java-doris-sdk/README.md Commands to compile and execute the provided SDK example suite. ```bash # Build mvn package -DskipTests # Run all examples java -cp target/java-doris-sdk-1.0.0.jar org.apache.doris.sdk.examples.ExamplesMain all ``` -------------------------------- ### Minimal Plugin Example Source: https://github.com/apache/doris/blob/master/fe/fe-authentication/fe-authentication-spi/README.md A basic example demonstrating how to implement a custom authentication plugin and its factory. ```APIDOC ## Minimal Plugin Example ### CustomAuthPlugin Implementation ```java public final class CustomAuthPlugin implements AuthenticationPlugin { @Override public String name() { return "custom-auth"; } @Override public boolean supports(AuthenticationRequest request) { return CredentialType.OAUTH_TOKEN.equalsIgnoreCase(request.getCredentialType()); } @Override public AuthenticationResult authenticate( AuthenticationRequest request, AuthenticationIntegration integration) throws AuthenticationException { byte[] credential = request.getCredential(); if (credential == null || credential.length == 0) { return AuthenticationResult.failure("Token is required"); } boolean ok = validateToken(credential, integration); if (!ok) { return AuthenticationResult.failure("Invalid token"); } return AuthenticationResult.success( BasicPrincipal.builder() .name(request.getUsername()) .authenticator(integration.getName()) .build()); } private boolean validateToken(byte[] token, AuthenticationIntegration integration) { // Placeholder for actual token validation logic return true; } // Other methods like description, requiresClearPassword, etc. can be implemented as needed. } ``` ### CustomAuthPluginFactory Implementation ```java public final class CustomAuthPluginFactory implements AuthenticationPluginFactory { @Override public String name() { return "custom-auth"; } @Override public AuthenticationPlugin create() { return new CustomAuthPlugin(); } } ``` ### ServiceLoader Registration Create a file `src/main/resources/META-INF/services/org.apache.doris.authentication.spi.AuthenticationPluginFactory` with the following content: ```text com.example.auth.CustomAuthPluginFactory ``` ``` -------------------------------- ### Define Installation Rules Source: https://github.com/apache/doris/blob/master/be/src/io/tools/CMakeLists.txt Specifies the installation destination for the generated executable. ```cmake install(TARGETS file_cache_microbench DESTINATION ${OUTPUT_DIR}/lib/) ``` -------------------------------- ### Build and Install Doris Java SDK Source: https://github.com/apache/doris/blob/master/sdk/java-doris-sdk/README.md Commands to clone the repository and install the SDK locally using Maven. ```bash git clone https://github.com/apache/doris.git cd doris/sdk/java-doris-sdk mvn install -DskipTests ``` -------------------------------- ### Install Backend Library and Executable Source: https://github.com/apache/doris/blob/master/be/src/service/CMakeLists.txt Installs the backend library and the 'doris_be' executable to the specified output directory. ```cmake install(DIRECTORY DESTINATION ${OUTPUT_DIR}/lib/) install(TARGETS doris_be DESTINATION ${OUTPUT_DIR}/lib/) ``` -------------------------------- ### Run Production Examples via Command Line Source: https://github.com/apache/doris/blob/master/sdk/go-doris-sdk/README.md Execute pre-built production-level examples using the `go run` command. Various scenarios like large batch loads, concurrent operations, JSON loading, and gzip compression are available. ```bash # Run all examples go run cmd/examples/main.go all # Individual examples go run cmd/examples/main.go single # Large batch load (100k records) go run cmd/examples/main.go concurrent # Concurrent load (1M records, 10 workers) go run cmd/examples/main.go json # JSON load (50k records) go run cmd/examples/main.go basic # Basic concurrency (5 workers) go run cmd/examples/main.go gzip # Gzip compressed CSV load ``` -------------------------------- ### Install Test Scripts and Configuration Files Source: https://github.com/apache/doris/blob/master/cloud/test/CMakeLists.txt Installs essential test scripts, FDB cluster configuration, Doris cloud configuration, LSan suppression file, and an FDB metric example JSON to the build directory. ```cmake install(FILES ${BASE_DIR}/script/run_all_tests.sh ${BASE_DIR}/conf/fdb.cluster ${BASE_DIR}/conf/doris_cloud.conf ${BASE_DIR}/conf/lsan_suppr.conf ${BASE_DIR}/test/fdb_metric_example.json PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE DESTINATION ${BUILD_DIR}/test) ``` -------------------------------- ### Install Ubuntu Dependencies Source: https://github.com/apache/doris/wiki/Doris-Install Installs necessary software and libraries for compiling Apache Doris on Ubuntu systems. Run `sudo updatedb` after installation. ```bash sudo apt-get install g++ ant cmake zip byacc flex automake libtool binutils-dev libiberty-dev bison python2.7 libncurses5-dev ``` -------------------------------- ### Start development server Source: https://github.com/apache/doris/blob/master/ui/README.md Launch the local development server, typically accessible at http://localhost:8030. ```bash $ npm run dev # visit http://localhost:8030 ``` -------------------------------- ### Install dbt-doris Plugin Source: https://github.com/apache/doris/blob/master/extension/dbt-doris/README.md Clone the Doris repository and install the dbt-doris extension using pip. Ensure you are in the correct directory before running the installation command. ```shell git clone https://github.com/apache/doris.git cd doris/extension/dbt-doris && pip install . ``` -------------------------------- ### Start Doris Client Source: https://github.com/apache/doris/blob/master/samples/datalake/iceberg_and_paimon/README.md Launch the Doris command-line interface to begin executing queries. ```bash bash start_doris_client.sh ``` -------------------------------- ### GET /get_help Source: https://github.com/apache/doris/blob/master/be/src/io/tools/readme.md Get help information for the microbenchmark service. ```APIDOC ## GET /get_help ### Description Get help information for the microbenchmark service. ### Method GET ### Endpoint /get_help ``` -------------------------------- ### Install index_tool Source: https://github.com/apache/doris/blob/master/be/src/tools/CMakeLists.txt Installs the 'index_tool' executable to the specified output directory. ```cmake install(TARGETS index_tool DESTINATION ${OUTPUT_DIR}/lib/) ``` -------------------------------- ### Configure Doris Client Source: https://github.com/apache/doris/blob/master/sdk/java-doris-sdk/README.md Comprehensive example showing required and optional configuration parameters for the Doris client. ```java DorisConfig config = DorisConfig.builder() // Required fields .endpoints(Arrays.asList( "http://fe1:8030", "http://fe2:8030" // Multiple FE nodes supported, randomly load-balanced )) .user("your_username") .password("your_password") .database("your_database") .table("your_table") // Optional fields .labelPrefix("my_app") // label prefix .label("custom_label_001") // custom label .format(DorisConfig.defaultCsvFormat()) .retry(DorisConfig.defaultRetry()) .groupCommit(GroupCommitMode.ASYNC) .options(new HashMap() {{ put("timeout", "3600"); put("max_filter_ratio", "0.1"); put("strict_mode", "true"); }}) .build(); ``` -------------------------------- ### Run Gzip Compressed Load Example Source: https://github.com/apache/doris/blob/master/sdk/java-doris-sdk/README.md Execute the gzip compressed load example. This is useful for reducing network bandwidth when transferring large datasets. ```java java -cp target/java-doris-sdk-1.0.0.jar org.apache.doris.sdk.examples.ExamplesMain gzip ``` -------------------------------- ### Install packed_file_tool Source: https://github.com/apache/doris/blob/master/be/src/tools/CMakeLists.txt Installs the 'packed_file_tool' executable to the specified output directory. ```cmake install(TARGETS packed_file_tool DESTINATION ${OUTPUT_DIR}/lib/) ``` -------------------------------- ### Install meta_tool Source: https://github.com/apache/doris/blob/master/be/src/tools/CMakeLists.txt Installs the 'meta_tool' executable to the specified output directory. ```cmake install(TARGETS meta_tool DESTINATION ${OUTPUT_DIR}/lib/) ``` -------------------------------- ### Launch Docker Environment Source: https://github.com/apache/doris/blob/master/samples/datalake/deltalake_and_kudu/README.md Commands to initialize the network and start the required service components. ```shell sudo docker network create -d bridge trinoconnector-net ``` ```shell sudo sh start-trinoconnector-compose.sh ``` ```shell sudo sh login-spark.sh ``` ```shell sudo sh login-doris.sh ``` -------------------------------- ### Launch Docker Environment Source: https://github.com/apache/doris/blob/master/samples/datalake/hudi/README.md Commands to initialize the network and start the required service components. ```shell sudo docker network create -d bridge hudi-net ``` ```shell sudo ./start-hudi-compose.sh ``` ```shell sudo ./login-spark.sh ``` ```shell sudo ./login-doris.sh ``` -------------------------------- ### Install lsb_release on Ubuntu Source: https://github.com/apache/doris/wiki/Doris-Install Installs the `lsb_release` command on Ubuntu systems if it is missing. ```bash apt-get install lsb-release ``` -------------------------------- ### Install project dependencies Source: https://github.com/apache/doris/blob/master/ui/README.md Use npm or yarn to install required project dependencies. ```bash $ npm install ``` ```bash $ npm install -g yarn $ yarn install --pure-lockfile ``` -------------------------------- ### Launch Docker Containers Source: https://github.com/apache/doris/blob/master/samples/datalake/iceberg_and_paimon/README.md Execute the startup script to initialize the full suite of services. ```bash bash start_all.sh ``` -------------------------------- ### Install mlocate on Ubuntu Source: https://github.com/apache/doris/wiki/Doris-Install Installs the `mlocate` package on Ubuntu to provide the `updatedb` command. ```bash apt-get install mlocate ``` -------------------------------- ### Start MySQL Client Source: https://github.com/apache/doris/blob/master/samples/datalake/lakesoul/README.md Use this command to launch the MySQL client for interacting with Doris. ```bash bash start_mysql_client.sh ``` -------------------------------- ### Build and Run for Go 1.11 or higher Source: https://github.com/apache/doris/blob/master/samples/read_bitmap/go/README.md Standard build procedure for modern Go environments. ```bash go build ./client ```