blob: a12e89d6b4b5c57c330399ce2b86ef2203f4e778 [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{435:function(t,e,a){"use strict";a.r(e);var s=a(29),n=Object(s.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h2",{attrs:{id:"cluster-setup"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#cluster-setup"}},[t._v("#")]),t._v(" Cluster Setup")]),t._v(" "),e("p",[t._v("This article is the setup process of IoTDB Cluster (0.14.0-preview1).")]),t._v(" "),e("h2",{attrs:{id:"environments"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#environments"}},[t._v("#")]),t._v(" Environments")]),t._v(" "),e("ol",[e("li",[e("p",[t._v("JDK>=1.8")])]),t._v(" "),e("li",[e("p",[t._v("Max open file 65535")])]),t._v(" "),e("li",[e("p",[t._v("Disable the swap memory")])])]),t._v(" "),e("h2",{attrs:{id:"get-the-binary-distribution"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#get-the-binary-distribution"}},[t._v("#")]),t._v(" Get the binary distribution")]),t._v(" "),e("h3",{attrs:{id:"download"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#download"}},[t._v("#")]),t._v(" Download")]),t._v(" "),e("p",[t._v("Download the binary distribution from website "),e("a",{attrs:{href:"https://iotdb.apache.org/Download/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Download Page"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"compiled-from-source-code"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#compiled-from-source-code"}},[t._v("#")]),t._v(" Compiled from source code")]),t._v(" "),e("p",[t._v("Download the source code:")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("git clone https://github.com/apache/iotdb.git\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("The default branch is master, you could checkout to the release tag:")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("git checkout v0.14.0-preview1\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Under the source root folder:")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("mvn clean package -pl distribution -am -DskipTests\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Then you will get the binary distribution under "),e("strong",[t._v("distribution/target")]),t._v(", in which the "),e("strong",[t._v("all-bin")]),t._v(" contains ConfigNode and DataNode,and DataNode contains the Cli.")]),t._v(" "),e("h2",{attrs:{id:"binary-distribution-content"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#binary-distribution-content"}},[t._v("#")]),t._v(" Binary Distribution Content")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[e("strong",[t._v("Folder")])]),t._v(" "),e("th",[e("strong",[t._v("Description")])])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("confignode")]),t._v(" "),e("td",[t._v("Contains start/stop shell, configurations, logs, data of ConfigNode")])]),t._v(" "),e("tr",[e("td",[t._v("datanode")]),t._v(" "),e("td",[t._v("Contains start/stop shell, configurations, logs, data of DataNode, cli shell")])]),t._v(" "),e("tr",[e("td",[t._v("grafana-metrics-example")]),t._v(" "),e("td",[t._v("Grafana metric page module")])]),t._v(" "),e("tr",[e("td",[t._v("lib")]),t._v(" "),e("td",[t._v("Jar files folder")])]),t._v(" "),e("tr",[e("td",[t._v("tools")]),t._v(" "),e("td",[t._v("System tools")])])])]),t._v(" "),e("h2",{attrs:{id:"start-the-cluster"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#start-the-cluster"}},[t._v("#")]),t._v(" Start the Cluster")]),t._v(" "),e("p",[t._v("Users could start a cluster which contains multiple ConfigNode and DataNode.\nA cluster need at least one ConfigNode and no less than the number of data/schema_replication_factor DataNodes.")]),t._v(" "),e("p",[t._v("The total process are three steps:")]),t._v(" "),e("ul",[e("li",[t._v("Start the first ConfigNode")]),t._v(" "),e("li",[t._v("Add ConfigNode (Optional)")]),t._v(" "),e("li",[t._v("Add DataNode")])]),t._v(" "),e("h3",{attrs:{id:"start-the-first-confignode"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#start-the-first-confignode"}},[t._v("#")]),t._v(" Start the first ConfigNode")]),t._v(" "),e("p",[t._v("Please set the important parameters in iotdb-confignode.properties:")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[e("strong",[t._v("Configuration")])]),t._v(" "),e("th",[e("strong",[t._v("Description")])])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("internal_address")]),t._v(" "),e("td",[t._v("Internal rpc service address of ConfigNode")])]),t._v(" "),e("tr",[e("td",[t._v("internal_port")]),t._v(" "),e("td",[t._v("Internal rpc service address of ConfigNode")])]),t._v(" "),e("tr",[e("td",[t._v("consensus_port")]),t._v(" "),e("td",[t._v("ConfigNode replication consensus protocol communication port")])]),t._v(" "),e("tr",[e("td",[t._v("target_config_nodes")]),t._v(" "),e("td",[t._v("Target ConfigNode address, if the current is the first ConfigNode, then set its address:port")])]),t._v(" "),e("tr",[e("td",[t._v("data_replication_factor")]),t._v(" "),e("td",[t._v("Data replication factor, no more than DataNode number")])]),t._v(" "),e("tr",[e("td",[t._v("data_region_consensus_protocol_class")]),t._v(" "),e("td",[t._v("Consensus protocol of data replicas")])]),t._v(" "),e("tr",[e("td",[t._v("schema_replication_factor")]),t._v(" "),e("td",[t._v("Schema replication factor, no more than DataNode number")])]),t._v(" "),e("tr",[e("td",[t._v("schema_region_consensus_protocol_class")]),t._v(" "),e("td",[t._v("Consensus protocol of schema replicas")])])])]),t._v(" "),e("p",[t._v("Start on Linux")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("# Foreground\n./confignode/sbin/start-confignode.sh\n\n# Background\nnohup ./confignode/sbin/start-confignode.sh >/dev/null 2>&1 &\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br")])]),e("p",[t._v("Start on Windows")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("confignode\\sbin\\start-confignode.bat\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("More details "),e("a",{attrs:{href:"https://iotdb.apache.org/UserGuide/Master/Reference/ConfigNode-Config-Manual.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("ConfigNode Configurations"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"add-confignode-optional"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#add-confignode-optional"}},[t._v("#")]),t._v(" Add ConfigNode (Optional)")]),t._v(" "),e("p",[t._v("This will add the replication factor of ConfigNode, except for the port couldn't conflict, make sure other configurations are the same with existing ConfigNode in Cluster.")]),t._v(" "),e("p",[t._v("The adding ConfigNode also use the start-confignode.sh/bat.")]),t._v(" "),e("h3",{attrs:{id:"start-datanode"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#start-datanode"}},[t._v("#")]),t._v(" Start DataNode")]),t._v(" "),e("p",[t._v("You could add any number of DataNode.")]),t._v(" "),e("p",[t._v("Please set the important parameters in iotdb-datanode.properties")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[e("strong",[t._v("Configuration")])]),t._v(" "),e("th",[e("strong",[t._v("Description")])])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("rpc_address")]),t._v(" "),e("td",[t._v("Client RPC Service address")])]),t._v(" "),e("tr",[e("td",[t._v("rpc_port")]),t._v(" "),e("td",[t._v("Client RPC Service port")])]),t._v(" "),e("tr",[e("td",[t._v("internal_address")]),t._v(" "),e("td",[t._v("Control flow address of DataNode inside cluster")])]),t._v(" "),e("tr",[e("td",[t._v("internal_port")]),t._v(" "),e("td",[t._v("Control flow port of DataNode inside cluster")])]),t._v(" "),e("tr",[e("td",[t._v("mpp_data_exchange_port")]),t._v(" "),e("td",[t._v("Data flow port of DataNode inside cluster")])]),t._v(" "),e("tr",[e("td",[t._v("data_region_consensus_port")]),t._v(" "),e("td",[t._v("Data replicas communication port for consensus")])]),t._v(" "),e("tr",[e("td",[t._v("schema_region_consensus_port")]),t._v(" "),e("td",[t._v("Schema replicas communication port for consensus")])]),t._v(" "),e("tr",[e("td",[t._v("target_config_nodes")]),t._v(" "),e("td",[t._v("Running ConfigNode of the Cluster")])])])]),t._v(" "),e("p",[t._v("Start on Linux")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("# Foreground\n./datanode/sbin/start-datanode.sh\n\n# Background\nnohup ./datanode/sbin/start-datanode.sh >/dev/null 2>&1 &\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br")])]),e("p",[t._v("Start on Windows")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("datanode\\sbin\\start-datanode.bat\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("More details "),e("a",{attrs:{href:"https://iotdb.apache.org/UserGuide/Master/Reference/DataNode-Config-Manual.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("DataNode Configurations"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"start-cli"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#start-cli"}},[t._v("#")]),t._v(" Start Cli")]),t._v(" "),e("p",[t._v("Cli is in datanode/sbin folder")]),t._v(" "),e("p",[t._v("Start on Linux")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("./datanode/sbin/start-cli.sh\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("p",[t._v("Start on Windows")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("datanode\\sbin\\start-cli.bat\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])]),e("h2",{attrs:{id:"quick-start"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#quick-start"}},[t._v("#")]),t._v(" Quick Start")]),t._v(" "),e("p",[t._v("unzip apache-iotdb-0.14.0-preview1-all-bin.zip")]),t._v(" "),e("p",[t._v("Deploy a one-ConfigNode and one-DataNode(1C1D)cluster, default is one replica.")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("./confignode/sbin/start-confignode.sh\n./datanode/sbin/start-datanode.sh\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br")])]),e("p",[t._v("Start Cli")]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("./datanode/sbin/start-cli.sh\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br")])])])}),[],!1,null,null,null);e.default=n.exports}}]);