DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. How to Configure Druid to Use Minio as Deep Storage

How to Configure Druid to Use Minio as Deep Storage

In this post, we'll show you how to configure non-Amazon S3 deep storage for a Druid cluster, using the Minio distributed object storage server.

Monzurul Haque Shimul user avatar by
Monzurul Haque Shimul
·
Nov. 13, 18 · Tutorial
Like (2)
Save
Tweet
Share
8.38K Views

Join the DZone community and get the full member experience.

Join For Free

Apache Druid (incubating) is a high performance analytics data store for event-driven data. Druid relies on a distributed filesystem or binary object store for data storage. The most commonly used deep storage implementations are S3 (popular for those on AWS) and HDFS (popular if you already have a Hadoop deployment). In this post, I will show you how to configure non-Amazon S3 deep storage for a Druid cluster. And for this, I will use Minio as S3 deep storage for a Druid cluster.

Minio

Minio is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. The Amazon S3 API is the de facto standard for object storage. Minio implements the Amazon S3 v2/v4 API. It is best suited for storing unstructured data such as photos, videos, log files, backups, and container/VM images. Size of an object can range from a few KBs to a maximum of 5TB.

At first you need to install Minio. Follow the instructions given here to install Minio. The Minio Server comes up with an embedded web-based object browser. Point your web browser to http://127.0.0.1:9000 to ensure your server has started successfully.

Now that you have installed Minio, let's create a bucket named cpbucket (or your preferred name) from the web-ui or you can also do that using the Minio Client (mc). See the documentation for more details about mc.

Druid

Now it’s time to configure Druid. In the conf/druid/_common/common.runtime.propertiesfile, add “druid-s3-extensions” to druid.extensions.loadList. If, for example, the list already contains “druid-parser-route,” the final property should look like:

druid.extensions.loadList=["druid-parser-route", "druid-s3-extensions"]

The S3 extension for deep storage uses jets3t under the hood. You need to create a jets3t.properties file on the class path. Let’s create a new file jets3t.propertiesinside theconf/druid/_common directory with following:

s3service.s3-endpoint=localhost
s3service.s3-endpoint-http-port=9000
s3service.disable-dns-buckets=true
s3service.https-only=false

Now, comment out the configurations for local storage under the “Deep Storage” section and add appropriate values for Minio. After this, the “Deep Storage” section should look like:

#
# Deep storage
#

# For local disk (only viable in a cluster if this is a network mount):
# druid.storage.type=local
# druid.storage.storageDirectory=var/druid/segments

# For HDFS:
# druid.storage.type=hdfs
# druid.storage.storageDirectory=/druid/segments

# For S3:
druid.storage.type=s3
druid.storage.bucket=cpbucket
druid.storage.baseKey=druid/segments
druid.s3.accessKey=...
druid.s3.secretKey=...

To configure indexing service logs to be stored in Minio, update the “Indexing service logs” section with appropriate values in conf/druid/_common/common.runtime.properties.

After this, the “Indexing service logs” section should look like:

#
# Indexing service logs
#

# For local disk (only viable in a cluster if this is a network mount):
# druid.indexer.logs.type=file
# druid.indexer.logs.directory=var/druid/indexing-logs

# For HDFS:
# druid.indexer.logs.type=hdfs
# druid.indexer.logs.directory=/druid/indexing-logs

# For S3:
druid.indexer.logs.type=s3
druid.indexer.logs.s3Bucket=cpbucket
druid.indexer.logs.s3Prefix=druid/indexing-logs

And you’re done. Now restart the servers for these changes to take effect. To test if it is working, load the sample wikipedia data into Druid and see the data stored in Minio using the web-ui or mccommand.

MinIO Druid (open-source data store) AWS

Published at DZone with permission of Monzurul Haque Shimul. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Reliability Is Slowing You Down
  • Container Security: Don't Let Your Guard Down
  • How To Handle Secrets in Docker
  • Cloud Performance Engineering

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: