blob: 9f235abf916d8db8081cf7953336c991e60ba376 [file] [log] [blame]
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4595],{28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>i});var s=n(96540);const o={},r=s.createContext(o);function a(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),s.createElement(r.Provider,{value:t},e.children)}},61298:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"operations/reset-cluster","title":"reset-cluster tool","description":"\x3c!--","source":"@site/docs/32.0.0/operations/reset-cluster.md","sourceDirName":"operations","slug":"/operations/reset-cluster","permalink":"/docs/32.0.0/operations/reset-cluster","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"reset-cluster","title":"reset-cluster tool"},"sidebar":"docs","previous":{"title":"dump-segment tool","permalink":"/docs/32.0.0/operations/dump-segment"},"next":{"title":"insert-segment-to-db tool","permalink":"/docs/32.0.0/operations/insert-segment-to-db"}}');var o=n(74848),r=n(28453);const a={id:"reset-cluster",title:"reset-cluster tool"},i=void 0,l={},d=[];function c(e){const t={code:"code",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"reset-cluster"})," tool can be used to completely wipe out Apache Druid cluster state stored on Metadata and Deep storage. This is\nintended to be used in dev/test environments where you typically want to reset the cluster before running\nthe test suite.\n",(0,o.jsx)(t.code,{children:"reset-cluster"})," automatically figures out necessary information from Druid cluster configuration. So the java classpath\nused in the command must have all the necessary druid configuration files."]}),"\n",(0,o.jsx)(t.p,{children:"It can be run in one of the following ways."}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:'java -classpath "/my/druid/lib/*" -Ddruid.extensions.loadList="[]" org.apache.druid.cli.Main \\\n tools reset-cluster \\\n [--metadataStore] \\\n [--segmentFiles] \\\n [--taskLogs] \\\n [--hadoopWorkingPath]\n'})}),"\n",(0,o.jsx)(t.p,{children:"or"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:'java -classpath "/my/druid/lib/*" -Ddruid.extensions.loadList="[]" org.apache.druid.cli.Main \\\n tools reset-cluster \\\n --all\n'})}),"\n",(0,o.jsx)(t.p,{children:"Usage documentation can be printed by running following command."}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:'$ java -classpath "/my/druid/lib/*" -Ddruid.extensions.loadList="[]" org.apache.druid.cli.Main help tools reset-cluster\n\nNAME\n druid tools reset-cluster - Cleanup all persisted state from metadata\n and deep storage.\n\nSYNOPSIS\n druid tools reset-cluster [--all] [--hadoopWorkingPath]\n [--metadataStore] [--segmentFiles] [--taskLogs]\n\nOPTIONS\n --all\n delete all state stored in metadata and deep storage\n\n --hadoopWorkingPath\n delete hadoopWorkingPath\n\n --metadataStore\n delete all records in metadata storage\n\n --segmentFiles\n delete all segment files from deep storage\n\n --taskLogs\n delete all tasklogs\n'})})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}}}]);