blob: 046eb38badf2d4d934bad44ce733b562bacc3c7e [file] [log] [blame]
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4687],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>g});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),d=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=d(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=d(r),m=a,g=u["".concat(s,".").concat(m)]||u[m]||c[m]||o;return r?n.createElement(g,l(l({ref:t},p),{},{components:r})):n.createElement(g,l({ref:t},p))}));function g(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=m;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[u]="string"==typeof e?e:a,l[1]=i;for(var d=2;d<o;d++)l[d]=r[d];return n.createElement.apply(null,l)}return n.createElement.apply(null,r)}m.displayName="MDXCreateElement"},5887:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>g,frontMatter:()=>i,metadata:()=>d,toc:()=>u});var n=r(7462),a=r(3366),o=(r(7294),r(3905)),l=["components"],i={id:"deep-storage",title:"Deep storage"},s=void 0,d={unversionedId:"dependencies/deep-storage",id:"dependencies/deep-storage",title:"Deep storage",description:"\x3c!--",source:"@site/docs/26.0.0/dependencies/deep-storage.md",sourceDirName:"dependencies",slug:"/dependencies/deep-storage",permalink:"/docs/26.0.0/dependencies/deep-storage",draft:!1,tags:[],version:"current",frontMatter:{id:"deep-storage",title:"Deep storage"},sidebar:"docs",previous:{title:"Processes and servers",permalink:"/docs/26.0.0/design/processes"},next:{title:"Metadata storage",permalink:"/docs/26.0.0/dependencies/metadata-storage"}},p={},u=[{value:"Local",id:"local",level:2},{value:"Amazon S3 or S3-compatible",id:"amazon-s3-or-s3-compatible",level:2},{value:"Google Cloud Storage",id:"google-cloud-storage",level:2},{value:"Azure Blob Storage",id:"azure-blob-storage",level:2},{value:"HDFS",id:"hdfs",level:2},{value:"Additional options",id:"additional-options",level:2}],c={toc:u},m="wrapper";function g(e){var t=e.components,r=(0,a.Z)(e,l);return(0,o.kt)(m,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Deep storage is where segments are stored. It is a storage mechanism that Apache Druid does not provide. This deep storage infrastructure defines the level of durability of your data, as long as Druid processes can see this storage infrastructure and get at the segments stored on it, you will not lose data no matter how many Druid nodes you lose. If segments disappear from this storage layer, then you will lose whatever data those segments represented."),(0,o.kt)("h2",{id:"local"},"Local"),(0,o.kt)("p",null,"Local storage is intended for use in the following situations:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"You have just one server."),(0,o.kt)("li",{parentName:"ul"},"Or, you have multiple servers, and they all have access to a shared filesystem (for example: NFS).")),(0,o.kt)("p",null,"In multi-server production clusters, rather than local storage with a shared filesystem, it is instead recommended to\nuse cloud-based deep storage (",(0,o.kt)("a",{parentName:"p",href:"#amazon-s3-or-s3-compatible"},"Amazon S3"),", ",(0,o.kt)("a",{parentName:"p",href:"#google-cloud-storage"},"Google Cloud Storage"),",\nor ",(0,o.kt)("a",{parentName:"p",href:"#azure-blob-storage"},"Azure Blob Storage"),"), S3-compatible storage (like Minio), or ",(0,o.kt)("a",{parentName:"p",href:"#hdfs"},"HDFS"),". These options are\ngenerally more convenient, more scalable, and more robust than setting up a shared filesystem."),(0,o.kt)("p",null,"The following configurations in ",(0,o.kt)("inlineCode",{parentName:"p"},"common.runtime.properties")," apply to local storage:"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Property"),(0,o.kt)("th",{parentName:"tr",align:null},"Possible Values"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"),(0,o.kt)("th",{parentName:"tr",align:null},"Default"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"druid.storage.type")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"local")),(0,o.kt)("td",{parentName:"tr",align:null}),(0,o.kt)("td",{parentName:"tr",align:null},"Must be set.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"druid.storage.storageDirectory")),(0,o.kt)("td",{parentName:"tr",align:null},"any local directory"),(0,o.kt)("td",{parentName:"tr",align:null},"Directory for storing segments. Must be different from ",(0,o.kt)("inlineCode",{parentName:"td"},"druid.segmentCache.locations")," and ",(0,o.kt)("inlineCode",{parentName:"td"},"druid.segmentCache.infoDir"),"."),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"/tmp/druid/localStorage"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"druid.storage.zip")),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"true"),", ",(0,o.kt)("inlineCode",{parentName:"td"},"false")),(0,o.kt)("td",{parentName:"tr",align:null},"Whether segments in ",(0,o.kt)("inlineCode",{parentName:"td"},"druid.storage.storageDirectory")," are written as directories (",(0,o.kt)("inlineCode",{parentName:"td"},"false"),") or zip files (",(0,o.kt)("inlineCode",{parentName:"td"},"true"),")."),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"false"))))),(0,o.kt)("p",null,"For example:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"druid.storage.type=local\ndruid.storage.storageDirectory=/tmp/druid/localStorage\n")),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"druid.storage.storageDirectory")," must be set to a different path than ",(0,o.kt)("inlineCode",{parentName:"p"},"druid.segmentCache.locations")," or\n",(0,o.kt)("inlineCode",{parentName:"p"},"druid.segmentCache.infoDir"),"."),(0,o.kt)("h2",{id:"amazon-s3-or-s3-compatible"},"Amazon S3 or S3-compatible"),(0,o.kt)("p",null,"See ",(0,o.kt)("a",{parentName:"p",href:"/docs/26.0.0/development/extensions-core/s3"},(0,o.kt)("inlineCode",{parentName:"a"},"druid-s3-extensions")),"."),(0,o.kt)("h2",{id:"google-cloud-storage"},"Google Cloud Storage"),(0,o.kt)("p",null,"See ",(0,o.kt)("a",{parentName:"p",href:"/docs/26.0.0/development/extensions-core/google"},(0,o.kt)("inlineCode",{parentName:"a"},"druid-google-extensions")),"."),(0,o.kt)("h2",{id:"azure-blob-storage"},"Azure Blob Storage"),(0,o.kt)("p",null,"See ",(0,o.kt)("a",{parentName:"p",href:"/docs/26.0.0/development/extensions-core/azure"},(0,o.kt)("inlineCode",{parentName:"a"},"druid-azure-extensions")),"."),(0,o.kt)("h2",{id:"hdfs"},"HDFS"),(0,o.kt)("p",null,"See ",(0,o.kt)("a",{parentName:"p",href:"/docs/26.0.0/development/extensions-core/hdfs"},"druid-hdfs-storage extension documentation"),"."),(0,o.kt)("h2",{id:"additional-options"},"Additional options"),(0,o.kt)("p",null,"For additional deep storage options, please see our ",(0,o.kt)("a",{parentName:"p",href:"/docs/26.0.0/development/extensions"},"extensions list"),"."))}g.isMDXComponent=!0}}]);