• doris docker环境编译部署


    1.准备doris docker环境

    1. xiuchenggong@xiuchengdeMacBook-Pro bin % docker pull apache/doris:build-env-ldb-toolchain-latest
    2. build-env-ldb-toolchain-latest: Pulling from apache/doris
    3. eeedae70be19: Pull complete
    4. a3ed95caeb02: Pull complete
    5. Digest: sha256:63d9a990012b4228bd8bac3915787747330f9537f15f9d94355be8ebd7775685
    6. Status: Downloaded newer image for apache/doris:build-env-ldb-toolchain-latest
    7. docker.io/apache/doris:build-env-ldb-toolchain-latest

    2.下载doris source code,编译doris

    1. [root@8a4a2a64238e ~]# git clone https://github.com/apache/doris.git
    2. Cloning into 'doris'...
    3. remote: Enumerating objects: 377474, done.
    4. remote: Counting objects: 100% (34718/34718), done.
    5. remote: Compressing objects: 100% (2653/2653), done.
    6. remote: Total 377474 (delta 33092), reused 32787 (delta 31941), pack-reused 342756
    7. Receiving objects: 100% (377474/377474), 520.47 MiB | 4.88 MiB/s, done.
    8. Resolving deltas: 100% (255474/255474), done.
    9. Checking out files: 100% (17810/17810), done.

    编译:

    1. [root@8a4a2a64238e doris]# sh build.sh
    2. Python 2.7.5
    3. Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
    4. Maven home: /usr/share/maven
    5. Java version: 1.8.0_382, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.382.b05-1.el7_9.x86_64/jre
    6. Default locale: en_US, platform encoding: ANSI_X3.4-1968
    7. OS name: "linux", version: "5.15.49-linuxkit-pr", arch: "amd64", family: "unix"
    8. cmake version 3.22.1
    9. CMake suite maintained and supported by Kitware (kitware.com/cmake).
    10. ninja 1.8.2
    11. ccache version 4.8
    12. Update apache-orc submodule ...
    13. Submodule 'be/src/apache-orc' (https://github.com/apache/doris-thirdparty.git) registered for path 'be/src/apache-orc'
    14. Cloning into 'be/src/apache-orc'...
    15. remote: Enumerating objects: 24356, done.

    经常编译到一半失败,一直不通过,后来采取分开编译,一些不需要模块就不编译了;

    sh build.sh --fe

    sh build.sh --be

    3.启动doris

    1. MySQL [(none)]> alter system add backend "172.17.0.4:9050";
    2. Query OK, 0 rows affected (0.78 sec)
    3. MySQL [(none)]> show backends\G;
    4. *************************** 1. row ***************************
    5. BackendId: 10280
    6. Host: 172.17.0.4
    7. HeartbeatPort: 9050
    8. BePort: 9060
    9. HttpPort: 8040
    10. BrpcPort: 8060
    11. LastStartTime: 2023-09-06 23:20:30
    12. LastHeartbeat: 2023-09-06 23:20:36
    13. Alive: true
    14. SystemDecommissioned: false
    15. TabletNum: 14
    16. DataUsedCapacity: 0.000
    17. TrashUsedCapcacity: 0.000
    18. AvailCapacity: 10.388 GB
    19. TotalCapacity: 58.367 GB
    20. UsedPct: 82.20 %
    21. MaxDiskUsedPct: 82.20 %
    22. RemoteUsedCapacity: 0.000
    23. Tag: {"location" : "default"}
    24. ErrMsg:
    25. Version: doris-0.0.0-trunk-1bdb0c1
    26. Status: {"lastSuccessReportTabletsTime":"2023-09-06 23:20:34","lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false}
    27. HeartbeatFailureCounter: 0
    28. NodeRole: mix
    29. 1 row in set (0.02 sec)

    4.测试使用

    1. MySQL [(none)]> create database test_db;
    2. Query OK, 0 rows affected (0.04 sec)
    3. MySQL [(none)]> use test_db;
    4. Database changed
    5. MySQL [test_db]> show tables;
    6. Empty set (0.00 sec)
    7. MySQL [test_db]> create table test(id int,name string) distributed by hash(id) properties("replication_num"="1");
    8. Query OK, 0 rows affected (0.10 sec)
    9. MySQL [test_db]> show tables;
    10. +-------------------+
    11. | Tables_in_test_db |
    12. +-------------------+
    13. | test |
    14. +-------------------+
    15. 1 row in set (0.01 sec)
    16. MySQL [test_db]> insert into test values(1,"gong");
    17. Query OK, 1 row affected (0.46 sec)
    18. {'label':'insert_3dfc93601c2e4e05_b72c1ada84fbb226', 'status':'VISIBLE', 'txnId':'2'}
    19. MySQL [test_db]> select * from test;
    20. +------+------+
    21. | id | name |
    22. +------+------+
    23. | 1 | gong |
    24. +------+------+
    25. 1 row in set (0.52 sec)
    26. MySQL [test_db]> select version();
    27. +----------+
    28. | '5.7.99' |
    29. +----------+
    30. | 5.7.99 |
    31. +----------+
    32. 1 row in set (0.02 sec)

  • 相关阅读:
    制造业企业如何高效进行生产计划排单?
    过滤器的实现及其原理责任链设计模式
    二叉树OJ练习题(C语言版)
    SSM+阳光大学宿舍管理系统 毕业设计-附源码211714
    参加了个算法比赛,真是一言难尽啊
    【Linux】adduser命令使用
    【linux】把home目录挂载到其他分区(数据盘/data等)下
    k8s学习-CKA真题-负载均衡service
    酸梅汤特饮、音乐疗法,年轻人告别“朋克养生”?丨小红书数据洞察
    23-properties文件和xml文件以及dom4j的基本使用操作
  • 原文地址:https://blog.csdn.net/gongxiucheng/article/details/132710813