blob: 938c50001d20426f6c9f55cbc3b6c67f975b645c [file] [log] [blame]
<!DOCTYPE html>
<html lang="zh-CN" data-theme="light">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="generator" content="VuePress 2.0.0-beta.61" />
<meta name="theme" content="VuePress Theme Hope" />
<link rel="alternate" hreflang="en-us" href="https://iotdb.apache.org/UserGuide/V0.13.x/Cluster/Cluster-Setup.html"><meta property="og:url" content="https://iotdb.apache.org/zh/UserGuide/V0.13.x/Cluster/Cluster-Setup.html"><meta property="og:site_name" content="IoTDB Website"><meta property="og:title" content="集群搭建"><meta property="og:description" content="集群设置 你可以根据此文档启动IoTDB集群。 安装环境 为使用IoTDB,你首先需要: 1. 安装前需要保证设备上配有 JDK>=1.8 的运行环境,并配置好 JAVA_HOME 环境变量。 2. 设置最大文件打开数为 65535。 安装步骤 IoTDB 支持多种安装途径。用户可以使用三种方式对 IoTDB 进行安装——下载二进制可运行程序、使用源码..."><meta property="og:type" content="article"><meta property="og:locale" content="zh-CN"><meta property="og:locale:alternate" content="en-US"><script type="application/ld+json">{"@context":"https://schema.org","@type":"Article","headline":"集群搭建","image":[""],"dateModified":null,"author":[]}</script><link rel="icon" href="/favicon.ico"><meta name="Description" content="Apache IoTDB: Time Series Database for IoT"><meta name="Keywords" content="TSDB, time series, time series database, IoTDB, IoT database, IoT data management,时序数据库, 时间序列管理, IoTDB, 物联网数据库, 实时数据库, 物联网数据管理, 物联网数据"><meta name="baidu-site-verification" content="wfKETzB3OT"><meta name="google-site-verification" content="mZWAoRY0yj_HAr-s47zHCGHzx5Ju-RVm5wDbPnwQYFo"><title>集群搭建 | IoTDB Website</title><meta name="description" content="集群设置 你可以根据此文档启动IoTDB集群。 安装环境 为使用IoTDB,你首先需要: 1. 安装前需要保证设备上配有 JDK>=1.8 的运行环境,并配置好 JAVA_HOME 环境变量。 2. 设置最大文件打开数为 65535。 安装步骤 IoTDB 支持多种安装途径。用户可以使用三种方式对 IoTDB 进行安装——下载二进制可运行程序、使用源码...">
<style>
:root {
--bg-color: #fff;
}
html[data-theme="dark"] {
--bg-color: #1d1e1f;
}
html,
body {
background: var(--bg-color);
}
</style>
<script>
const userMode = localStorage.getItem("vuepress-theme-hope-scheme");
const systemDarkMode =
window.matchMedia &&
window.matchMedia("(prefers-color-scheme: dark)").matches;
if (userMode === "dark" || (userMode !== "light" && systemDarkMode)) {
document.documentElement.setAttribute("data-theme", "dark");
}
</script>
<link rel="preload" href="/assets/style-2f652485.css" as="style"><link rel="stylesheet" href="/assets/style-2f652485.css">
<link rel="modulepreload" href="/assets/app-cbe6e1e7.js"><link rel="modulepreload" href="/assets/framework-44b8a372.js"><link rel="modulepreload" href="/assets/Cluster-Setup.html-f166aa71.js"><link rel="modulepreload" href="/assets/Cluster-Setup.html-258e0312.js">
</head>
<body>
<div id="app"><!--[--><!--[--><!--[--><span tabindex="-1"></span><a href="#main-content" class="skip-link sr-only">跳至主要內容</a><!--]--><!--[--><div class="theme-container has-toc"><!--[--><header class="navbar hide-icon" id="navbar"><div class="navbar-start"><button class="toggle-sidebar-button" title="Toggle Sidebar"><span class="icon"></span></button><!--[--><!----><!--]--><a href="/zh/" class="brand"><img class="logo" src="/logo.png" alt="IoTDB Website"><!----><span class="site-name hide-in-pad">IoTDB Website</span></a><!--[--><!----><!--]--></div><div class="navbar-center"><!--[--><!----><!--]--><!--[--><!----><!--]--></div><div class="navbar-end"><!--[--><!----><!--]--><div id="docsearch-container"></div><nav class="nav-links"><div class="nav-item hide-in-mobile"><div class="dropdown-wrapper"><button class="dropdown-title" type="button" aria-label="文档"><span class="title"><!---->文档</span><span class="arrow"></span><ul class="nav-dropdown"><li class="dropdown-item"><a href="/zh/UserGuide/Master/QuickStart/QuickStart.html" class="nav-link" aria-label="latest"><!---->latest<!----></a></li><li class="dropdown-item"><a href="/zh/UserGuide/V1.2.x/QuickStart/QuickStart.html" class="nav-link" aria-label="v1.2.x"><!---->v1.2.x<!----></a></li><li class="dropdown-item"><a href="/zh/UserGuide/V1.1.x/QuickStart/QuickStart.html" class="nav-link" aria-label="v1.1.x"><!---->v1.1.x<!----></a></li><li class="dropdown-item"><a href="/zh/UserGuide/V1.0.x/QuickStart/QuickStart.html" class="nav-link" aria-label="v1.0.x"><!---->v1.0.x<!----></a></li><li class="dropdown-item"><a href="/zh/UserGuide/V0.13.x/QuickStart/QuickStart.html" class="nav-link" aria-label="v0.13.x"><!---->v0.13.x<!----></a></li></ul></button></div></div><div class="nav-item hide-in-mobile"><a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=177051872" rel="noopener noreferrer" target="_blank" aria-label="系统设计" class="nav-link"><!---->系统设计<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div><div class="nav-item hide-in-mobile"><a href="/zh/Download/" class="nav-link" aria-label="下载"><!---->下载<!----></a></div><div class="nav-item hide-in-mobile"><div class="dropdown-wrapper"><button class="dropdown-title" type="button" aria-label="社区"><span class="title"><!---->社区</span><span class="arrow"></span><ul class="nav-dropdown"><li class="dropdown-item"><a href="/zh/Community/About.html" class="nav-link" aria-label="关于社区"><!---->关于社区<!----></a></li><li class="dropdown-item"><a href="https://cwiki.apache.org/confluence/display/iotdb" rel="noopener noreferrer" target="_blank" aria-label="Wiki" class="nav-link"><!---->Wiki<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></li><li class="dropdown-item"><a href="/zh/Community/Community-Project-Committers.html" class="nav-link" aria-label="开发人员"><!---->开发人员<!----></a></li><li class="dropdown-item"><a href="/zh/Community/Community-Powered-By.html" class="nav-link" aria-label="技术支持"><!---->技术支持<!----></a></li><li class="dropdown-item"><a href="/Community/Materials.html" class="nav-link" aria-label="活动与报告"><!---->活动与报告<!----></a></li><li class="dropdown-item"><a href="/zh/Community/Feedback.html" class="nav-link" aria-label="交流与反馈"><!---->交流与反馈<!----></a></li></ul></button></div></div><div class="nav-item hide-in-mobile"><div class="dropdown-wrapper"><button class="dropdown-title" type="button" aria-label="开发"><span class="title"><!---->开发</span><span class="arrow"></span><ul class="nav-dropdown"><li class="dropdown-item"><a href="/zh/Development/VoteRelease.html" class="nav-link" aria-label="如何投票"><!---->如何投票<!----></a></li><li class="dropdown-item"><a href="/zh/Development/HowToCommit.html" class="nav-link" aria-label="如何提交代码"><!---->如何提交代码<!----></a></li><li class="dropdown-item"><a href="/zh/Development/HowToJoin.html" class="nav-link" aria-label="成为Contributor"><!---->成为Contributor<!----></a></li><li class="dropdown-item"><a href="/zh/Development/Committer.html" class="nav-link" aria-label="成为Committer"><!---->成为Committer<!----></a></li><li class="dropdown-item"><a href="/zh/Development/ContributeGuide.html" class="nav-link" aria-label="项目开发指南"><!---->项目开发指南<!----></a></li><li class="dropdown-item"><a href="/zh/Development/HowtoContributeCode.html" class="nav-link" aria-label="技术贡献指南"><!---->技术贡献指南<!----></a></li><li class="dropdown-item"><a href="/zh/Development/format-changelist.html" class="nav-link" aria-label="TsFile的更改列表"><!---->TsFile的更改列表<!----></a></li><li class="dropdown-item"><a href="/zh/Development/rpc-changelist" class="nav-link" aria-label="RPC变更清单"><!---->RPC变更清单<!----></a></li></ul></button></div></div><div class="nav-item hide-in-mobile"><div class="dropdown-wrapper"><button class="dropdown-title" type="button" aria-label="ASF"><span class="title"><!---->ASF</span><span class="arrow"></span><ul class="nav-dropdown"><li class="dropdown-item"><a href="https://www.apache.org/" rel="noopener noreferrer" target="_blank" aria-label="基金会" class="nav-link"><!---->基金会<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></li><li class="dropdown-item"><a href="https://www.apache.org/licenses/" rel="noopener noreferrer" target="_blank" aria-label="许可证" class="nav-link"><!---->许可证<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></li><li class="dropdown-item"><a href="https://www.apache.org/security/" rel="noopener noreferrer" target="_blank" aria-label="安全" class="nav-link"><!---->安全<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></li><li class="dropdown-item"><a href="https://www.apache.org/foundation/sponsorship.html" rel="noopener noreferrer" target="_blank" aria-label="赞助" class="nav-link"><!---->赞助<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></li><li class="dropdown-item"><a href="https://www.apache.org/foundation/thanks.html" rel="noopener noreferrer" target="_blank" aria-label="致谢" class="nav-link"><!---->致谢<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></li><li class="dropdown-item"><a href="https://www.apache.org/events/current-event" rel="noopener noreferrer" target="_blank" aria-label="活动" class="nav-link"><!---->活动<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></li></ul></button></div></div></nav><div class="nav-item"><div class="dropdown-wrapper i18n-dropdown"><button class="dropdown-title" type="button" aria-label="选择语言"><!--[--><svg xmlns="http://www.w3.org/2000/svg" class="icon i18n-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="i18n icon" style="width:1rem;height:1rem;vertical-align:middle;"><path d="M379.392 460.8 494.08 575.488l-42.496 102.4L307.2 532.48 138.24 701.44l-71.68-72.704L234.496 460.8l-45.056-45.056c-27.136-27.136-51.2-66.56-66.56-108.544h112.64c7.68 14.336 16.896 27.136 26.112 35.84l45.568 46.08 45.056-45.056C382.976 312.32 409.6 247.808 409.6 204.8H0V102.4h256V0h102.4v102.4h256v102.4H512c0 70.144-37.888 161.28-87.04 210.944L378.88 460.8zM576 870.4 512 1024H409.6l256-614.4H768l256 614.4H921.6l-64-153.6H576zM618.496 768h196.608L716.8 532.48 618.496 768z"></path></svg><!--]--><span class="arrow"></span><ul class="nav-dropdown"><li class="dropdown-item"><a href="/UserGuide/V0.13.x/Cluster/Cluster-Setup.html" class="nav-link" aria-label="English"><!---->English<!----></a></li><li class="dropdown-item"><a aria-current="page" href="/zh/UserGuide/V0.13.x/Cluster/Cluster-Setup.html" class="router-link-active router-link-exact-active nav-link active" aria-label="简体中文"><!---->简体中文<!----></a></li></ul></button></div></div><div class="nav-item hide-in-mobile"><button id="appearance-switch"><svg xmlns="http://www.w3.org/2000/svg" class="icon auto-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="auto icon" style="display:block;"><path d="M512 992C246.92 992 32 777.08 32 512S246.92 32 512 32s480 214.92 480 480-214.92 480-480 480zm0-840c-198.78 0-360 161.22-360 360 0 198.84 161.22 360 360 360s360-161.16 360-360c0-198.78-161.22-360-360-360zm0 660V212c165.72 0 300 134.34 300 300 0 165.72-134.28 300-300 300z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon dark-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="dark icon" style="display:none;"><path d="M524.8 938.667h-4.267a439.893 439.893 0 0 1-313.173-134.4 446.293 446.293 0 0 1-11.093-597.334A432.213 432.213 0 0 1 366.933 90.027a42.667 42.667 0 0 1 45.227 9.386 42.667 42.667 0 0 1 10.24 42.667 358.4 358.4 0 0 0 82.773 375.893 361.387 361.387 0 0 0 376.747 82.774 42.667 42.667 0 0 1 54.187 55.04 433.493 433.493 0 0 1-99.84 154.88 438.613 438.613 0 0 1-311.467 128z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon light-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="light icon" style="display:none;"><path d="M952 552h-80a40 40 0 0 1 0-80h80a40 40 0 0 1 0 80zM801.88 280.08a41 41 0 0 1-57.96-57.96l57.96-58a41.04 41.04 0 0 1 58 58l-58 57.96zM512 752a240 240 0 1 1 0-480 240 240 0 0 1 0 480zm0-560a40 40 0 0 1-40-40V72a40 40 0 0 1 80 0v80a40 40 0 0 1-40 40zm-289.88 88.08-58-57.96a41.04 41.04 0 0 1 58-58l57.96 58a41 41 0 0 1-57.96 57.96zM192 512a40 40 0 0 1-40 40H72a40 40 0 0 1 0-80h80a40 40 0 0 1 40 40zm30.12 231.92a41 41 0 0 1 57.96 57.96l-57.96 58a41.04 41.04 0 0 1-58-58l58-57.96zM512 832a40 40 0 0 1 40 40v80a40 40 0 0 1-80 0v-80a40 40 0 0 1 40-40zm289.88-88.08 58 57.96a41.04 41.04 0 0 1-58 58l-57.96-58a41 41 0 0 1 57.96-57.96z"></path></svg></button></div><div class="nav-item"><a class="repo-link" href="https://github.com/apache/iotdb" target="_blank" rel="noopener noreferrer" aria-label="GitHub"><svg xmlns="http://www.w3.org/2000/svg" class="icon github-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="github icon" style="width:1.25rem;height:1.25rem;vertical-align:middle;"><path d="M511.957 21.333C241.024 21.333 21.333 240.981 21.333 512c0 216.832 140.544 400.725 335.574 465.664 24.49 4.395 32.256-10.07 32.256-23.083 0-11.69.256-44.245 0-85.205-136.448 29.61-164.736-64.64-164.736-64.64-22.315-56.704-54.4-71.765-54.4-71.765-44.587-30.464 3.285-29.824 3.285-29.824 49.195 3.413 75.179 50.517 75.179 50.517 43.776 75.008 114.816 53.333 142.762 40.79 4.523-31.66 17.152-53.377 31.19-65.537-108.971-12.458-223.488-54.485-223.488-242.602 0-53.547 19.114-97.323 50.517-131.67-5.035-12.33-21.93-62.293 4.779-129.834 0 0 41.258-13.184 134.912 50.346a469.803 469.803 0 0 1 122.88-16.554c41.642.213 83.626 5.632 122.88 16.554 93.653-63.488 134.784-50.346 134.784-50.346 26.752 67.541 9.898 117.504 4.864 129.834 31.402 34.347 50.474 78.123 50.474 131.67 0 188.586-114.73 230.016-224.042 242.09 17.578 15.232 33.578 44.672 33.578 90.454v135.85c0 13.142 7.936 27.606 32.854 22.87C862.25 912.597 1002.667 728.747 1002.667 512c0-271.019-219.648-490.667-490.71-490.667z"></path></svg></a></div><!--[--><!----><!--]--><button class="toggle-navbar-button" aria-label="Toggle Navbar" aria-expanded="false" aria-controls="nav-screen"><span class="button-container"><span class="button-top"></span><span class="button-middle"></span><span class="button-bottom"></span></span></button></div></header><!----><!--]--><!----><div class="toggle-sidebar-wrapper"><span class="arrow start"></span></div><aside class="sidebar" id="sidebar"><!--[--><!----><!--]--><ul class="sidebar-links"><li><section class="sidebar-group"><p class="sidebar-heading"><!----><span class="title">IoTDB用户手册 (V0.13.x)</span><!----></p><ul class="sidebar-links"></ul></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">IoTDB简介</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">快速上手</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">数据模式与概念</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">语法约定</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">应用编程接口</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">元数据操作</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">数据写入和删除</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">数据查询</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">数据处理</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">权限管理</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">运维工具</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">系统集成</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">UDF 资料库</span><span class="arrow end"></span></button><!----></section></li><li><section class="sidebar-group"><button class="sidebar-heading clickable"><!----><span class="title">参考</span><span class="arrow end"></span></button><!----></section></li></ul><!--[--><!----><!--]--></aside><!--[--><main class="page" id="main-content"><!--[--><!----><nav class="breadcrumb disable"></nav><div class="page-title"><h1><!---->集群搭建</h1><div class="page-info"><!----><!----><!----><!----><span class="page-reading-time-info" aria-label="阅读时间"><svg xmlns="http://www.w3.org/2000/svg" class="icon timer-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="timer icon"><path d="M799.387 122.15c4.402-2.978 7.38-7.897 7.38-13.463v-1.165c0-8.933-7.38-16.312-16.312-16.312H256.33c-8.933 0-16.311 7.38-16.311 16.312v1.165c0 5.825 2.977 10.874 7.637 13.592 4.143 194.44 97.22 354.963 220.201 392.763-122.204 37.542-214.893 196.511-220.2 389.397-4.661 5.049-7.638 11.651-7.638 19.03v5.825h566.49v-5.825c0-7.379-2.849-13.981-7.509-18.9-5.049-193.016-97.867-351.985-220.2-389.527 123.24-37.67 216.446-198.453 220.588-392.892zM531.16 450.445v352.632c117.674 1.553 211.787 40.778 211.787 88.676H304.097c0-48.286 95.149-87.382 213.728-88.676V450.445c-93.077-3.107-167.901-81.297-167.901-177.093 0-8.803 6.99-15.793 15.793-15.793 8.803 0 15.794 6.99 15.794 15.793 0 80.261 63.69 145.635 142.01 145.635s142.011-65.374 142.011-145.635c0-8.803 6.99-15.793 15.794-15.793s15.793 6.99 15.793 15.793c0 95.019-73.789 172.82-165.96 177.093z"></path></svg><span>大约 11 分钟</span><meta property="timeRequired" content="PT11M"></span><!----><!----></div><hr></div><div class="toc-place-holder"><aside id="toc"><!--[--><!----><!--]--><div class="toc-header">此页内容<button class="print-button" title="打印"><svg xmlns="http://www.w3.org/2000/svg" class="icon print-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="print icon"><path d="M819.2 364.8h-44.8V128c0-17.067-14.933-32-32-32H281.6c-17.067 0-32 14.933-32 32v236.8h-44.8C145.067 364.8 96 413.867 96 473.6v192c0 59.733 49.067 108.8 108.8 108.8h44.8V896c0 17.067 14.933 32 32 32h460.8c17.067 0 32-14.933 32-32V774.4h44.8c59.733 0 108.8-49.067 108.8-108.8v-192c0-59.733-49.067-108.8-108.8-108.8zM313.6 160h396.8v204.8H313.6V160zm396.8 704H313.6V620.8h396.8V864zM864 665.6c0 25.6-19.2 44.8-44.8 44.8h-44.8V588.8c0-17.067-14.933-32-32-32H281.6c-17.067 0-32 14.933-32 32v121.6h-44.8c-25.6 0-44.8-19.2-44.8-44.8v-192c0-25.6 19.2-44.8 44.8-44.8h614.4c25.6 0 44.8 19.2 44.8 44.8v192z"></path></svg></button></div><div class="toc-wrapper"><ul class="toc-list"><!--[--><li class="toc-item"><a aria-current="page" href="/zh/UserGuide/V0.13.x/Cluster/Cluster-Setup.html#集群设置" class="router-link-active router-link-exact-active toc-link level2">集群设置</a></li><ul class="toc-list"><!--[--><li class="toc-item"><a aria-current="page" href="/zh/UserGuide/V0.13.x/Cluster/Cluster-Setup.html#安装环境" class="router-link-active router-link-exact-active toc-link level3">安装环境</a></li><!----><!--]--><!--[--><li class="toc-item"><a aria-current="page" href="/zh/UserGuide/V0.13.x/Cluster/Cluster-Setup.html#安装步骤" class="router-link-active router-link-exact-active toc-link level3">安装步骤</a></li><!----><!--]--><!--[--><li class="toc-item"><a aria-current="page" href="/zh/UserGuide/V0.13.x/Cluster/Cluster-Setup.html#文件目录" class="router-link-active router-link-exact-active toc-link level3">文件目录</a></li><!----><!--]--><!--[--><li class="toc-item"><a aria-current="page" href="/zh/UserGuide/V0.13.x/Cluster/Cluster-Setup.html#配置" class="router-link-active router-link-exact-active toc-link level3">配置</a></li><!----><!--]--></ul><!--]--><!--[--><li class="toc-item"><a aria-current="page" href="/zh/UserGuide/V0.13.x/Cluster/Cluster-Setup.html#被覆盖的单机版选项" class="router-link-active router-link-exact-active toc-link level2">被覆盖的单机版选项</a></li><ul class="toc-list"><!--[--><li class="toc-item"><a aria-current="page" href="/zh/UserGuide/V0.13.x/Cluster/Cluster-Setup.html#启动服务" class="router-link-active router-link-exact-active toc-link level3">启动服务</a></li><!----><!--]--><!--[--><li class="toc-item"><a aria-current="page" href="/zh/UserGuide/V0.13.x/Cluster/Cluster-Setup.html#附录" class="router-link-active router-link-exact-active toc-link level3">附录</a></li><!----><!--]--></ul><!--]--></ul></div><!--[--><!----><!--]--></aside></div><!----><div class="theme-hope-content"><!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--><h1 id="集群搭建" tabindex="-1"><a class="header-anchor" href="#集群搭建" aria-hidden="true">#</a> 集群搭建</h1><h2 id="集群设置" tabindex="-1"><a class="header-anchor" href="#集群设置" aria-hidden="true">#</a> 集群设置</h2><p>你可以根据此文档启动IoTDB集群。</p><h3 id="安装环境" tabindex="-1"><a class="header-anchor" href="#安装环境" aria-hidden="true">#</a> 安装环境</h3><p>为使用IoTDB,你首先需要:</p><ol><li><p>安装前需要保证设备上配有 JDK&gt;=1.8 的运行环境,并配置好 JAVA_HOME 环境变量。</p></li><li><p>设置最大文件打开数为 65535。</p></li></ol><h3 id="安装步骤" tabindex="-1"><a class="header-anchor" href="#安装步骤" aria-hidden="true">#</a> 安装步骤</h3><p>IoTDB 支持多种安装途径。用户可以使用三种方式对 IoTDB 进行安装——下载二进制可运行程序、使用源码、使用 docker 镜像。</p><ul><li>使用源码:您可以从代码仓库下载源码并编译,具体编译方法见下方。</li><li>二进制可运行程序:请从 <a href="https://iotdb.apache.org/Download/" target="_blank" rel="noopener noreferrer">下载<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 页面下载最新的安装包,解压后即完成安装。</li><li>使用 Docker 镜像:dockerfile 文件位于 <a href="https://github.com/apache/iotdb/blob/master/docker/src/main" target="_blank" rel="noopener noreferrer">github<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a></li></ul><h4 id="源码编译" tabindex="-1"><a class="header-anchor" href="#源码编译" aria-hidden="true">#</a> 源码编译</h4><p>下载源码:</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>git clone https://github.com/apache/iotdb.git
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>默认分支为master分支,你可以切换到其他发布版本,例如:</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>git checkout rel/0.12
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>在iotdb根目录下:</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>&gt; mvn clean package -pl cluster -am -DskipTests
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>集群的二进制版本在目录 <strong>cluster/target/{iotdb-project.version}</strong></p><h4 id="下载" tabindex="-1"><a class="header-anchor" href="#下载" aria-hidden="true">#</a> 下载</h4><p>你可以直接下载二进制版本 <a href="https://iotdb.apache.org/Download/" target="_blank" rel="noopener noreferrer">Download Page<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a></p><h3 id="文件目录" tabindex="-1"><a class="header-anchor" href="#文件目录" aria-hidden="true">#</a> 文件目录</h3><p>完成IoTDB Cluster安装后,默认会在IoTDB Cluster的根目录下生成下列目录文件:</p><table><thead><tr><th><strong>目录</strong></th><th><strong>说明</strong></th></tr></thead><tbody><tr><td>conf</td><td>配置文件目录</td></tr><tr><td>data</td><td>默认数据文件目录,可通过修改配置文件修改位置</td></tr><tr><td>ext</td><td>默认udf目录,可通过修改配置文件修改位置</td></tr><tr><td>lib</td><td>库文件目录</td></tr><tr><td>logs</td><td>运行日志目录</td></tr><tr><td>sbin</td><td>可执行文件目录</td></tr><tr><td>tools</td><td>系统工具目录</td></tr></tbody></table><h3 id="配置" tabindex="-1"><a class="header-anchor" href="#配置" aria-hidden="true">#</a> 配置</h3><p>为方便 IoTDB Server 的配置与管理,IoTDB Server 为用户提供三种配置项,使得您可以在启动服务或服务运行时对其进行配置。</p><p>三种配置项的配置文件均位于 IoTDB 安装目录:<code>$IOTDB_HOME/conf</code>文件夹下,其中涉及 server 配置的共有 4 个文件,分别为:<code>iotdb-cluster.properties</code><code>iotdb-engine.properties</code><code>logback.xml</code><code>iotdb-env.sh</code>(Unix 系统)/<code>iotdb-env.bat</code>(Windows 系统), 您可以通过更改其中的配置项对系统运行的相关配置项进行配置。</p><p>配置文件的说明如下:</p><ul><li><code>iotdb-env.sh</code>/<code>iotdb-env.bat</code>:环境配置项的默认配置文件。您可以在文件中配置 JAVA-JVM 的相关系统配置项。</li><li><code>iotdb-engine.properties</code>:IoTDB 引擎层系统配置项的默认配置文件。您可以在文件中配置 IoTDB 引擎运行时的相关参数。此外,用户可以在文件中配置 IoTDB 存储时 TsFile 文件的相关信息,如每次将内存中的数据写入到磁盘前的缓存大小 (<code>group_size_in_byte</code>),内存中每个列打一次包的大小 (<code>page_size_in_byte</code>) 等。</li><li><code>logback.xml</code>: 日志配置文件,比如日志级别等。</li><li><code>iotdb-cluster.properties</code>: IoTDB 集群所需要的一些配置。</li></ul><p><code>iotdb-engine.properties</code><code>iotdb-env.sh</code>/<code>iotdb-env.bat</code> 两个配置文件详细说明请参考 <a href="https://github.com/apache/iotdb/blob/master/docs/zh/UserGuide/Appendix/Config-Manual.md" target="_blank" rel="noopener noreferrer">附录/配置手册<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a>,与集群有关的配置项是在<code>iotdb-cluster.properties</code>文件中的,你可以直接查看 <a href="https://github.com/apache/iotdb/blob/master/cluster/src/assembly/resources/conf/iotdb-cluster.properties" target="_blank" rel="noopener noreferrer">配置文件<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 中的注释,也可以参考 <a href="#%E9%9B%86%E7%BE%A4%E9%85%8D%E7%BD%AE%E9%A1%B9">Cluster Configuration</a></p><p>配置文件位于 <strong>{cluster_root_dir}/conf</strong></p><p><strong>你需要修改每个节点以下的配置项去启动你的IoTDB集群:</strong></p><ul><li><p>iotdb-engine.properties:</p><ul><li>rpc_address</li></ul><ul><li><p>rpc_port</p></li><li><p>base_dir</p></li><li><p>data_dirs</p></li><li><p>wal_dir</p></li></ul></li><li><p>iotdb-cluster.properties</p><ul><li><p>internal_ip</p></li><li><p>internal_meta_port</p></li><li><p>internal_data_port</p></li><li><p>cluster_info_public_port</p></li><li><p>seed_nodes</p></li><li><p>default_replica_num</p></li></ul></li></ul><h2 id="被覆盖的单机版选项" tabindex="-1"><a class="header-anchor" href="#被覆盖的单机版选项" aria-hidden="true">#</a> 被覆盖的单机版选项</h2><p>iotdb-engines.properties 配置文件中的部分内容会不再生效:</p><ul><li><code>enable_auto_create_schema</code> 不再生效,并被视为<code>false</code>. 应使用 iotdb-cluster.properties 中的 <code>enable_auto_create_schema</code> 来控制是否自动创建序列。</li><li><code>is_sync_enable</code> 不再生效,并被视为 <code>false</code>.</li></ul><h3 id="启动服务" tabindex="-1"><a class="header-anchor" href="#启动服务" aria-hidden="true">#</a> 启动服务</h3><h4 id="启动集群" tabindex="-1"><a class="header-anchor" href="#启动集群" aria-hidden="true">#</a> 启动集群</h4><p>您可以多节点部署或单机部署分布式集群,两者的主要区别是后者需要处理端口和文件目录的冲突,配置项含义请参考 <a href="https://github.com/apache/iotdb/blob/master/docs/zh/UserGuide/Cluster/Cluster-Setup.md#%E9%85%8D%E7%BD%AE%E9%A1%B9" target="_blank" rel="noopener noreferrer">配置项<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a>。 启动其中一个节点的服务,需要执行如下命令:</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code># Unix/OS X
&gt; nohup sbin/start-node.sh [printgc] [&lt;conf_path&gt;] &gt;/dev/null 2&gt;&amp;1 &amp;
# Windows
&gt; sbin\start-node.bat [printgc] [&lt;conf_path&gt;]
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><code>printgc</code>表示在启动的时候,会开启 GC 日志。 <code>&lt;conf_path&gt;</code>使用<code>conf_path</code>文件夹里面的配置文件覆盖默认配置文件。GC 日志默认是关闭的。为了性能调优,用户可能会需要收集 GC 信息。GC 日志会被存储在<code>IOTDB_HOME/logs/</code>下面。</p><p><strong>如果你启动了所有seed节点,并且所有seed节点可以相互通信并没有ip地址/端口和文件目录的冲突,集群就成功启动了。</strong></p><h4 id="集群扩展" tabindex="-1"><a class="header-anchor" href="#集群扩展" aria-hidden="true">#</a> 集群扩展</h4><p>在集群运行过程中,用户可以向集群中加入新的节点或者删除集群中已有节点。目前仅支持逐节点集群扩展操作,多节点的集群扩展可以转化为一系列单节点集群扩展操作来实现。集群只有在上一次集群扩展操作完成后才会接收新的集群扩展操作。</p><p><strong>在要加入集群的新节点上启动以下脚本进行增加节点操作:</strong></p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code># Unix/OS X
&gt; nohup sbin/add-node.sh [printgc] [&lt;conf_path&gt;] &gt;/dev/null 2&gt;&amp;1 &amp;
# Windows
&gt; sbin\add-node.bat [printgc] [&lt;conf_path&gt;]
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><code>printgc</code>表示在启动的时候,会开启 GC 日志。 <code>&lt;conf_path&gt;</code>使用<code>conf_path</code>文件夹里面的配置文件覆盖默认配置文件。</p><p><strong>在任一集群中的节点上启动以下脚本进行删除节点操作:</strong></p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code># Unix/OS X
&gt; sbin/remove-node.sh &lt;internal_ip&gt; &lt;internal_meta_port&gt;
# Windows
&gt; sbin\remove-node.bat &lt;internal_ip&gt; &lt;internal_meta_port&gt;
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p><code>internal_ip</code>表示待删除节点的 IP 地址 <code>internal_meta_port</code>表示待删除节点的 meta 服务端口</p><h4 id="使用-cli-工具" tabindex="-1"><a class="header-anchor" href="#使用-cli-工具" aria-hidden="true">#</a> 使用 Cli 工具</h4><p>安装环境请参考 <a href="https://github.com/apache/iotdb/blob/master/docs/zh/UserGuide/QuickStart/QuickStart.md" target="_blank" rel="noopener noreferrer">快速上手/安装环境章节<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a>。你可以根据节点的rpc_address和rpc_port向任何节点发起连接。</p><h4 id="停止集群" tabindex="-1"><a class="header-anchor" href="#停止集群" aria-hidden="true">#</a> 停止集群</h4><p>在任一机器上启动以下脚本进行停止所有运行在该机器上的节点服务操作:</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code># Unix/OS X
&gt; sbin/stop-node.sh
# Windows
&gt; sbin\stop-node.bat
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="附录" tabindex="-1"><a class="header-anchor" href="#附录" aria-hidden="true">#</a> 附录</h3><h4 id="集群配置项" tabindex="-1"><a class="header-anchor" href="#集群配置项" aria-hidden="true">#</a> 集群配置项</h4><ul><li>internal_ip</li></ul><table><thead><tr><th>名字</th><th>internal_ip</th></tr></thead><tbody><tr><td>描述</td><td>IOTDB 集群各个节点之间内部通信的 IP 地址,比如心跳、snapshot 快照、raft log 等。<strong><code>internal_ip</code>是集群内部的私有ip</strong></td></tr><tr><td>类型</td><td>String</td></tr><tr><td>默认值</td><td>127.0.0.1</td></tr><tr><td>改后生效方式</td><td>重启服务生效,集群建立后不可再修改</td></tr></tbody></table><ul><li>internal_meta_port</li></ul><table><thead><tr><th>名字</th><th>internal_meta_port</th></tr></thead><tbody><tr><td>描述</td><td>IoTDB meta 服务端口,用于元数据组(又称集群管理组)通信,元数据组管理集群配置和存储组信息<strong>IoTDB 将为每个 meta 服务自动创建心跳端口。默认 meta 服务心跳端口为<code>internal_meta_port+1</code>,请确认这两个端口不是系统保留端口并且未被占用</strong></td></tr><tr><td>类型</td><td>Int32</td></tr><tr><td>默认值</td><td>9003</td></tr><tr><td>改后生效方式</td><td>重启服务生效,集群建立后不可再修改</td></tr></tbody></table><ul><li>internal_data_port</li></ul><table><thead><tr><th>名字</th><th>internal_data_port</th></tr></thead><tbody><tr><td>描述</td><td>IoTDB data 服务端口,用于数据组通信,数据组管理数据模式和数据的存储<strong>IoTDB 将为每个 data 服务自动创建心跳端口。默认的 data 服务心跳端口为<code>internal_data_port+1</code>。请确认这两个端口不是系统保留端口并且未被占用</strong></td></tr><tr><td>类型</td><td>Int32</td></tr><tr><td>默认值</td><td>40010</td></tr><tr><td>改后生效方式</td><td>重启服务生效,集群建立后不可再修改</td></tr></tbody></table><ul><li>cluster_info_public_port</li></ul><table><thead><tr><th>名字</th><th>cluster_info_public_port</th></tr></thead><tbody><tr><td>描述</td><td>用于查看集群信息(如数据分区)的 RPC 服务的接口</td></tr><tr><td>类型</td><td>Int32</td></tr><tr><td>默认值</td><td>6567</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>open_server_rpc_port</li></ul><table><thead><tr><th>名字</th><th>open_server_rpc_port</th></tr></thead><tbody><tr><td>描述</td><td>是否打开单机模块的 rpc port,用于调试模式,如果设置为 true,则单机模块的 rpc port 设置为<code>rpc_port (in iotdb-engines.properties) + 1</code></td></tr><tr><td>类型</td><td>Boolean</td></tr><tr><td>默认值</td><td>false</td></tr><tr><td>改后生效方式</td><td>重启服务生效,集群建立后不可再修改</td></tr></tbody></table><ul><li>seed_nodes</li></ul><table><thead><tr><th>名字</th><th>seed_nodes</th></tr></thead><tbody><tr><td>描述</td><td>集群中节点的地址(私有ip),<code>{IP/DOMAIN}:internal_meta_port</code>格式,用逗号分割;对于伪分布式模式,可以都填写<code>localhost</code>,或是<code>127.0.0.1</code> 或是混合填写,但是不能够出现真实的 ip 地址;对于分布式模式,支持填写 real ip 或是 hostname,但是不能够出现<code>localhost</code>或是<code>127.0.0.1</code>。当使用<code>start-node.sh(.bat)</code>启动节点时,此配置意味着形成初始群集的节点,每个节点的<code>seed_nodes</code>应该一致,否则群集将初始化失败;当使用<code>add-node.sh(.bat)</code>添加节点到集群中时,此配置项可以是集群中已经存在的任何节点,不需要是用<code>start-node.sh(bat)</code>构建初始集群的节点。</td></tr><tr><td>类型</td><td>String</td></tr><tr><td>默认值</td><td>127.0.0.1:9003,127.0.0.1:9005,127.0.0.1:9007</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>rpc_thrift_compression_enable</li></ul><table><thead><tr><th>名字</th><th>rpc_thrift_compression_enable</th></tr></thead><tbody><tr><td>描述</td><td>是否开启 thrift 压缩通信,<strong>注意这个参数要各个节点保持一致,也要与客户端保持一致,同时也要与<code>iotdb-engine.properties</code><code>rpc_thrift_compression_enable</code>参数保持一致</strong></td></tr><tr><td>类型</td><td>Boolean</td></tr><tr><td>默认值</td><td>false</td></tr><tr><td>改后生效方式</td><td>重启服务生效,需要整个集群同时更改</td></tr></tbody></table><ul><li>default_replica_num</li></ul><table><thead><tr><th>名字</th><th>default_replica_num</th></tr></thead><tbody><tr><td>描述</td><td>集群副本数</td></tr><tr><td>类型</td><td>Int32</td></tr><tr><td>默认值</td><td>3</td></tr><tr><td>改后生效方式</td><td>重启服务生效,集群建立后不可更改</td></tr></tbody></table><ul><li>multi_raft_factor</li></ul><table><thead><tr><th>名字</th><th>multi_raft_factor</th></tr></thead><tbody><tr><td>描述</td><td>每个数据组启动的 raft 组实例数量,默认每个数据组启动一个 raft 组</td></tr><tr><td>类型</td><td>Int32</td></tr><tr><td>默认值</td><td>1</td></tr><tr><td>改后生效方式</td><td>重启服务生效,集群建立后不可更改</td></tr></tbody></table><ul><li>cluster_name</li></ul><table><thead><tr><th>名字</th><th>cluster_name</th></tr></thead><tbody><tr><td>描述</td><td>集群名称,集群名称用以标识不同的集群,<strong>一个集群中所有节点的 cluster_name 都应相同</strong></td></tr><tr><td>类型</td><td>String</td></tr><tr><td>默认值</td><td>default</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>connection_timeout_ms</li></ul><table><thead><tr><th>名字</th><th>connection_timeout_ms</th></tr></thead><tbody><tr><td>描述</td><td>raft 节点间的 thrift 连接超时和 socket 超时时间,单位毫秒. <strong>对于发送心跳和投票请求的 thrift 连接的超时时间会被自动调整为 connection_timeout_ms 和 heartbeat_interval_ms 的最小值.</strong></td></tr><tr><td>类型</td><td>Int32</td></tr><tr><td>默认值</td><td>20000</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>heartbeat_interval_ms</li></ul><table><thead><tr><th>名字</th><th>heartbeat_interval_ms</th></tr></thead><tbody><tr><td>描述</td><td>领导者发送心跳广播的间隔时间,单位毫秒</td></tr><tr><td>类型</td><td>Int64</td></tr><tr><td>默认值</td><td>1000</td></tr><tr><td>改后生成方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>election_timeout_ms</li></ul><table><thead><tr><th>名字</th><th>election_timeout_ms</th></tr></thead><tbody><tr><td>描述</td><td>跟随者的选举超时时间, 以及选举者等待投票的超时时间, 单位毫秒</td></tr><tr><td>类型</td><td>Int64</td></tr><tr><td>默认值</td><td>20000</td></tr><tr><td>改后生成方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>read_operation_timeout_ms</li></ul><table><thead><tr><th>名字</th><th>read_operation_timeout_ms</th></tr></thead><tbody><tr><td>描述</td><td>读取操作超时时间,仅用于内部通信,不适用于整个操作,单位毫秒</td></tr><tr><td>类型</td><td>Int32</td></tr><tr><td>默认值</td><td>30000</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>write_operation_timeout_ms</li></ul><table><thead><tr><th>名字</th><th>write_operation_timeout_ms</th></tr></thead><tbody><tr><td>描述</td><td>写入操作超时时间,仅用于内部通信,不适用于整个操作,单位毫秒</td></tr><tr><td>类型</td><td>Int32</td></tr><tr><td>默认值</td><td>30000</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>min_num_of_logs_in_mem</li></ul><table><thead><tr><th>名字</th><th>min_num_of_logs_in_mem</th></tr></thead><tbody><tr><td>描述</td><td>删除日志操作执行后,内存中保留的最多的提交的日志的数量。增大这个值将减少在 CatchUp 使用快照的机会,但也会增加内存占用量</td></tr><tr><td>类型</td><td>Int32</td></tr><tr><td>默认值</td><td>100</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>max_num_of_logs_in_mem</li></ul><table><thead><tr><th>名字</th><th>max_num_of_logs_in_mem</th></tr></thead><tbody><tr><td>描述</td><td>当内存中已提交的日志条数达到这个值之后,就会触发删除日志的操作,增大这个值将减少在 CatchUp 使用快照的机会,但也会增加内存占用量</td></tr><tr><td>类型</td><td>Int32</td></tr><tr><td>默认值</td><td>1000</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>log_deletion_check_interval_second</li></ul><table><thead><tr><th>名字</th><th>log_deletion_check_interval_second</th></tr></thead><tbody><tr><td>描述</td><td>检查删除日志任务的时间间隔,每次删除日志任务将会把已提交日志超过 min_num_of_logs_in_mem 条的最老部分删除,单位秒</td></tr><tr><td>类型</td><td>Int32</td></tr><tr><td>默认值</td><td>60</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>enable_auto_create_schema</li></ul><table><thead><tr><th>名字</th><th>enable_auto_create_schema</th></tr></thead><tbody><tr><td>描述</td><td>是否支持自动创建 schema,<strong>这个值会覆盖<code>iotdb-engine.properties</code><code>enable_auto_create_schema</code>的配置</strong></td></tr><tr><td>类型</td><td>BOOLEAN</td></tr><tr><td>默认值</td><td>true</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>consistency_level</li></ul><table><thead><tr><th>名字</th><th>consistency_level</th></tr></thead><tbody><tr><td>描述</td><td>读一致性,目前支持 3 种一致性:strong、mid、weak。strong consistency 每次操作都会尝试与 Leader 同步以获取最新的数据,如果失败(超时),则直接向用户返回错误; mid consistency 每次操作将首先尝试与 Leader 进行同步,但是如果失败(超时),它将使用本地当前数据向用户提供服务; weak consistency 不会与 Leader 进行同步,而只是使用本地数据向用户提供服务</td></tr><tr><td>类型</td><td>strong、mid、weak</td></tr><tr><td>默认值</td><td>mid</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table><ul><li>is_enable_raft_log_persistence</li></ul><table><thead><tr><th>名字</th><th>is_enable_raft_log_persistence</th></tr></thead><tbody><tr><td>描述</td><td>是否开启 raft log 持久化</td></tr><tr><td>类型</td><td>BOOLEAN</td></tr><tr><td>默认值</td><td>true</td></tr><tr><td>改后生效方式</td><td>重启服务生效</td></tr></tbody></table></div><!----><footer class="page-meta"><div class="meta-item edit-link"><a href="https://github.com/apache/iotdb/edit/rel/0.13/docs/zh/UserGuide/Cluster/Cluster-Setup.md" rel="noopener noreferrer" target="_blank" aria-label="发现错误?在 GitHub 上编辑此页" class="nav-link label"><!--[--><svg xmlns="http://www.w3.org/2000/svg" class="icon edit-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="edit icon"><path d="M430.818 653.65a60.46 60.46 0 0 1-50.96-93.281l71.69-114.012 7.773-10.365L816.038 80.138A60.46 60.46 0 0 1 859.225 62a60.46 60.46 0 0 1 43.186 18.138l43.186 43.186a60.46 60.46 0 0 1 0 86.373L588.879 565.55l-8.637 8.637-117.466 68.234a60.46 60.46 0 0 1-31.958 11.229z"></path><path d="M728.802 962H252.891A190.883 190.883 0 0 1 62.008 771.98V296.934a190.883 190.883 0 0 1 190.883-192.61h267.754a60.46 60.46 0 0 1 0 120.92H252.891a69.962 69.962 0 0 0-69.098 69.099V771.98a69.962 69.962 0 0 0 69.098 69.098h475.911A69.962 69.962 0 0 0 797.9 771.98V503.363a60.46 60.46 0 1 1 120.922 0V771.98A190.883 190.883 0 0 1 728.802 962z"></path></svg><!--]-->发现错误?在 GitHub 上编辑此页<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div><div class="meta-item git-info"><!----><!----></div></footer><!----><!----><!----><!--]--></main><!--]--><footer style="padding-bottom:2rem;"><span id="doc-version" style="display:none;">rel/0.13</span><p style="text-align:center;color:#909399;font-size:12px;margin:0 30px;">Copyright © 2023 The Apache Software Foundation.<br> Apache and the Apache feather logo are trademarks of The Apache Software Foundation</p><p style="text-align:center;margin-top:10px;color:#909399;font-size:12px;margin:0 30px;"><strong>Have a question?</strong> Connect with us on QQ, WeChat, or Slack. <a href="https://github.com/apache/iotdb/issues/1995">Join the community</a> now.</p><p style="text-align:center;margin-top:10px;color:#909399;font-size:12px;margin:0 30px;"> We use <a href="https://analytics.google.com">Google Analytics</a> to collect anonymous, aggregated usage information. </p></footer></div><!--]--><!--]--><!----><!--]--></div>
<script type="module" src="/assets/app-cbe6e1e7.js" defer></script>
</body>
</html>