blob: 9f2b90eb0c2b4611141e06cc8a82be15e6801f94 [file] [log] [blame]
<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-api-reference/legacy-metadata-api">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.4.1">
<title data-rh="true">Legacy metadata API | Apache® Druid</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://druid.apache.org/img/druid_nav.png"><meta data-rh="true" name="twitter:image" content="https://druid.apache.org/img/druid_nav.png"><meta data-rh="true" property="og:url" content="https://druid.apache.org/docs/27.0.0/api-reference/legacy-metadata-api"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Legacy metadata API | Apache® Druid"><meta data-rh="true" name="description" content="&lt;!--"><meta data-rh="true" property="og:description" content="&lt;!--"><link data-rh="true" rel="icon" href="/img/favicon.png"><link data-rh="true" rel="canonical" href="https://druid.apache.org/docs/27.0.0/api-reference/legacy-metadata-api"><link data-rh="true" rel="alternate" href="https://druid.apache.org/docs/27.0.0/api-reference/legacy-metadata-api" hreflang="en"><link data-rh="true" rel="alternate" href="https://druid.apache.org/docs/27.0.0/api-reference/legacy-metadata-api" hreflang="x-default"><link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-131010415-1"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-131010415-1",{})</script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script><link rel="stylesheet" href="/assets/css/styles.f80751b3.css">
<link rel="preload" href="/assets/js/runtime~main.5371e784.js" as="script">
<link rel="preload" href="/assets/js/main.832012d1.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}return t}()||function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="navbar navbar--fixed-top navbar--dark"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/druid_nav.png" alt="Apache® Druid" class="themedImage_ToTc themedImage--light_HNdA"><img src="/img/druid_nav.png" alt="Apache® Druid" class="themedImage_ToTc themedImage--dark_i4oU"></div></a></div><div class="navbar__items navbar__items--right"><a class="navbar__item navbar__link" href="/technology">Technology</a><a class="navbar__item navbar__link" href="/use-cases">Use Cases</a><a class="navbar__item navbar__link" href="/druid-powered">Powered By</a><a class="navbar__item navbar__link" href="/docs/27.0.0/design/">Docs</a><a class="navbar__item navbar__link" href="/community/">Community</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Apache®</a><ul class="dropdown__menu"><li><a href="https://www.apache.org/" target="_blank" rel="noopener noreferrer" class="dropdown__link">Foundation<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://apachecon.com/?ref=druid.apache.org" target="_blank" rel="noopener noreferrer" class="dropdown__link">Events<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/licenses/" target="_blank" rel="noopener noreferrer" class="dropdown__link">License<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Thanks<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/security/" target="_blank" rel="noopener noreferrer" class="dropdown__link">Security<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Sponsorship<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><a class="navbar__item navbar__link" href="/downloads/">Download</a><div class="searchBox_ZlJk"><div class="navbar__search"><span aria-label="expand searchbar" role="button" class="search-icon" tabindex="0"></span><input type="search" id="search_input_react" placeholder="Loading..." aria-label="Search" class="navbar__search-input search-bar" disabled=""></div></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/27.0.0/design/">Getting started</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/27.0.0/tutorials/tutorial-msq-extern">Tutorials</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/27.0.0/design/architecture">Design</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/27.0.0/ingestion/">Ingestion</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/27.0.0/data-management/">Data management</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/27.0.0/querying/sql">Querying</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="/docs/27.0.0/api-reference/">API reference</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/">Overview</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" tabindex="0" href="/docs/27.0.0/api-reference/sql-api">HTTP APIs</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/sql-api">Druid SQL</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/sql-ingestion-api">SQL-based ingestion</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/json-querying-api">JSON querying</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/tasks-api">Tasks</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/supervisor-api">Supervisors</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/retention-rules-api">Retention rules</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/data-management-api">Data management</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/automatic-compaction-api">Automatic compaction</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/lookups-api">Lookups</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/service-status-api">Service status</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/27.0.0/api-reference/dynamic-configuration-api">Dynamic configuration</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/27.0.0/api-reference/legacy-metadata-api">Legacy metadata</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/docs/27.0.0/api-reference/sql-jdbc">Java APIs</a></div></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/27.0.0/configuration/">Configuration</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/27.0.0/operations/web-console">Operations</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/27.0.0/development/overview">Development</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/docs/27.0.0/misc/papers-and-talks">Misc</a></div></li></ul></nav></div></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">API reference</span><meta itemprop="position" content="1"></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">HTTP APIs</span><meta itemprop="position" content="2"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Legacy metadata</span><meta itemprop="position" content="3"></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Legacy metadata API</h1></header><p>This document describes the legacy API endpoints to retrieve datasource metadata from Apache Druid. Use the <a href="/docs/27.0.0/querying/sql-metadata-tables">SQL metadata tables</a> to retrieve datasource metadata instead.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="segment-loading">Segment loading<a href="#segment-loading" class="hash-link" aria-label="Direct link to Segment loading" title="Direct link to Segment loading"></a></h2><p><code>GET /druid/coordinator/v1/loadstatus</code></p><p>Returns the percentage of segments actually loaded in the cluster versus segments that should be loaded in the cluster.</p><p><code>GET /druid/coordinator/v1/loadstatus?simple</code></p><p>Returns the number of segments left to load until segments that should be loaded in the cluster are available for queries. This does not include segment replication counts.</p><p><code>GET /druid/coordinator/v1/loadstatus?full</code></p><p>Returns the number of segments left to load in each tier until segments that should be loaded in the cluster are all available. This includes segment replication counts.</p><p><code>GET /druid/coordinator/v1/loadstatus?full&amp;computeUsingClusterView</code></p><p>Returns the number of segments not yet loaded for each tier until all segments loading in the cluster are available.
The result includes segment replication counts. It also factors in the number of available nodes that are of a service type that can load the segment when computing the number of segments remaining to load.
A segment is considered fully loaded when:</p><ul><li>Druid has replicated it the number of times configured in the corresponding load rule.</li><li>Or the number of replicas for the segment in each tier where it is configured to be replicated equals the available nodes of a service type that are currently allowed to load the segment in the tier.</li></ul><p><code>GET /druid/coordinator/v1/loadqueue</code></p><p>Returns the ids of segments to load and drop for each Historical process.</p><p><code>GET /druid/coordinator/v1/loadqueue?simple</code></p><p>Returns the number of segments to load and drop, as well as the total segment load and drop size in bytes for each Historical process.</p><p><code>GET /druid/coordinator/v1/loadqueue?full</code></p><p>Returns the serialized JSON of segments to load and drop for each Historical process.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="segment-loading-by-datasource">Segment loading by datasource<a href="#segment-loading-by-datasource" class="hash-link" aria-label="Direct link to Segment loading by datasource" title="Direct link to Segment loading by datasource"></a></h2><p>Note that all <em>interval</em> query parameters are ISO 8601 strings<!-- --><!-- -->for example, 2016-06-27/2016-06-28.
Also note that these APIs only guarantees that the segments are available at the time of the call.
Segments can still become missing because of historical process failures or any other reasons afterward.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?forceMetadataRefresh={boolean}&amp;interval={myInterval}</code></p><p>Returns the percentage of segments actually loaded in the cluster versus segments that should be loaded in the cluster for the given
datasource over the given interval (or last 2 weeks if interval is not given). <code>forceMetadataRefresh</code> is required to be set. </p><ul><li>Setting <code>forceMetadataRefresh</code> to true will force the coordinator to poll latest segment metadata from the metadata store
(Note: <code>forceMetadataRefresh=true</code> refreshes Coordinator&#x27;s metadata cache of all datasources. This can be a heavy operation in terms
of the load on the metadata store but can be necessary to make sure that we verify all the latest segments&#x27; load status)</li><li>Setting <code>forceMetadataRefresh</code> to false will use the metadata cached on the coordinator from the last force/periodic refresh.
If no used segments are found for the given inputs, this API returns <code>204 No Content</code></li></ul><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?simple&amp;forceMetadataRefresh={boolean}&amp;interval={myInterval}</code></p><p>Returns the number of segments left to load until segments that should be loaded in the cluster are available for the given datasource
over the given interval (or last 2 weeks if interval is not given). This does not include segment replication counts. <code>forceMetadataRefresh</code> is required to be set. </p><ul><li>Setting <code>forceMetadataRefresh</code> to true will force the coordinator to poll latest segment metadata from the metadata store
(Note: <code>forceMetadataRefresh=true</code> refreshes Coordinator&#x27;s metadata cache of all datasources. This can be a heavy operation in terms
of the load on the metadata store but can be necessary to make sure that we verify all the latest segments&#x27; load status)</li><li>Setting <code>forceMetadataRefresh</code> to false will use the metadata cached on the coordinator from the last force/periodic refresh.
If no used segments are found for the given inputs, this API returns <code>204 No Content</code></li></ul><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/loadstatus?full&amp;forceMetadataRefresh={boolean}&amp;interval={myInterval}</code></p><p>Returns the number of segments left to load in each tier until segments that should be loaded in the cluster are all available for the given datasource over the given interval (or last 2 weeks if interval is not given). This includes segment replication counts. <code>forceMetadataRefresh</code> is required to be set. </p><ul><li>Setting <code>forceMetadataRefresh</code> to true will force the coordinator to poll latest segment metadata from the metadata store
(Note: <code>forceMetadataRefresh=true</code> refreshes Coordinator&#x27;s metadata cache of all datasources. This can be a heavy operation in terms
of the load on the metadata store but can be necessary to make sure that we verify all the latest segments&#x27; load status)</li><li>Setting <code>forceMetadataRefresh</code> to false will use the metadata cached on the coordinator from the last force/periodic refresh. </li></ul><p>You can pass the optional query parameter <code>computeUsingClusterView</code> to factor in the available cluster services when calculating
the segments left to load. See <a href="#segment-loading">Coordinator Segment Loading</a> for details.
If no used segments are found for the given inputs, this API returns <code>204 No Content</code></p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="metadata-store-information">Metadata store information<a href="#metadata-store-information" class="hash-link" aria-label="Direct link to Metadata store information" title="Direct link to Metadata store information"></a></h2><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p>Note: Much of this information is available in a simpler, easier-to-use form through the Druid SQL
<a href="/docs/27.0.0/querying/sql-metadata-tables#segments-table"><code>sys.segments</code></a> table.</p></div></div><p><code>GET /druid/coordinator/v1/metadata/segments</code></p><p>Returns a list of all segments for each datasource enabled in the cluster.</p><p><code>GET /druid/coordinator/v1/metadata/segments?datasources={dataSourceName1}&amp;datasources={dataSourceName2}</code></p><p>Returns a list of all segments for one or more specific datasources enabled in the cluster.</p><p><code>GET /druid/coordinator/v1/metadata/segments?includeOvershadowedStatus</code></p><p>Returns a list of all segments for each datasource with the full segment metadata and an extra field <code>overshadowed</code>.</p><p><code>GET /druid/coordinator/v1/metadata/segments?includeOvershadowedStatus&amp;datasources={dataSourceName1}&amp;datasources={dataSourceName2}</code></p><p>Returns a list of all segments for one or more specific datasources with the full segment metadata and an extra field <code>overshadowed</code>.</p><p><code>GET /druid/coordinator/v1/metadata/datasources</code></p><p>Returns a list of the names of datasources with at least one used segment in the cluster, retrieved from the metadata database. Users should call this API to get the eventual state that the system will be in.</p><p><code>GET /druid/coordinator/v1/metadata/datasources?includeUnused</code></p><p>Returns a list of the names of datasources, regardless of whether there are used segments belonging to those datasources in the cluster or not.</p><p><code>GET /druid/coordinator/v1/metadata/datasources?includeDisabled</code></p><p>Returns a list of the names of datasources, regardless of whether the datasource is disabled or not.</p><p><code>GET /druid/coordinator/v1/metadata/datasources?full</code></p><p>Returns a list of all datasources with at least one used segment in the cluster. Returns all metadata about those datasources as stored in the metadata store.</p><p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}</code></p><p>Returns full metadata for a datasource as stored in the metadata store.</p><p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments</code></p><p>Returns a list of all segments for a datasource as stored in the metadata store.</p><p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?full</code></p><p>Returns a list of all segments for a datasource with the full segment metadata as stored in the metadata store.</p><p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments/{segmentId}</code></p><p>Returns full segment metadata for a specific segment as stored in the metadata store, if the segment is used. If the
segment is unused, or is unknown, a 404 response is returned.</p><p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments</code></p><p>Returns a list of all segments, overlapping with any of given intervals, for a datasource as stored in the metadata store. Request body is array of string IS0 8601 intervals like <code>[interval1, interval2,...]</code><!-- -->for example, <code>[&quot;2012-01-01T00:00:00.000/2012-01-03T00:00:00.000&quot;, &quot;2012-01-05T00:00:00.000/2012-01-07T00:00:00.000&quot;]</code>.</p><p><code>GET /druid/coordinator/v1/metadata/datasources/{dataSourceName}/segments?full</code></p><p>Returns a list of all segments, overlapping with any of given intervals, for a datasource with the full segment metadata as stored in the metadata store. Request body is array of string ISO 8601 intervals like <code>[interval1, interval2,...]</code><!-- -->for example, <code>[&quot;2012-01-01T00:00:00.000/2012-01-03T00:00:00.000&quot;, &quot;2012-01-05T00:00:00.000/2012-01-07T00:00:00.000&quot;]</code>.</p><a name="coordinator-datasources"></a><h2 class="anchor anchorWithStickyNavbar_LWe7" id="datasources">Datasources<a href="#datasources" class="hash-link" aria-label="Direct link to Datasources" title="Direct link to Datasources"></a></h2><p>Note that all <em>interval</em> URL parameters are ISO 8601 strings delimited by a <code>_</code> instead of a <code>/</code><!-- -->for example, <code>2016-06-27_2016-06-28</code>.</p><p><code>GET /druid/coordinator/v1/datasources</code></p><p>Returns a list of datasource names found in the cluster as seen by the coordinator. This view is updated every <a href="/docs/27.0.0/configuration/#coordinator-operation"><code>druid.coordinator.period</code></a>.</p><p><code>GET /druid/coordinator/v1/datasources?simple</code></p><p>Returns a list of JSON objects containing the name and properties of datasources found in the cluster. Properties include segment count, total segment byte size, replicated total segment byte size, minTime, and maxTime.</p><p><code>GET /druid/coordinator/v1/datasources?full</code></p><p>Returns a list of datasource names found in the cluster with all metadata about those datasources.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}</code></p><p>Returns a JSON object containing the name and properties of a datasource. Properties include segment count, total segment byte size, replicated total segment byte size, minTime, and maxTime.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}?full</code></p><p>Returns full metadata for a datasource.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals</code></p><p>Returns a set of segment intervals.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals?simple</code></p><p>Returns a map of an interval to a JSON object containing the total byte size of segments and number of segments for that interval.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals?full</code></p><p>Returns a map of an interval to a map of segment metadata to a set of server names that contain the segment for that interval.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}</code></p><p>Returns a set of segment ids for an interval.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?simple</code></p><p>Returns a map of segment intervals contained within the specified interval to a JSON object containing the total byte size of segments and number of segments for an interval.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}?full</code></p><p>Returns a map of segment intervals contained within the specified interval to a map of segment metadata to a set of server names that contain the segment for an interval.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/intervals/{interval}/serverview</code></p><p>Returns a map of segment intervals contained within the specified interval to information about the servers that contain the segment for an interval.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/segments</code></p><p>Returns a list of all segments for a datasource in the cluster.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/segments?full</code></p><p>Returns a list of all segments for a datasource in the cluster with the full segment metadata.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/segments/{segmentId}</code></p><p>Returns full segment metadata for a specific segment in the cluster.</p><p><code>GET /druid/coordinator/v1/datasources/{dataSourceName}/tiers</code></p><p>Return the tiers that a datasource exists in.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="intervals">Intervals<a href="#intervals" class="hash-link" aria-label="Direct link to Intervals" title="Direct link to Intervals"></a></h2><p>Note that all <em>interval</em> URL parameters are ISO 8601 strings delimited by a <code>_</code> instead of a <code>/</code> as in <code>2016-06-27_2016-06-28</code>.</p><p><code>GET /druid/coordinator/v1/intervals</code></p><p>Returns all intervals for all datasources with total size and count.</p><p><code>GET /druid/coordinator/v1/intervals/{interval}</code></p><p>Returns aggregated total size and count for all intervals that intersect given ISO interval.</p><p><code>GET /druid/coordinator/v1/intervals/{interval}?simple</code></p><p>Returns total size and count for each interval within given ISO interval.</p><p><code>GET /druid/coordinator/v1/intervals/{interval}?full</code></p><p>Returns total size and count for each datasource for each interval within given ISO interval.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="server-information">Server information<a href="#server-information" class="hash-link" aria-label="Direct link to Server information" title="Direct link to Server information"></a></h2><p><code>GET /druid/coordinator/v1/servers</code></p><p>Returns a list of servers URLs using the format <code>{hostname}:{port}</code>. Note that
processes that run with different types will appear multiple times with different
ports.</p><p><code>GET /druid/coordinator/v1/servers?simple</code></p><p>Returns a list of server data objects in which each object has the following keys:</p><ul><li><code>host</code>: host URL include (<code>{hostname}:{port}</code>)</li><li><code>type</code>: process type (<code>indexer-executor</code>, <code>historical</code>)</li><li><code>currSize</code>: storage size currently used</li><li><code>maxSize</code>: maximum storage size</li><li><code>priority</code></li><li><code>tier</code></li></ul><h2 class="anchor anchorWithStickyNavbar_LWe7" id="query-server">Query server<a href="#query-server" class="hash-link" aria-label="Direct link to Query server" title="Direct link to Query server"></a></h2><p>This section documents the API endpoints for the processes that reside on Query servers (Brokers) in the suggested <a href="/docs/27.0.0/design/processes#server-types">three-server configuration</a>.</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="broker">Broker<a href="#broker" class="hash-link" aria-label="Direct link to Broker" title="Direct link to Broker"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="datasource-information">Datasource information<a href="#datasource-information" class="hash-link" aria-label="Direct link to Datasource information" title="Direct link to Datasource information"></a></h4><p>Note that all <em>interval</em> URL parameters are ISO 8601 strings delimited by a <code>_</code> instead of a <code>/</code>
as in <code>2016-06-27_2016-06-28</code>.</p><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p>Note: Much of this information is available in a simpler, easier-to-use form through the Druid SQL
<a href="/docs/27.0.0/querying/sql-metadata-tables#tables-table"><code>INFORMATION_SCHEMA.TABLES</code></a>,
<a href="/docs/27.0.0/querying/sql-metadata-tables#columns-table"><code>INFORMATION_SCHEMA.COLUMNS</code></a>, and
<a href="/docs/27.0.0/querying/sql-metadata-tables#segments-table"><code>sys.segments</code></a> tables.</p></div></div><p><code>GET /druid/v2/datasources</code></p><p>Returns a list of queryable datasources.</p><p><code>GET /druid/v2/datasources/{dataSourceName}</code></p><p>Returns the dimensions and metrics of the datasource. Optionally, you can provide request parameter &quot;full&quot; to get list of served intervals with dimensions and metrics being served for those intervals. You can also provide request param &quot;interval&quot; explicitly to refer to a particular interval.</p><p>If no interval is specified, a default interval spanning a configurable period before the current time will be used. The default duration of this interval is specified in ISO 8601 duration format via: <code>druid.query.segmentMetadata.defaultHistory</code></p><p><code>GET /druid/v2/datasources/{dataSourceName}/dimensions</code></p><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p>This API is deprecated and will be removed in future releases. Please use <a href="/docs/27.0.0/querying/segmentmetadataquery">SegmentMetadataQuery</a> instead
which provides more comprehensive information and supports all dataSource types including streaming dataSources. It&#x27;s also encouraged to use <a href="/docs/27.0.0/querying/sql-metadata-tables">INFORMATION_SCHEMA tables</a>
if you&#x27;re using SQL.</p></div></div><p>Returns the dimensions of the datasource.</p><p><code>GET /druid/v2/datasources/{dataSourceName}/metrics</code></p><div class="theme-admonition theme-admonition-info alert alert--info admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>info</div><div class="admonitionContent_S0QG"><p>This API is deprecated and will be removed in future releases. Please use <a href="/docs/27.0.0/querying/segmentmetadataquery">SegmentMetadataQuery</a> instead
which provides more comprehensive information and supports all dataSource types including streaming dataSources. It&#x27;s also encouraged to use <a href="/docs/27.0.0/querying/sql-metadata-tables">INFORMATION_SCHEMA tables</a>
if you&#x27;re using SQL.</p></div></div><p>Returns the metrics of the datasource.</p><p><code>GET /druid/v2/datasources/{dataSourceName}/candidates?intervals={comma-separated-intervals}&amp;numCandidates={numCandidates}</code></p><p>Returns segment information lists including server locations for the given datasource and intervals. If &quot;numCandidates&quot; is not specified, it will return all servers for each interval.</p></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/27.0.0/api-reference/dynamic-configuration-api"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Dynamic configuration</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/27.0.0/api-reference/sql-jdbc"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">SQL JDBC driver</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#segment-loading" class="table-of-contents__link toc-highlight">Segment loading</a></li><li><a href="#segment-loading-by-datasource" class="table-of-contents__link toc-highlight">Segment loading by datasource</a></li><li><a href="#metadata-store-information" class="table-of-contents__link toc-highlight">Metadata store information</a></li><li><a href="#datasources" class="table-of-contents__link toc-highlight">Datasources</a></li><li><a href="#intervals" class="table-of-contents__link toc-highlight">Intervals</a></li><li><a href="#server-information" class="table-of-contents__link toc-highlight">Server information</a></li><li><a href="#query-server" class="table-of-contents__link toc-highlight">Query server</a><ul><li><a href="#broker" class="table-of-contents__link toc-highlight">Broker</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer"><div class="container container-fluid"><div class="footer__bottom text--center"><div class="margin-bottom--sm"><img src="/img/favicon.png" class="themedImage_ToTc themedImage--light_HNdA footer__logo"><img src="/img/favicon.png" class="themedImage_ToTc themedImage--dark_i4oU footer__logo"></div><div class="footer__copyright">Copyright © 2023 Apache Software Foundation. Except where otherwise noted, licensed under CC BY-SA 4.0. Apache Druid, Druid, and the Druid logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.</div></div></div></footer></div>
<script src="/assets/js/runtime~main.5371e784.js"></script>
<script src="/assets/js/main.832012d1.js"></script>
</body>
</html>