Skywalking-9.6.0系列之本地源碼編譯并啟動

Skywalking相信有很多人使用過,通過容器或者下載安裝包進行安裝的,今天從源代碼角度,拉取、構建、啟動。
官方文檔步驟簡潔明了,我這邊會結合自己遇到的一些問題做出總結。

當前構建資源版本:

  • MAC 10.15.7
  • IDEA 2021.2
  • node v16.14.0 (據代碼要求安裝了一個新版本)
  • npm 8.3.1
  • Skywalking 9.6.0-SNAPSHOT
  • JDK 11 (最新的代碼要看最新的要求,注意不能使用JDK8,用錯的話構建時也會有提示)
  • Maven 3.6.0

官方指南(必看):https://github.com/apache/skywalking/blob/master/docs/en/guides/How-to-build.md

快速閱覽

  • 流程1:源碼獲取
  • 流程2:submodule模塊初始化
  • 或者流程1&2:二合一
  • 流程3:構建項目
  • 流程4:構建產生的源代碼數據加入項目索引
  • 流程5:啟動前后端代碼

流程1:源碼獲取

方法一:fork代碼后,在自己的倉庫下 git clone源代碼
方法二:下載源碼包后解壓

【下載失敗,網絡問題,只能自行解決】

流程2:submodule模塊初始化

.gitsubmodules文件

[submodule "apm-protocol/apm-network/src/main/proto"]path = apm-protocol/apm-network/src/main/protourl = https://github.com/apache/skywalking-data-collect-protocol.git
[submodule "oap-server/server-query-plugin/query-graphql-plugin/src/main/resources/query-protocol"]path = oap-server/server-query-plugin/query-graphql-plugin/src/main/resources/query-protocolurl = https://github.com/apache/skywalking-query-protocol.git
[submodule "test/e2e-v2/java-test-service/e2e-protocol/src/main/proto"]path = test/e2e-v2/java-test-service/e2e-protocol/src/main/protourl = https://github.com/apache/skywalking-data-collect-protocol.git
[submodule "skywalking-ui"]path = skywalking-uiurl = https://github.com/apache/skywalking-booster-ui.git

以上可以看出關聯的倉庫數據主要有:

  • https://github.com/apache/skywalking-data-collect-protocol.git
  • https://github.com/apache/skywalking-query-protocol.git
  • https://github.com/apache/skywalking-data-collect-protocol.git
  • https://github.com/apache/skywalking-booster-ui.git

執行以下命令,來獲取這些代碼數據:

git submodule init //初始化倉庫目錄位置
git submodule update //**這步驟至關重要**

這個環節由于涉及四個倉庫的代碼拉取,此時如果網絡狀況不佳,很有可能存在【空文件夾】的情況,所以可以這樣解決:

方法一:保障網絡穩定,刪除拉取的空文件夾,再重新git submodule init AND git submodule update ,重復嘗試直至拉取成功
關注這些項目文件夾:

  • apm-protocol/apm-network/src/main/proto
  • oap-server/server-query-plugin/query-graphql-plugin/src/main/resources/query-protocol
  • test/e2e-v2/java-test-service/e2e-protocol/src/main/proto
  • skywalking-ui

方法二: 去除.gitsubmodules文件中的內容,按照需求取拉取對應的代碼,參照【gitsubmodules】文件目錄要求放到指定的文件夾內

以上,可能存在的問題主要就是網絡方面,如果以上項目目錄未拉全就去執行下一步構建,會產生很多報錯,這步必須確認好

或者流程1&2:二合一

git clone --recurse-submodules https://github.com/apache/skywalking.git

也就是clone代碼,并且把submodules一起拉下來

流程3:構建項目

前提確認一下JDK 11+ & Maven 3.6+ 的環境,最好提前安裝node要求的版本

項目根目錄下執行./mvnw clean package -Dmaven.test.skip,構建項目較多,可能需要幾分鐘時間

這個步驟遇到比較多的問題,基本都是卡在node版本的下載和npm依賴包的拉取上,最終skywalking-ui的項目始終build不成功

  1. node版本的下載,本地有8和18的版本,當前構建需要16的版本,下載網速出了問題

    當前用到的v16.14.0,還可以確認一下node和npm的版本映射關系(https://nodejs.org/zh-cn/download/releases),我當前在npm8.3.1,是可以兼容

  2. npm install拉取依賴包也存在網速問題,可以替換鏡像源

    skywalking/apm-webapp/pom.xml 中,找到

        <arguments>install --registry=https://registry.npmjs.org/</arguments><!--修改為淘寶鏡像--><arguments>install --registry=https://registry.npm.taobao.org/</arguments>
    
  3. 【qiang】的問題,以為會變快,其實反作用

  4. 整體流程構建如果最終都是卡在skywalking-ui前端項目的構建上,可以單獨使用對應的node版本去這個項目下單獨npm install & npm run build 確認下,避免要重頭再來,時間比較長

最終:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for apm 9.6.0-SNAPSHOT:
[INFO] 
[INFO] apm ................................................ SUCCESS [  5.195 s]
[INFO] oap-protocol ....................................... SUCCESS [  0.335 s]
[INFO] apm-network ........................................ SUCCESS [ 28.284 s]
[INFO] oap-server ......................................... SUCCESS [  0.446 s]
[INFO] server-library ..................................... SUCCESS [  0.280 s]
[INFO] library-util ....................................... SUCCESS [  4.413 s]
[INFO] library-module ..................................... SUCCESS [  1.693 s]
[INFO] server-telemetry ................................... SUCCESS [  0.187 s]
[INFO] telemetry-api ...................................... SUCCESS [  1.580 s]
[INFO] server-testing ..................................... SUCCESS [  1.385 s]
[INFO] server-configuration ............................... SUCCESS [  0.372 s]
[INFO] configuration-api .................................. SUCCESS [  1.714 s]
[INFO] library-elasticsearch-client ....................... SUCCESS [  7.733 s]
[INFO] library-client ..................................... SUCCESS [  2.882 s]
[INFO] library-server ..................................... SUCCESS [  1.853 s]
[INFO] library-datacarrier-queue .......................... SUCCESS [  0.902 s]
[INFO] ai-pipeline ........................................ SUCCESS [  2.719 s]
[INFO] server-core ........................................ SUCCESS [ 27.428 s]
[INFO] library-kubernetes-support ......................... SUCCESS [  1.696 s]
[INFO] analyzer ........................................... SUCCESS [  0.509 s]
[INFO] meter-analyzer ..................................... SUCCESS [  4.938 s]
[INFO] agent-analyzer ..................................... SUCCESS [  4.672 s]
[INFO] log-analyzer ....................................... SUCCESS [  3.668 s]
[INFO] event-analyzer ..................................... SUCCESS [  1.611 s]
[INFO] server-receiver-plugin ............................. SUCCESS [  0.982 s]
[INFO] skywalking-sharing-server-plugin ................... SUCCESS [  1.546 s]
[INFO] skywalking-trace-receiver-plugin ................... SUCCESS [  2.440 s]
[INFO] zipkin-receiver-plugin ............................. SUCCESS [  1.786 s]
[INFO] skywalking-mesh-receiver-plugin .................... SUCCESS [  1.946 s]
[INFO] skywalking-management-receiver-plugin .............. SUCCESS [  1.607 s]
[INFO] skywalking-jvm-receiver-plugin ..................... SUCCESS [  1.963 s]
[INFO] receiver-proto ..................................... SUCCESS [ 17.060 s]
[INFO] envoy-metrics-receiver-plugin ...................... SUCCESS [  3.926 s]
[INFO] skywalking-clr-receiver-plugin ..................... SUCCESS [  1.542 s]
[INFO] skywalking-profile-receiver-plugin ................. SUCCESS [  1.549 s]
[INFO] otel-receiver-plugin ............................... SUCCESS [  2.132 s]
[INFO] skywalking-meter-receiver-plugin ................... SUCCESS [  1.976 s]
[INFO] skywalking-browser-receiver-plugin ................. SUCCESS [  2.540 s]
[INFO] skywalking-log-receiver-plugin ..................... SUCCESS [  2.236 s]
[INFO] configuration-discovery-receiver-plugin ............ SUCCESS [  2.265 s]
[INFO] skywalking-event-receiver-plugin ................... SUCCESS [  2.095 s]
[INFO] skywalking-zabbix-receiver-plugin .................. SUCCESS [  3.999 s]
[INFO] skywalking-ebpf-receiver-plugin .................... SUCCESS [  2.799 s]
[INFO] skywalking-telegraf-receiver-plugin ................ SUCCESS [  2.467 s]
[INFO] aws-firehose-receiver .............................. SUCCESS [  7.095 s]
[INFO] server-cluster-plugin .............................. SUCCESS [  0.148 s]
[INFO] cluster-zookeeper-plugin ........................... SUCCESS [  1.676 s]
[INFO] cluster-standalone-plugin .......................... SUCCESS [  1.344 s]
[INFO] cluster-kubernetes-plugin .......................... SUCCESS [  1.972 s]
[INFO] cluster-consul-plugin .............................. SUCCESS [  1.811 s]
[INFO] cluster-etcd-plugin ................................ SUCCESS [  1.955 s]
[INFO] cluster-nacos-plugin ............................... SUCCESS [  1.982 s]
[INFO] server-storage-plugin .............................. SUCCESS [  0.120 s]
[INFO] storage-jdbc-hikaricp-plugin ....................... SUCCESS [  5.366 s]
[INFO] storage-elasticsearch-plugin ....................... SUCCESS [  4.129 s]
[INFO] storage-banyandb-plugin ............................ SUCCESS [  4.208 s]
[INFO] oal-grammar ........................................ SUCCESS [  1.128 s]
[INFO] oal-rt ............................................. SUCCESS [  2.740 s]
[INFO] server-query-plugin ................................ SUCCESS [  0.134 s]
[INFO] zipkin-query-plugin ................................ SUCCESS [  2.032 s]
[INFO] server-fetcher-plugin .............................. SUCCESS [  0.111 s]
[INFO] kafka-fetcher-plugin ............................... SUCCESS [  3.037 s]
[INFO] server-health-checker .............................. SUCCESS [  1.661 s]
[INFO] mqe-grammar ........................................ SUCCESS [  0.735 s]
[INFO] mqe-rt ............................................. SUCCESS [  2.202 s]
[INFO] query-graphql-plugin ............................... SUCCESS [  3.807 s]
[INFO] promql-plugin ...................................... SUCCESS [  3.402 s]
[INFO] logql-plugin ....................................... SUCCESS [  1.966 s]
[INFO] server-alarm-plugin ................................ SUCCESS [  5.635 s]
[INFO] telemetry-prometheus ............................... SUCCESS [  1.485 s]
[INFO] exporter ........................................... SUCCESS [  3.927 s]
[INFO] grpc-configuration-sync ............................ SUCCESS [  2.922 s]
[INFO] configuration-apollo ............................... SUCCESS [  1.624 s]
[INFO] configuration-zookeeper ............................ SUCCESS [  1.661 s]
[INFO] configuration-etcd ................................. SUCCESS [  1.129 s]
[INFO] configuration-consul ............................... SUCCESS [  1.498 s]
[INFO] configuration-k8s-configmap ........................ SUCCESS [  1.837 s]
[INFO] configuration-nacos ................................ SUCCESS [  1.452 s]
[INFO] server-starter ..................................... SUCCESS [  7.200 s]
[INFO] server-tools ....................................... SUCCESS [  0.096 s]
[INFO] profile-exporter ................................... SUCCESS [  0.091 s]
[INFO] tool-profile-snapshot-server-mock .................. SUCCESS [  1.363 s]
[INFO] tool-profile-snapshot-bootstrap .................... SUCCESS [  2.893 s]
[INFO] tool-profile-snapshot-exporter ..................... SUCCESS [  3.118 s]
[INFO] data-generator ..................................... SUCCESS [  4.334 s]
[INFO] microbench ......................................... SUCCESS [  8.785 s]
[INFO] oap-server-bom ..................................... SUCCESS [  0.059 s]
[INFO] apm-webapp ......................................... SUCCESS [03:32 min]
[INFO] apache-skywalking-apm .............................. SUCCESS [ 37.877 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  08:42 min
[INFO] Finished at: 2023-08-09T18:59:37+08:00
[INFO] ------------------------------------------------------------------------

流程4:構建產生的源代碼數據加入項目索引

IDEA中,可以找到對應的目錄,右鍵 “Mark Dictory as” -> “Generated Sources Root”,將構建產生的數據加入編輯器的索引中

  • apm-protocol/apm-network/target/generated-sources/protobuf
  • oap-server/server-core/target/generated-sources/protobuf
  • oap-server/server-receiver-plugin/receiver-proto/target/generated-sources/fbs
  • oap-server/server-receiver-plugin/receiver-proto/target/generated-sources/protobuf
  • oap-server/exporter/target/generated-sources/protobuf
  • oap-server/server-configuration/grpc-configuration-sync/target/generated-sources/protobuf
  • oap-server/server-alarm-plugin/target/generated-sources/protobuf
  • oap-server/oal-grammar/target/generated-sources

流程5:啟動前后端代碼

1.啟動OAP核心服務,接收數據上報與數據查詢

  • /skywalking/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java
  • 后端項目啟動,存儲的數據默認是H2,也可以自己根據標準版本部署對應的elastcisearch版本進行配置
  • 由于整體是插件化的架構風格,在組件的選擇上使用 selector 即可快速鎖定選擇的組件。默認存儲是h2,修改為es的只要 selector: ${SW_STORAGE:elasticsearch} 并修改下方elasticsearch對應的配置即可
storage:selector: ${SW_STORAGE:h2} #--> 修改elasticsearch:namespace: ${SW_NAMESPACE:""}clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200}protocol: ${SW_STORAGE_ES_HTTP_PROTOCOL:"http"}connectTimeout: ${SW_STORAGE_ES_CONNECT_TIMEOUT:3000}socketTimeout: ${SW_STORAGE_ES_SOCKET_TIMEOUT:30000}responseTimeout: ${SW_STORAGE_ES_RESPONSE_TIMEOUT:15000}numHttpClientThread: ${SW_STORAGE_ES_NUM_HTTP_CLIENT_THREAD:0}user: ${SW_ES_USER:""}password: ${SW_ES_PASSWORD:""}trustStorePath: ${SW_STORAGE_ES_SSL_JKS_PATH:""}trustStorePass: ${SW_STORAGE_ES_SSL_JKS_PASS:""}secretsManagementFile: ${SW_ES_SECRETS_MANAGEMENT_FILE:""} # Secrets management file in the properties format includes the username, password, which are managed by 3rd party tool.dayStep: ${SW_STORAGE_DAY_STEP:1} # Represent the number of days in the one minute/hour/day index.indexShardsNumber: ${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:1} # Shard number of new indexesindexReplicasNumber: ${SW_STORAGE_ES_INDEX_REPLICAS_NUMBER:1} # Replicas number of new indexes# Specify the settings for each index individually.# If configured, this setting has the highest priority and overrides the generic settings.specificIndexSettings: ${SW_STORAGE_ES_SPECIFIC_INDEX_SETTINGS:""}# Super data set has been defined in the codes, such as trace segments.The following 3 config would be improve es performance when storage super size data in es.superDatasetDayStep: ${SW_STORAGE_ES_SUPER_DATASET_DAY_STEP:-1} # Represent the number of days in the super size dataset record index, the default value is the same as dayStep when the value is less than 0superDatasetIndexShardsFactor: ${SW_STORAGE_ES_SUPER_DATASET_INDEX_SHARDS_FACTOR:5} #  This factor provides more shards for the super data set, shards number = indexShardsNumber * superDatasetIndexShardsFactor. Also, this factor effects Zipkin traces.superDatasetIndexReplicasNumber: ${SW_STORAGE_ES_SUPER_DATASET_INDEX_REPLICAS_NUMBER:0} # Represent the replicas number in the super size dataset record index, the default value is 0.indexTemplateOrder: ${SW_STORAGE_ES_INDEX_TEMPLATE_ORDER:0} # the order of index templatebulkActions: ${SW_STORAGE_ES_BULK_ACTIONS:5000} # Execute the async bulk record data every ${SW_STORAGE_ES_BULK_ACTIONS} requestsbatchOfBytes: ${SW_STORAGE_ES_BATCH_OF_BYTES:10485760} # A threshold to control the max body size of ElasticSearch Bulk flush.# flush the bulk every 5 seconds whatever the number of requestsflushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:5}concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requestsresultWindowMaxSize: ${SW_STORAGE_ES_QUERY_MAX_WINDOW_SIZE:10000}metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:10000}scrollingBatchSize: ${SW_STORAGE_ES_SCROLLING_BATCH_SIZE:5000}segmentQueryMaxSize: ${SW_STORAGE_ES_QUERY_SEGMENT_SIZE:200}profileTaskQueryMaxSize: ${SW_STORAGE_ES_QUERY_PROFILE_TASK_SIZE:200}profileDataQueryBatchSize: ${SW_STORAGE_ES_QUERY_PROFILE_DATA_BATCH_SIZE:100}oapAnalyzer: ${SW_STORAGE_ES_OAP_ANALYZER:"{\"analyzer\":{\"oap_analyzer\":{\"type\":\"stop\"}}}"} # the oap analyzer.oapLogAnalyzer: ${SW_STORAGE_ES_OAP_LOG_ANALYZER:"{\"analyzer\":{\"oap_log_analyzer\":{\"type\":\"standard\"}}}"} # the oap log analyzer. It could be customized by the ES analyzer configuration to support more language log formats, such as Chinese log, Japanese log and etc.advanced: ${SW_STORAGE_ES_ADVANCED:""}# Enable shard metrics and records indices into multi-physical indices, one index template per metric/meter aggregation function or record.logicSharding: ${SW_STORAGE_ES_LOGIC_SHARDING:false}# Custom routing can reduce the impact of searches. Instead of having to fan out a search request to all the shards in an index, the request can be sent to just the shard that matches the specific routing value (or values).enableCustomRouting: ${SW_STORAGE_ES_ENABLE_CUSTOM_ROUTING:false}h2:properties:jdbcUrl: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=FALSE}dataSource.user: ${SW_STORAGE_H2_USER:sa}metadataQueryMaxSize: ${SW_STORAGE_H2_QUERY_MAX_SIZE:5000}maxSizeOfBatchSql: ${SW_STORAGE_MAX_SIZE_OF_BATCH_SQL:100}asyncBatchPersistentPoolSize: ${SW_STORAGE_ASYNC_BATCH_PERSISTENT_POOL_SIZE:1}
  • 啟動后端服務跑在 127.0.0.1:11800

2.啟動web頁面項目,供頁面操作

  • /skywalking/apm-webapp/src/main/java/org/apache/skywalking/oap/server/webapp/ApplicationStartUp.java
  • 啟動服務跑在 127.0.0.1:8080
  • 瀏覽器中訪問,可以展示菜單頁

3.選擇一個springBoot項目

  • 可以選擇下載skywalking-agent.jar,或者也走源碼構建的流程
  • 下載地址:https://skywalking.apache.org/downloads/#JavaAgent
  • 頁面選擇Java Agent,可以選擇源碼包構建,或者打包好的distribution的包
  • 這邊直接下載打包好的包:https://www.apache.org/dyn/closer.cgi/skywalking/java-agent/8.16.0/apache-skywalking-java-agent-8.16.0.tgz
  • 在springboot啟動參數中添加skywalking追蹤:-javaagent:~/Downloads/skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=demo -Dskywalking.collector.backend_service=127.0.0.1:11800
  • 應用啟動后能夠查看到DB\REDIS相關的鏈接請求,訪問后端服務接口,幾秒后頁面能夠刷新報表。關注service,instance,endpoint相關指標

以上源碼構建,本地部署Skywalking項目就算告一段落啦

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/35660.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/35660.shtml
英文地址,請注明出處:http://en.pswp.cn/news/35660.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

基于STM32CUBEMX驅動TMOS模塊STHS34PF80(1)----獲取ID

基于STM32CUBEMX驅動TMOS模塊STHS34PF80----1.獲取ID 概述樣品申請視頻教程所有功能接口最小系統圖生成STM32CUBEMX串口配置IIC配置IO口設置串口重定向 模塊地址參考demoIIC寫函數IIC讀函數參考程序初始化獲取ID主函數 概述 STHS34PF80 是一款非冷卻、工廠校準的紅外運動和存在…

端口輸入的數據為什么要打拍?

一次作者在開發圖像時候&#xff0c;對輸入的圖像沒有打拍&#xff0c;直接輸出給顯示終端&#xff0c;時好時壞&#xff0c;或者圖像顏色不正確&#xff0c;最終經過打拍解決了此問題。 //配置為16-Bit SDR ITU-R BT.656模式時pixel_data[23:16]為高阻。always (posedge pixe…

AtCoder Beginner Contest 314-A/B/C

A - 3.14 題目要求輸出圓周率保留小數幾位后的結果 用字符串來存儲長串的圓周率&#xff0c;截取字符串就可以了。 #include<iostream> using namespace std; int main() {string s"3.1415926535897932384626433832795028841971693993751058209749445923078164062…

C#多線程開發詳解

C#多線程開發詳解 持續更新中。。。。。一、為什么要使用多線程開發1.提高性能2.響應性3.資源利用4.任務分解5.并行計算6.實時處理 二、多線程開發缺點1.競態條件2.死鎖和饑餓3.調試復雜性4.上下文切換開銷5.線程安全性 三、多線程開發涉及的相關概念常用概念(1)lock(2)查看當前…

NanoPi NEO移植LVGL8.3.5到1.69寸ST7789V屏幕

移植前準備 移植好fbtft屏幕驅動 參考鏈接&#xff1a;友善之臂NanoPi NEO利用fbtft驅動點亮1.69寸ST7789V2屏幕 獲取源碼 名稱地址描述lvglhttps://github.com/lvgl/lvgl.gitlvgl-8.3.5lv_drivershttps://github.com/lvgl/lv_drivers.gitlv_drivers-6.1.1 創建工程目錄 創…

RF PCB的9條改進型建議

1.小功率的RF的PCB設計中,主要使用標準的FR4材料(絕緣特性好、材質均勻、介電常數ε=4,10%)。主要使用4層~6層板,在成本非常敏感的情況下可以使用厚度在1mm以下的雙面板,要保證反面是一個完整的地層,同時由于雙面板的厚度在1mm以上,使得地層和信號層之間的FR4介質較厚,…

Linux | curl命令調用接口時查看調用時長和詳情

關注wx&#xff1a; CodingTechWork 引言 在服務器中通過curl命令調用接口時&#xff0c;我們經常需要分析一些時長。本文主要總結兩種方式進行處理。 curl命令 使用time命令 time curl -k -u <username>:<password> https://127.0.0.1/xxxx -vvv 使用文本 編…

HTML <span> 標簽

定義和用法 <span> 標簽被用來組合文檔中的行內元素。 瀏覽器支持 元素ChromeIEFirefoxSafariOpera<span>YesYesYesYesYes所有瀏覽器都支持 <span> 標簽。 HTML 與 XHTML 之間的差異 NONE 提示和注釋: 提示:請使用 <span> 來組合行內元素,以便…

旋轉圖像(旋轉矩陣)

原題鏈接 旋轉圖像備戰技術面試&#xff1f;力扣提供海量技術面試資源&#xff0c;幫助你高效提升編程技能&#xff0c;輕松拿下世界 IT 名企 Dream Offer。https://leetcode.cn/problems/rotate-image/ 算法分析 若矩陣的行列數為N&#xff0c;設i表示行索引&#xff0c;i屬…

win10中Docker安裝、構建鏡像、創建容器、Vscode連接實例

Docker方便一鍵構建項目所需的運行環境&#xff1a;首先構建鏡像(Image)。然后鏡像實例化成為容器(Container)&#xff0c;構成項目的運行環境。最后Vscode連接容器&#xff0c;方便我們在本地進行開發。下面以一個簡單的例子介紹在win10中實現&#xff1a;Docker安裝、構建鏡像…

Flutter BottomSheet 三段式拖拽

BottomSheetBehavior 追蹤 BottomSheet系統默認實現效果準備要實現的功能點&#xff1a;定義三段式狀態&#xff1a;BottomSheetBehavoir閥值定義1. 未達到滾動閥值&#xff0c;恢復狀態2. 達到滾動閥值&#xff0c;更新狀態 前面倒是有講過Android原生的BottomSheetBehavior&a…

Flask 框架集成Bootstrap

前面學習了 Flask 框架的基本用法&#xff0c;以及模板引擎 Jinja2&#xff0c;按理說可以開始自己的 Web 之旅了&#xff0c;不過在啟程之前&#xff0c;還有個重要的武器需要了解一下&#xff0c;就是著名的 Bootstrap 框架和 Flask 的結合&#xff0c;這將大大提高開發 Web …

國產數據庫-內核特性-低基數全局字典

國產數據庫-內核特性-StarRocks低基數全局字典 StarRocks2.0引入了低基數全局字典&#xff0c;可以通過全局字典將字符串的相關操作轉換成整型相關操作&#xff0c;大大提升查詢性能。 1、低基數字典 對于利用整型替代字符串進行處理&#xff0c;通常使用字典編碼進行優化。Sta…

人大金倉助力某大型金融機構業務系統異地容災優化升級

日前&#xff0c;人大金倉助力某大型金融機構應收賬款融資服務平臺異地容災項目順利上線&#xff0c;保證了平臺系統運行的連續性和數據安全&#xff0c;為充分發揮平臺的融資功能&#xff0c;緩解中小微企業融資難提供了強有力的保障。 “ 緩解中小微企業融資難 某大型金融機構…

【MySQL--->數據庫操作】

文章目錄 [TOC](文章目錄) 一、操作語句1.增2.刪3.改4.查5.備份 二、字符集與校驗規則 一、操作語句 1.增 語句格式:create database [if no exists]數據庫名[create_specification [,create_specification] …]; 中括號內是可選項,if no exists是指如果數據庫不存在就創建,存…

STM32 F103C8T6學習筆記7:雙機無線串口通信

今日嘗試配通倆個C8T6單片機之間的無線串口通信&#xff0c;文章提供原理&#xff0c;源碼&#xff0c;測試效果圖&#xff0c;測試工程下載&#xff1a; 目錄 傳輸不規范問題&#xff1a; 串口通信資源&#xff1a; 單個串口資源理解&#xff1a; 單片機串口資源&#xf…

Redis的單線程與多線程

Redis的核心處理邏輯一直都是單線程 有一些分支模塊是多線程(某些異步流程從4.0開始用的多線程&#xff0c;例如UNLINK、FLUSHALL ASYNC、FLUSHDB ASYNC等非阻塞的刪除操作。網絡I/O解包從6.0開始用的是多線程;) 為什么是單線程 多線程多好啊可以利用多核優勢 官方給的解釋 …

UI自動化環境的搭建(python+pycharm+selenium+chrome)

最近在做一些UI自動化的項目&#xff0c;為此從環境搭建來從0到1&#xff0c;希望能夠幫助到你&#xff0c;同時也是自我的梳理。將按照如下進行開展&#xff1a; 1、python的下載、安裝&#xff0c;python環境變量的配置。 2、pycharm開發工具的下載安裝。 3、selenium的安裝。…

Leetcode34 在排序數組中查找元素的第一個和最后一個位置

給你一個按照非遞減順序排列的整數數組 nums&#xff0c;和一個目標值 target。請你找出給定目標值在數組中的開始位置和結束位置。 如果數組中不存在目標值 target&#xff0c;返回 [-1, -1]。 你必須設計并實現時間復雜度為 O(log n) 的算法解決此問題。 代碼&#xff1a; c…

如何使用 Go 獲取 URL 的參數,以及使用時的問題

Go 獲取 URL 參數也很容易&#xff0c;但是由于 Go 有嚴格的數據類型和錯誤管理&#xff0c;所以在使用時會些微有些復雜。所以本文不僅會講如何獲取 URL 的參數&#xff0c;也會講在使用時的一些問題。 首先假設 URL 是https://www.example.com/?keywordabc&id12。 其他…