Re: [druid-user] Perform load testing and performance tuning of Druid ClusterData structure

24 views
Skip to first unread message

吧的如何米蘭

unread,
Nov 16, 2022, 2:44:11 AM11/16/22
to druid...@googlegroups.com

/* * C Program to Find Nodes which are at Maximum Distance in Binary Tree */ #include <stdio.h> #include <stdlib.h> struct btnode { int value; struct btnode *r,*l; } *root = NULL, *temp = NULL; void create(); void insert(); void add(struct btnode *t); void maxdistance(struct btnode *t); int count = 0, max = 0, v[100] = {0}, z = 0, max2, max1[100] = {0}; void main() { int ch, i; printf("Program to find nodes at maximum distance"); printf("\n OPERATIONS ----"); printf("\n1] Insert "); printf("\n2] Display nodes "); printf("\n3] Exit "); while (1) { printf("\nEnter your choice : "); scanf("%d", &ch); switch (ch) { case 1: insert(); break; case 2: max = 0; count = 0; maxdistance(root); for (i = 1; i < z; i++) { max2 = max1[0]; if (max2 < max1[i]) max2 = max1[i]; } printf("Maximum distance nodes \nNodes\t Distance "); for (i = 0; i < z; i++) { if (max2 == max1[i]) printf("\n %d\t %d ",v[i],max2); } break; case 3: exit(0); default : printf("Wrong choice, Please enter correct choice "); break; } } } /* To create a new node with the data from the user */ void create() { int data; printf("Enter the data of node : "); scanf("%d", &data); temp = (struct btnode* ) malloc(1*(sizeof(struct btnode))); temp->value = data; temp->l = temp->r = NULL; } /* To check for root node and then create it */ void insert() { create(); if (root == NULL) root = temp; else add(root); } /* Search for the appropriate position to insert the new node */ void add(struct btnode *t) { if ((temp->value > t->value) && (t->r!=NULL)) /* value more than root node value insert at right */ add(t->r); else if ((temp->value > t->value) && (t->r==NULL)) t->r = temp; else if ((temp->value < t->value) && (t->l!=NULL)) /* value less than root node value insert at left */ add(t->l); else if ((temp->value < t->value) && (t->l==NULL)) t->l = temp; } /* Function to find the max distance nodes */ void maxdistance(struct btnode *t) { if (t->l!=NULL) { count++; /* to count the number of nodes in between root and leaf */ maxdistance(t->l); } if (max < count) max = count; if (max == count) { max1[z] = max; v[z] = t->value; z++; } if (t->r != NULL) { count++; maxdistance(t->r); } count--; }

On Nov 16, 2022 9:37 AM, "'Mrugesh Kadia' via Druid User" <druid...@googlegroups.com> wrote:
Hi,

what is the best approach for load test and performance tuning of Druid Cluster with production data?

As of now to perform load testing and performance tuning, we are planning to setup separate cluster with same production data for historical nodes, so it will not impact production druid cluster.

How to replicate all historical data in Test cluster?
Is there any way to automate druid cluster setup for this task? (like teraform but we are not using docker for druid)


Thanks,
Mrugesh Kadia

::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachments are confidential and intended for the named recipient(s) only.E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents(with or without referred errors) shall therefore not attach any liability on the originator or redBus.com. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of redBus.com. Any form of reproduction, dissemination, copying, disclosure, modification,distribution and / or publication of this message without the prior written consent of authorized representative of redbus.com is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.Before opening any email and/or attachments, please check them for viruses and other defects.

--
You received this message because you are subscribed to the Google Groups "Druid User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to druid-user+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/druid-user/9bf317ea-85cc-454d-9575-61bdc8606392n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages