You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by Yuhua Ren <24...@qq.com.INVALID> on 2022/05/27 02:24:23 UTC

回复: Flush function in cluster

+1


Best,
Yuhua Ren


Yuhua&nbsp;Ren
2452431987@qq.com



&nbsp;




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "dev"                                                                                    <qiaojialin@apache.org&gt;;
发送时间:&nbsp;2022年5月26日(星期四) 晚上10:07
收件人:&nbsp;"dev"<dev@iotdb.apache.org&gt;;

主题:&nbsp;Re: Flush function in cluster



Hi,

We need to support specifying no sg. How about:

FLUSH [(<sg&gt;,)*<sg&gt;] [ON (LOCAL|CLUSTER)]

Some examples:

flush root.sg1【flush root.sg1 on current datanode】
flush root.sg1 on local 【flush root.sg1 on current datanode】
flush root.sg1 on cluster&nbsp; 【flush root.sg1 on all datanodes】
flush on cluster 【flush all sgs on all datanodes】
flush on local&nbsp; 【flush all sgs on current datanode】
flush 【flush all sgs on current datanode】

In the standalone version, "on cluster" will be rejected.

Thanks,
—————————————————
Jialin Qiao
Apache IoTDB PMC


Xiangdong Huang <sainthxd@gmail.com&gt; 于2022年5月23日周一 21:25写道:

&gt; OK... SQL should look like a complete sentence..&nbsp; So, how about "FLUSH
&gt;&nbsp; (<sg&gt;,)*<sg&gt; [ON&nbsp; LOCAL, CLUSTER]"
&gt; If [ON LOCAL] is omitted, then it just flushes locally.
&gt;
&gt; -----------------------------------
&gt; Xiangdong Huang
&gt; School of Software, Tsinghua University
&gt;
&gt;&nbsp; 黄向东
&gt; 清华大学 软件学院
&gt;
&gt;
&gt; Eric Pai <ericpai94@hotmail.com&gt; 于2022年5月23日周一 11:53写道:
&gt;
&gt; &gt; As we want to define the SQL grammar, it's not a good choice to use Unix
&gt; &gt; command line style syntax.
&gt; &gt;
&gt; &gt; 在 2022/5/23 11:42,“Xiangdong Huang”<sainthxd@gmail.com&gt; 写入:
&gt; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; how about:&nbsp; flush [<sg&gt;, <sg&gt;] [--all-nodes] [-node <ip&gt;]
&gt; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; omitting [<sg&gt;]&nbsp; means flush all sgs.
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; -- all-nodes means flush on each nodes
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; -node <ip&gt; means flush on the given node
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; omitting [-node <ip&gt;] and [--all-nodes] equals [-node 127.0.0.1]
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; --all-nodes and -node are mutually exclusive
&gt; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Best,
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; -----------------------------------
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Xiangdong Huang
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; School of Software, Tsinghua University
&gt; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 黄向东
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; 清华大学 软件学院
&gt; &gt;
&gt; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Eric Pai <ericpai94@hotmail.com&gt; 于2022年5月23日周一 11:27写道:
&gt; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; +1. It's not necessary to give 2 different syntax but with same
&gt; &gt; meaning.
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Just define the most suitable one.
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; 在 2022/5/23 11:22,“Haonan Hou”<hhaonan4444@qq.com.INVALID&gt; 写入:
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Hi,
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; +1 for `FLUSH ALL` syntax.
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; `FLUSH` and `FLUSH sg` are the existing syntax of the current
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; standalone version.
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; If we execute `FLUSH ALL` on standalone IoTDB, it can be equals
&gt; &gt; to
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; `Flush` command.
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; `flush cluster` sounds meaningless for standalone IoTDB.
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Best,
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; Haonan Hou
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; On May 23, 2022, at 11:07 AM, Jialin Qiao <
&gt; &gt; qiaojialin@apache.org&gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; wrote:
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Hi,
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Flush is a frequently used command in IoTDB, which flushes
&gt; &gt; memtable
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; into
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; disk and closes all tsfiles.
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; In the new cluster, we need to redefine this function [1].
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; * flush: flushing current datanode
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; * flush all/cluster: flushing all datanodes
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; * flush sg: flush all DataRegions of a storage group
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; What do you think?
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; [1]
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;
&gt; https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FIOTDB-3099&amp;amp;data=05%7C01%7C%7C9bf11e7a5a2c4b8270f708da3c6e3868%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637888741347695139%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=UY0gbvyZNox8WctT7N0yK6hz71NiWtZh%2BtW18TO4uOw%3D&amp;amp;reserved=0
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; —————————————————
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Jialin Qiao
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Apache IoTDB PMC
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;
&gt; &gt;
&gt; &gt;
&gt;