Skip to content

Adding example config files for indexer process. Also added status/selfDiscovered endpoint to indexer for self discovery#10679

Merged
xvrl merged 1 commit intoapache:masterfrom
harinirajendran:master
Dec 15, 2020
Merged

Adding example config files for indexer process. Also added status/selfDiscovered endpoint to indexer for self discovery#10679
xvrl merged 1 commit intoapache:masterfrom
harinirajendran:master

Conversation

@harinirajendran
Copy link
Copy Markdown
Contributor

@harinirajendran harinirajendran commented Dec 14, 2020

In this PR I have added example config files that can be used to spin up the indexer process. And have also added the status/selfDiscovered endpoint to indexer. Per the api-reference doc, all services support status/selfDiscovered endpoint. So this PR would fix that expected behavior.

Code changes:
Since the SelfDiscovered endpoint is registered in the middle manager here, I followed the similar pattern in CliIndexer.java file as well

Testing
Built my own docker image, added the following in docker-compose.yml file

+  indexer:
+    image: apache/druid:harini
+    container_name: indexer
+    volumes:
+      - ./storage:/opt/data
+      - middle_var:/opt/druid/var
+    depends_on:
+      - zookeeper
+      - postgres
+      - coordinator
+    ports:
+      - "8092:8091"
+    command:
+      - indexer
+    env_file:
+      - environment
+

Brought all the services up

hrajendran@Harini-Rajendran's-MBP16 docker % docker-compose up -d
Creating network "docker_default" with the default driver
Creating postgres  ... done
Creating zookeeper ... done
Creating coordinator ... done
Creating indexer       ... done
Creating router        ... done
Creating broker        ... done
Creating historical    ... done
Creating middlemanager ... done
hrajendran@Harini-Rajendran's-MBP16 docker % docker ps
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                                    NAMES
65dc5d38b6fa        apache/druid:harini   "/druid.sh broker"       2 minutes ago       Up About a minute   0.0.0.0:8082->8082/tcp                   broker
bc4d96b16aa5        apache/druid:harini   "/druid.sh historical"   2 minutes ago       Up About a minute   0.0.0.0:8083->8083/tcp                   historical
8630096058c1        apache/druid:harini   "/druid.sh middleMan…"   2 minutes ago       Up About a minute   0.0.0.0:8091->8091/tcp                   middlemanager
61b9c89be515        apache/druid:harini   "/druid.sh indexer"      2 minutes ago       Up About a minute   0.0.0.0:8092->8091/tcp                   indexer
d3c5d2f3e3ed        apache/druid:harini   "/druid.sh router"       2 minutes ago       Up About a minute   0.0.0.0:8888->8888/tcp                   router
932a8794440b        apache/druid:harini   "/druid.sh coordinat…"   2 minutes ago       Up 2 minutes        0.0.0.0:8081->8081/tcp                   coordinator
086fe8a44b0a        postgres:latest       "docker-entrypoint.s…"   2 minutes ago       Up 2 minutes        5432/tcp                                 postgres
c3ea54ce6907        zookeeper:3.5         "/docker-entrypoint.…"   2 minutes ago       Up 2 minutes        2181/tcp, 2888/tcp, 3888/tcp, 8080/tcp   zookeeper

Made status/selfDiscovered curl call to indexer running on port 8092 and got back 200 OK.

hrajendran@Harini-Rajendran's-MBP16 docker % curl -v http://localhost:8092/status/selfDiscovered
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8092 (#0)
> GET /status/selfDiscovered HTTP/1.1
> Host: localhost:8092
> User-Agent: curl/7.64.1
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Mon, 14 Dec 2020 20:11:58 GMT
< Content-Type: application/json
< Vary: Accept-Encoding, User-Agent
< Content-Length: 0
< 
* Connection #0 to host localhost left intact
* Closing connection 0

Comment thread examples/conf/druid/cluster/data/indexer/runtime.properties Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the corresponding middleManager config has 4 tasks, should we match that for consistency?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I can update it to match with MM config.

@harinirajendran harinirajendran changed the title Adding example config files for indexer process. Also added status/selfDiscovered endpoint to indexer for self discovery. Adding example config files for indexer process. Also added status/selfDiscovered endpoint to indexer which we use as readiness probe for indexer in our indexer process’s docker config. Dec 14, 2020
@harinirajendran harinirajendran changed the title Adding example config files for indexer process. Also added status/selfDiscovered endpoint to indexer which we use as readiness probe for indexer in our indexer process’s docker config. Adding example config files for indexer process. Also added status/selfDiscovered endpoint to indexer Dec 14, 2020
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given we have 1 processing thread per task in the example middle-manager config, I would set this to equal the worker capacity to have a comparable config.

Comment on lines 2 to 4
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably need more heap to match our middle-manager config, which had 1GB per task.

Copy link
Copy Markdown
Contributor Author

@harinirajendran harinirajendran Dec 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it 4g and also increased druid.processing.buffer.sizeBytes to 500MiB . Also increased -Xms and -Xmx setting to be 4x.

@harinirajendran harinirajendran changed the title Adding example config files for indexer process. Also added status/selfDiscovered endpoint to indexer Adding example config files for indexer process. Also added status/selfDiscovered endpoint to indexer for self discovery Dec 14, 2020
@harinirajendran harinirajendran requested a review from xvrl December 14, 2020 21:23
Comment thread examples/conf/druid/cluster/data/indexer/runtime.properties Outdated
…lfDiscovered endpoint to indexer for self discovery of indexer.
Copy link
Copy Markdown
Member

@xvrl xvrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, cc @himanshug in case he has anything to add.

Copy link
Copy Markdown
Contributor

@himanshug himanshug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xvrl xvrl merged commit c2e26d2 into apache:master Dec 15, 2020
@xvrl
Copy link
Copy Markdown
Member

xvrl commented Dec 15, 2020

merging since test failures appear unrelated.

harinirajendran added a commit to confluentinc/druid that referenced this pull request Dec 15, 2020
…ndexer (apache#10679)

Added the status/selfDiscovered endpoint to indexer. Per the api-reference doc, all services support status/selfDiscovered endpoint. So this change would fix that expected behavior.

Also added example config files for indexer process that can be used to spin up the indexer process. 

(cherry picked from commit c2e26d2)
harinirajendran added a commit to confluentinc/druid that referenced this pull request Dec 15, 2020
Add status/selfDiscovered endpoint to indexer for self discovery of indexer (apache#10679)
@jihoonson jihoonson added this to the 0.21.0 milestone Jan 4, 2021
JulianJaffePinterest pushed a commit to JulianJaffePinterest/druid that referenced this pull request Jan 22, 2021
…ndexer (apache#10679)

Added the status/selfDiscovered endpoint to indexer. Per the api-reference doc, all services support status/selfDiscovered endpoint. So this change would fix that expected behavior.

Also added example config files for indexer process that can be used to spin up the indexer process.
harinirajendran added a commit to confluentinc/druid that referenced this pull request Apr 19, 2021
…ndexer (apache#10679)

Added the status/selfDiscovered endpoint to indexer. Per the api-reference doc, all services support status/selfDiscovered endpoint. So this change would fix that expected behavior.

Also added example config files for indexer process that can be used to spin up the indexer process. 

(cherry picked from commit c2e26d2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants