YouTube2Text

#3 Creating Compute (Cluster) Step-by-Step|Azure Databricks Full Course in Telugu #telugu #course — Transcript

by Code chasers · 2,781 words · 418 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Hello everyone, welcome to our channel
  2. 0:02Code Sages. I am your Madhu Lakshman
  3. 0:05Atiketi, and welcome back to the world
  4. 0:07of Azure Databricks. In this video, we
  5. 0:10will see how to create compute. In the
  6. 0:12previous video, we saw how to create a
  7. 0:15Databricks workspace. We also looked at
  8. 0:18an overview, okay? So the next step is
  9. 0:20to see how to create compute in this
  10. 0:23video. Compute can also be referred to
  11. 0:26as a cluster, okay? A cluster or
  12. 0:28compute is the main core part where the
  13. 0:32execution takes place. Okay, no matter
  14. 0:35how much code we write, there has to be
  15. 0:37an engine to execute it, right! So,
  16. 0:39it's not like I can directly say it's
  17. 0:41just an engine place. So this is the
  18. 0:44main place where the execution part is
  19. 0:47concentrated; that is compute. Okay, so
  20. 0:50without any delay, let's start the
  21. 0:52video. Hello everyone, in the last
  22. 0:55video, we created a Databricks
  23. 0:57workspace and saw an overview. We saw
  24. 1:01how the Databricks workspace looks and
  25. 1:03some of its key terms. As a beginner,
  26. 1:05we looked at some terms to know and
  27. 1:08some areas we need to be aware of. And,
  28. 1:10one small thing. Even if you didn't
  29. 1:13watch that overview, or if you didn't
  30. 1:14understand the terms in that overview,
  31. 1:15it's okay. Because in future lessons
  32. 1:18and upcoming videos, we will understand
  33. 1:21every single term clearly, okay? So,
  34. 1:24what I will do now is configure our
  35. 1:26cluster in our Databricks workspace.
  36. 1:29Okay, so we will see how to do that. So
  37. 1:32, first of all, I am launching our
  38. 1:34workspace. After launching, it will
  39. 1:38take some time to launch the Databricks
  40. 1:40workspace. Okay, I have launched it.
  41. 1:44After launching, there are horizontal
  42. 1:47lines here, right? If I click on them,
  43. 1:50I can see options like Workspaces,
  44. 1:53Recents, Catalog, Jobs, Pipelines, and
  45. 1:56Compute. So, I will click on Compute
  46. 1:59here. Compute, generally, compute is a
  47. 2:02place. As I mentioned earlier, when
  48. 2:05talking about compute, in this place,
  49. 2:08we can create compute. To be specific,
  50. 2:11it is about creating and configuring a
  51. 2:13cluster. Okay, so we will do that. So,
  52. 2:17click on this Compute, and there will
  53. 2:18be a "Create Compute" button here.
  54. 2:20Under the plus symbol, there is a "
  55. 2:22Create Compute" button; click that
  56. 2:24button. Okay, after clicking, it will
  57. 2:27redirect us to the compute creation
  58. 2:29page. Okay, so this is the compute name
  59. 2:33, which by default has taken "Madhu's
  60. 2:35Cluster" along with the date and time.
  61. 2:39So I will remove that and give it a
  62. 2:44name like "Databricks Tutorial Compute.
  63. 2:49" Okay, so here is the policy...What
  64. 2:54actually is a policy? Like, this is
  65. 2:56called a cluster policy here. There are
  66. 2:59different types of cluster policies
  67. 3:01available. Okay, so for unrestricted,
  68. 3:03all options are available here; there
  69. 3:06are no restrictions on any options.
  70. 3:09Okay, we have these options below,
  71. 3:11whether in performance, tags, or
  72. 3:13advanced; there are no restrictions.
  73. 3:16There are three sections down here;
  74. 3:18just ignore the general ones. There are
  75. 3:22no restrictions in performance, tags,
  76. 3:24or advanced; we can go ahead and edit
  77. 3:26them. So, if I select Personal Compute,
  78. 3:31look, machine learning wasn't ticked,
  79. 3:35but if I select Personal Compute,
  80. 3:38machine learning gets ticked
  81. 3:40automatically, and the single node
  82. 3:43option appears. So that went away as
  83. 3:47well. Some of these things have
  84. 3:50appeared by default. So, let's see what
  85. 3:53these 'terminate after 4320' settings
  86. 3:55are about. I will explain to you what
  87. 3:58this cluster policy is. I will open a
  88. 4:02new workbook, or rather, a new notebook
  89. 4:06. Okay, so it is necessary for us to
  90. 4:11know about cluster policies. As data
  91. 4:16engineers, we work on Databricks with
  92. 4:19PySpark. Okay, it is necessary to know
  93. 4:21all of this while working. I could just
  94. 4:24pick any cluster policy and move
  95. 4:26forward. But as a data engineer, we
  96. 4:29should know what is happening, what a
  97. 4:31cluster policy is, and why we are
  98. 4:32creating one. We need to know that.
  99. 4:35Okay, so for cluster policy, let's just
  100. 4:37skip this specific policy for a moment.
  101. 4:40First, imagine I have a team of one,
  102. 4:43two, three, or four members, okay. And
  103. 4:46I have a project head, okay, he is the
  104. 4:50head. So, Team member one and Team
  105. 4:53member two have just joined. Okay, when
  106. 4:57they joined, they sat down to create a
  107. 5:00cluster. They sat down to create a
  108. 5:03cluster, and maybe due to a lack of
  109. 5:06knowledge or accidentally, since they
  110. 5:08are just learning Databricks, they
  111. 5:11might make mistakes. So, they are
  112. 5:14trying to create and configure a
  113. 5:17cluster for project work. Since they
  114. 5:22aren't aware of some configurations,
  115. 5:25they might set the cluster size too
  116. 5:29high, and in a real-time industry
  117. 5:32environment, that leads to us paying
  118. 5:35high costs. This is a free model we are
  119. 5:40using now, but going forward, once the
  120. 5:43free subscription ends, we have to pay
  121. 5:46Azure based on how much we use the
  122. 5:48cluster. If trainees create clusters
  123. 5:53however they want, we have to end up
  124. 5:57paying that cost. When I say we, I mean
  125. 6:01the company has to pay. So, to handle
  126. 6:04this type of scenario, we have cluster
  127. 6:06policies. Okay, in Cluster Policy, I
  128. 6:12can create, like, a custom policy, and
  129. 6:16I can pre-configure the VM size here.
  130. 6:22I'll explain VM size shortly. VM size
  131. 6:27is nothing but the node type or node
  132. 6:30size. Okay. Nodes are nothing but VMs
  133. 6:33here. Okay, so I will configure the VM
  134. 6:37size to a specific value. And next,
  135. 6:40what options do we have here? So, there
  136. 6:44is Databricks Runtime. Databricks
  137. 6:46Runtime is nothing but the cluster
  138. 6:48runtime. I will set the cluster runtime
  139. 6:53to a specific value for the juniors—
  140. 6:59the new joiners—as well. And also,
  141. 7:05there is an option for "Terminate after
  142. 7:09X minutes," which I will set to 20. So,
  143. 7:14I have created a policy where all these
  144. 7:17are set by default. Once the policy is
  145. 7:21created, it will be added to the
  146. 7:23Cluster Policy dropdown. Okay, so let's
  147. 7:27say I created a custom policy called "
  148. 7:29Madhu's Policy" or something similar.
  149. 7:33I'll call it "Trainee's Policy" or "
  150. 7:35Trainee's Compute," so when they click
  151. 7:38it, all these values will automatically
  152. 7:41populate here. So, what I'm doing here
  153. 7:46is, I'm not giving the trainees the
  154. 7:49chance to choose whatever they want.
  155. 7:54Because, keeping cost in consideration,
  156. 7:57I have already created a runtime and
  157. 7:59node type within that "Trainee's
  158. 8:02Compute." So, I am able to optimize the
  159. 8:07costs. Okay! Now, let's say I haven't
  160. 8:10created any policies. If nothing is
  161. 8:13created, it defaults to "Unrestricted,"
  162. 8:14meaning there are no restrictions. We
  163. 8:16can go and edit the values ourselves.
  164. 8:20Okay! So, okay, I hope you understood
  165. 8:24what a cluster policy is. It is one of
  166. 8:26the important policies and an important
  167. 8:28topic. Okay! Now, for performance—the
  168. 8:33cluster performance—we will design
  169. 8:36the values for that now. Imagine you
  170. 8:42are configuring a cluster yourself,
  171. 8:46designing it according to your own
  172. 8:49requirements. Okay! Databricks Runtime
  173. 8:55is nothing but the cluster runtime—
  174. 8:57like Scala 2.12 and Spark 3.5.2. So,
  175. 9:01this is a cluster that runs on an
  176. 9:03Apache Spark engine. Okay! We have
  177. 9:05already discussed what the Apache Spark
  178. 9:07engine is in previous videos. So, it is
  179. 9:09one of the best and one of the most
  180. 9:12preferred data processing engines. Okay
  181. 9:15, it uses distributed computing. Okay,
  182. 9:17so the topic of distributed computing
  183. 9:19has come up again here. We have already
  184. 9:21discussed what distributed computing is
  185. 9:24. So for those who are unaware of
  186. 9:27distributed computing, I will explain
  187. 9:29it in a nutshell. In distributed
  188. 9:31computing, what happens is that the
  189. 9:33workload gets divided. Okay, we have a
  190. 9:35workload, let's say a 500 GB workload.
  191. 9:38Okay, so to compute that 500 GB, the
  192. 9:41driver node...the driver node first
  193. 9:44takes the 500 GB input. So, it takes it
  194. 9:47, and this is called the driver node.
  195. 9:49Or a node is nothing but a virtual
  196. 9:51machine here. Okay, I mentioned a
  197. 9:53virtual machine in the previous example
  198. 9:55, I explained it using a computer
  199. 9:56example. This is nothing but a virtual
  200. 9:58machine. So the driver node takes this
  201. 10:01500 GB and distributes it to the worker
  202. 10:03nodes. Okay, worker nodes...worker
  203. 10:07nodes...okay, worker nodes...I can have
  204. 10:10multiple worker nodes. Okay, there can
  205. 10:13be multiple worker nodes. Okay, so this
  206. 10:16is called a multi-node setup.
  207. 10:19Multi-node setup, multi-node setup.
  208. 10:22Okay, where I have a low workload, I
  209. 10:24don't need different work nodes, worker
  210. 10:28nodes. When the driver node can manage
  211. 10:31the workload by itself, creating worker
  212. 10:33nodes is unnecessary, right? So we call
  213. 10:36that...we call it single node. A single
  214. 10:39node means...there is only one driver
  215. 10:42node. There is only one driver node. So
  216. 10:45it can process the data, so when the
  217. 10:47workloads are low, like very low
  218. 10:49workloads, okay, when there are low
  219. 10:51workloads, single node, like when there
  220. 10:54are high workloads, multi-node, okay,
  221. 10:56so this processing, this computation,
  222. 10:58since it happens without being
  223. 11:00distributed, we call it distributed
  224. 11:02computing. So distributed computing is
  225. 11:06very important for fast processing, we
  226. 11:09see this in the Apache Spark engine, we
  227. 11:11have already discussed this in the
  228. 11:14Apache Spark engine. Okay, so the
  229. 11:17cluster we configure here, a cluster is
  230. 11:20nothing but where the actual processing
  231. 11:22happens with the help of this cluster,
  232. 11:25okay, so here Apache Spark...here we
  233. 11:27have Spark 3.5.2. So here I gave 6.4 (
  234. 11:32LTS). If we look here, we have many
  235. 11:35options. So, we can see a tag here, LTS
  236. 11:38. Which means Long Term Service, they
  237. 11:40provide us with service for around
  238. 11:42three years. So, that is why we opt for
  239. 11:45LTS, like in real-time in industrial
  240. 11:47environments, we also select those with
  241. 11:48the LTS tag. Okay, so I selected 16.4
  242. 11:53LTS, and for our workload, we selected
  243. 11:5716.4 2.13. So, for our training
  244. 12:00workload, this is enough, this Spark
  245. 12:02runtime, sorry, this cluster runtime is
  246. 12:05sufficient. And here there is an option
  247. 12:09called Photon Acceleration, okay, a
  248. 12:11checkbox. Photon Acceleration means, in
  249. 12:14our Apache Spark, to accelerate the
  250. 12:17computation a bit and to push it faster
  251. 12:20, we use Photon Acceleration. Okay,
  252. 12:22acceleration means we are accelerating
  253. 12:25the process, we are speeding up the
  254. 12:27process. So, when there are high
  255. 12:29workloads, Photon Acceleration is
  256. 12:30important, meaning it's necessary.
  257. 12:32Since we are currently training, or
  258. 12:34like learning, we won't have such heavy
  259. 12:37workloads. So, we don't need to check
  260. 12:39this, it's not needed for us. Okay, so
  261. 12:42next, node type. I mentioned node type
  262. 12:44earlier, so single node and multi-node.
  263. 12:47Since we are actually learning here, we
  264. 12:49will have less data, okay, and low
  265. 12:51workloads. So, for us, a single node is
  266. 12:54fine, a single node is fine. And node
  267. 12:56type, this is one of the important node
  268. 12:59types. Meaning, this is our VM size.
  269. 13:02Node means nothing but it's a virtual
  270. 13:03machine, right? So, how that virtual
  271. 13:06machine should be, like how many cores
  272. 13:09it should have, how much CPU memory,
  273. 13:11sorry, how much memory it should have,
  274. 13:14we can choose that in this. Okay, if
  275. 13:18you look carefully, like if you observe
  276. 13:20closely, there are different types here
  277. 13:23. So, there is one called general
  278. 13:26purpose, there is one called general
  279. 13:28purpose. Next, within general purpose,
  280. 13:30there are also different types, there
  281. 13:32is HD, okay, there is memory optimized,
  282. 13:35and in memory optimized, there are
  283. 13:37different types, and there are compute
  284. 13:39optimized, and again, general purpose
  285. 13:41has appeared. So, there are GPU
  286. 13:43accelerated ones here. So, first of all
  287. 13:46, what is general purpose? Whenever we
  288. 13:50process workloads, whenever we process
  289. 13:52any data, when we think we have more
  290. 13:55in-memory computations, and when we
  291. 13:57take in-memory computations as a key
  292. 14:00point, and for enterprise applications,
  293. 14:03we generally opt for general purpose.
  294. 14:07Okay. So, in general purpose, we can
  295. 14:09also choose how much memory we should
  296. 14:11process with and how many cores we need
  297. 14:13. Okay. So, that is general purpose.
  298. 14:16And another one is memory optimized.
  299. 14:19Memory optimized generally means we use
  300. 14:22memory optimized in machine learning
  301. 14:24workloads. Okay. So, next. So, compute
  302. 14:28optimized. When do we use compute
  303. 14:30optimized? When we have heavy workloads
  304. 14:33, like when there is a lot of data
  305. 14:34processing, and when data processing
  306. 14:36workloads are high, the processing time
  307. 14:39becomes critical. We have to focus very
  308. 14:42much on processing times. Generally, we
  309. 14:45use this in data science workloads.
  310. 14:48Taking processing time as critical
  311. 14:50there, like as a key component, we
  312. 14:52design this node type for data science
  313. 14:54workloads. Generally, keep in mind that
  314. 14:59we use compute optimized for data
  315. 15:01science workloads, and next we have GPU
  316. 15:04accelerated. We use GPU accelerators
  317. 15:08when working on deep learning models
  318. 15:10with GPU-accelerated general purposes.
  319. 15:13Okay. Even if you don't understand all
  320. 15:16this, I'm explaining each keyword. This
  321. 15:18is used for this, and that is used for
  322. 15:20that. When I talk about general-purpose
  323. 15:23, I mean how we use it for enterprise
  324. 15:26applications or as a key component for
  325. 15:28in-memory computations, you know. It's
  326. 15:32enough if you just get an idea of why
  327. 15:35we use these. So, I can proceed
  328. 15:37directly. In general-purpose, since we
  329. 15:41are learning Databricks, we should
  330. 15:43choose minimal cores. Because if we
  331. 15:48choose more cores, the charges will be
  332. 15:51much higher. Okay, so I will choose
  333. 15:55minimal cores. So, I'll go ahead and
  334. 15:58opt for 16 GB, four cores for
  335. 16:00general-purpose usage here. But you
  336. 16:04should know what we are doing; as a
  337. 16:06data engineer, I am explaining
  338. 16:09everything so you know it all. So, four
  339. 16:11cores and 16 GB are enough for us; I
  340. 16:13will keep it as standard. And for "
  341. 16:16Terminate after," after we configure
  342. 16:19the cluster, we will run that cluster.
  343. 16:23We write code in a workspace, configure
  344. 16:25the cluster, and then connect that
  345. 16:27cluster to the workspace or my notebook
  346. 16:30. Once done, we run the code and work
  347. 16:34on the cluster. Even after our work is
  348. 16:38finished, the cluster keeps running. If
  349. 16:42the cluster keeps running, we have to
  350. 16:47pay for the time it stays active, so to
  351. 16:52avoid that, we set "Terminate after" to
  352. 16:57shut down the cluster if it hasn't been
  353. 17:02in use for a while. Okay, it's set to
  354. 17:07120 here. By default, 20 minutes is
  355. 17:09enough for us. 20 minutes, let's keep
  356. 17:11it at 20 minutes for now. Because when
  357. 17:15we work on a cluster, if we configure
  358. 17:19the cluster to a Databricks workspace
  359. 17:23and don't work with it for 20 minutes,
  360. 17:27we don't need the cluster running. In
  361. 17:32that case, the cluster turns off
  362. 17:34automatically after 20 minutes; that's
  363. 17:36what this setting is for. So, this is
  364. 17:38also for cost optimization. Tags are
  365. 17:41useful during billing. This is not
  366. 17:43relevant for you right now. For
  367. 17:46Advanced, if you open this tab, you
  368. 17:48will find a few options. For Spark, you
  369. 17:52can perform any Spark configurations
  370. 17:55you need here. Okay, you can set Spark
  371. 17:58configurations and environmental
  372. 18:00variables here as well if needed. So,
  373. 18:02in the next two videos, we are going to
  374. 18:05work on Spark configurations. You will
  375. 18:08get clarity on what exactly it is then.
  376. 18:11I'm just telling you generally that
  377. 18:14Spark configs can be done here, and if
  378. 18:17you want to save any logs in DBFS—the
  379. 18:20Databricks File System—you can
  380. 18:23configure that here, along with init
  381. 18:26scripts. If you want to configure any
  382. 18:29scripts, you can do that here. And for
  383. 18:33instance, if you are working with
  384. 18:36Python and want to install some
  385. 18:38external packages as soon as the
  386. 18:40cluster starts, you can configure those
  387. 18:44packages here. Okay, I hope you
  388. 18:48understood this. I will verify these
  389. 18:51one more time to see if I've set them
  390. 18:53up correctly. Databricks is okay, this
  391. 18:56is okay, no type is okay, single node
  392. 19:00is okay, and I've removed photo
  393. 19:02acceleration. Now we will create it;
  394. 19:05there is a 'Create' button here, let's
  395. 19:07click it to create. Okay, this cluster
  396. 19:11creation will take some time, about
  397. 19:13three to four minutes. So look here, we
  398. 19:16can see this in the event logs. In the
  399. 19:18event logs, the cluster is currently in
  400. 19:20a creating status. Once the cluster is
  401. 19:23configured, the cluster name will
  402. 19:26appear here. We can see that. So, when
  403. 19:30we click on 'Compute' again, the
  404. 19:32Databricks tutorial compute that we
  405. 19:35created will appear here. Meaning, in
  406. 19:39this compute section. Since our compute
  407. 19:42has a green symbol, it means it is
  408. 19:45running. Okay, so if you want to
  409. 19:49terminate this compute, there is a
  410. 19:51terminate option here. There is a
  411. 19:54square button here; if you press it, it
  412. 19:56will terminate. And next, if you want
  413. 19:59to restart the compute, we can restart
  414. 20:03it. If you want to delete it, you can
  415. 20:06delete it, or edit permissions; we can
  416. 20:07edit anything. This is how we create a
  417. 20:10compute. Okay, I hope you found this
  418. 20:13video useful. Thank you so much.

About this transcript

This page contains the full transcript of #3 Creating Compute (Cluster) Step-by-Step|Azure Databricks Full Course in Telugu #telugu #course by Code chasers, generated from the public captions YouTube serves with the video. The transcript has 2,781 words across 418 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.