Run Apache Spark Jobs via Ilum UI
Running an Apache Spark job on Kubernetes with Ilum operates just like one submitted via স্পার্ক-সাবমিট , কিন্তু ব্যবহারের সহজতা, কনফিগারেশন, এবং বহিরাগত সরঞ্জামগুলির সাথে ইন্টিগ্রেশনের জন্য অতিরিক্ত বর্ধন সহ।
You can use the jar file with spark examples from one of these links:
- Spark 4 (default)
- Spark 3
Spark 4 / Scala 2.13: spark-examples_2.13-4.1.1.jar
Spark 3 / Scala 2.12: spark-examples_2.12-3.5.7.jar
Interactive Spark Job Submission Guide
ইলুম ব্যবহার করে একটি সাধারণ স্পার্ক কাজ স্থাপনের জন্য এখানে একটি ধাপে ধাপে গাইড রয়েছে। এই গাইডটি আপনাকে আইলাম প্ল্যাটফর্মের মধ্যে মিনিরিডরাইটটেস্ট নামে একটি প্রাথমিক কাজ কনফিগার করা, সম্পাদন করা এবং পর্যবেক্ষণের মধ্য দিয়ে নিয়ে যাবে।
Step-by-Step Tutorial: Running Your First Spark Job
-
জবস সেকশনে নেভিগেট করুনঃ এই অঞ্চলটি আপনাকে আপনার সমস্ত ডেটা প্রক্রিয়াকরণের কাজগুলি পরিচালনা করতে দেয়।
-
নতুন চাকরি তৈরি করুনঃ
- Click on the ‘New Job +’ button to start the setup process.
-
কাজের বিবরণ পূরণ করুন:
-
সাধারণ ট্যাব:
- নাম: প্রবেশ
মিনিরিডরাইটটেস্ট - Job Type: Select
Spark Job - শ্রেণী: প্রবেশ
org.apache.spark.examples.MiniReadWriteTest - Language: Select
স্কালা
- নাম: প্রবেশ
-
Configuration Tab:
- Arguments:প্রবেশ
/opt/spark/examples/src/main/resources/kv1.txt
This path specifies a local file to be distributed to executors, a test file available in every Spark environment.
- Arguments:প্রবেশ
-
রিসোর্স ট্যাব:
- Jars: Upload the JAR file:
-
- Spark 4 (default)
- Spark 3
Spark 4 / Scala 2.13: spark-examples_2.13-4.1.1.jar
Spark 3 / Scala 2.12: spark-examples_2.12-3.5.7.jar
- Memory Tab:
- Leave all settings at their default values for this example.
-
জব সাবমিট ও মনিটর করুনঃ
- চাকরি জমা দিন।
- প্রতিটি নির্বাহকের লগগুলি পর্যালোচনা করতে লগ বিভাগে নেভিগেট করুন।
- You should see log output showing the job execution, including:
- Spark initialization messages (
SparkContext: Running Spark version 3.5.7) - File reading and word count operations (
Performing local word count from /opt/spark/examples/src/main/resources/kv1.txt) - Task execution across executors (
Starting task 0.0 in stage 0.0) - Final success message (
Success! Local Word Count 500 and D Word Count 500 agree.)
- Spark initialization messages (
-
রিভিউ জব এক্সিকিউশন:
- কাজ শুরু হয়ে গেলে জব ওভারভিউ সেকশনে স্ট্যাটাস চেক করুন।
- এক্সিকিউটর বিভাগে মেমরির ব্যবহার এবং অন্যান্য পারফরম্যান্স মেট্রিকগুলি পর্যবেক্ষণ করুন।
- টাইমলাইনে প্রতিটি পর্যায়ের মাধ্যমে আপনার কাজের অগ্রগতি পর্যবেক্ষণ করুন।
-
সমাপ্তি এবং পর্যালোচনা:
- সমাপ্তির পরে, কাজের বিবরণ এবং ফলাফলগুলি স্পার্ক ইতিহাস সার্ভারে লগ ইন করা হয়।
- আপনার সমাপ্ত কাজটি দেখতে এবং বিস্তারিত মৃত্যুদন্ড কার্যকর করার পর্যায়গুলি পর্যালোচনা করতে ইতিহাস সার্ভার বিভাগটি দেখুন।
-
চূড়ান্ত পদক্ষেপ:
- অভিনন্দন! আপনি ইলামে আপনার মিনিরিডরাইটটেস্ট কাজটি সফলভাবে সেট আপ এবং চালাচ্ছেন। আরও তথ্য বা সহায়তার জন্য, যোগাযোগ করুন [email protected] .
To submit jobs programmatically instead of using the UI, see the Run Spark Job via REST API guide.
Congratulations! You have successfully set up and run your MiniReadWriteTest job in Ilum. For further information or support, contact [email protected] .
এই পদক্ষেপগুলি অনুসরণ করে, আপনি ইলাম প্ল্যাটফর্মের মধ্যে একটি বেসিক স্পার্ক কাজ দক্ষতার সাথে সেট আপ, চালাতে এবং নিরীক্ষণ করতে সক্ষম হবেন, এর কার্যকারিতাগুলির সাথে পরিচিতি অর্জন করতে এবং আরও জটিল ডেটা প্রসেসিং কাজের জন্য আপনাকে প্রস্তুত করতে পারবেন।
ইলাম কীভাবে স্পার্ক জব জমা দেওয়ার সুবিধা দেয় তার একটি সংহত ব্যাখ্যা এখানে রয়েছে, এর ঐতিহ্যগত বৈশিষ্ট্যগুলি মিশ্রিত করে স্পার্ক-সাবমিট ইলুমের উন্নত পরিচালনার ক্ষমতা সহ:
লোড হচ্ছে উদাহরণ কাজ
নতুন ব্যবহারকারীদের দ্রুত শুরু করতে সহায়তা করার জন্য ইলাম একটি উদাহরণ কাজ সরবরাহ করে।
কাজের লোডিংয়ের উদাহরণ সক্ষম করা হয়েছে ডিফল্টরূপে। তবে আপনি এটি ব্যবহার করে অক্ষম করতে পারেন --সেট ilum-core.examples.job=false .
Why Ilum is a Better Alternative to spark-submit
-
সার্বজনীন সামঞ্জস্যতা: ইলাম ব্যবহারের অনুরূপ যে কোনও স্পার্ক কাজ জমা দিতে সক্ষম করে
স্পার্ক-সাবমিট. এটি স্কালা, পাইথন এবং আর সহ স্পার্কের সাথে ব্যবহৃত বিভিন্ন প্রোগ্রামিং ভাষাগুলিকে সমর্থন করে, ব্যাচ প্রসেসিং, স্ট্রিমিং জব বা ইন্টারেক্টিভ কোয়েরিগুলির মতো সমস্ত সাধারণ স্পার্ক অপারেশনগুলি সরবরাহ করে। -
সরলীকৃত কমান্ড এক্সিকিউশন: সময়
স্পার্ক-সাবমিটপ্রায়শই লাইব্রেরি নির্ভরতা, কাজের পরামিতি এবং ক্লাস্টার কনফিগারেশনের জন্য জটিল কমান্ড-লাইন ইনপুটগুলি জড়িত, ইলাম এগুলি একটি স্বজ্ঞাত ব্যবহারকারী ইন্টারফেসে বিমূর্ত করে। এই পদ্ধতিটি ত্রুটির ঝুঁকিগুলি হ্রাস করে এবং অপারেশনগুলিকে সহজ করে তোলে, বিশেষত কমান্ড-লাইন জটিলতার সাথে কম পরিচিতদের জন্য উপকারী। -
সরাসরি কোড স্থাপনা: ব্যবহারকারীরা তাদের জেএআর ফাইল, পাইথন স্ক্রিপ্ট বা নোটবুকগুলি সরাসরি ইলুমে আপলোড করতে পারেন, একটি সংস্থান নির্দিষ্ট করার অনুরূপ
স্পার্ক-সাবমিটআদেশ। ইলাম এই সংস্থানগুলিকে নির্ধারিত বা ইভেন্ট-ট্রিগার এক্সিকিউশনের জন্য কনফিগার করার অনুমতি দিয়ে এটিকে বাড়িয়ে তোলে, বৃহত্তর অপারেশনাল নমনীয়তা সরবরাহ করে। -
স্বয়ংক্রিয় পরিবেশ হ্যান্ডলিং: প্রয়োজনীয় ম্যানুয়াল সেটআপের বিপরীতে
স্পার্ক-সাবমিট, ইলাম নিশ্চিত করে যে সমস্ত নির্ভরতা এবং কনফিগারেশন স্বয়ংক্রিয়ভাবে পরিচালিত হয়। এটি গ্যারান্টি দেয় যে এক্সিকিউশন পরিবেশটি স্থানীয় ক্লাস্টার, ক্লাউড বা হাইব্রিড সেটআপগুলিতে কাজ সম্পাদনের জন্য ধারাবাহিকভাবে প্রস্তুত। -
ইন্টিগ্রেটেড মনিটরিং এবং টুলিং: ইলাম পর্যবেক্ষণ এবং লগিং সরঞ্জামগুলির জন্য অন্তর্নির্মিত ইন্টিগ্রেশন নিয়ে আসে, যা
স্পার্ক-সাবমিটওয়ার্কফ্লোর জন্য অতিরিক্ত সেটআপ প্রয়োজন। এই ইন্টিগ্রেশন ব্যবহারকারীদের কাজের পারফরম্যান্স ট্র্যাকিং, লগ পরিচালনা এবং অন্যান্য ডেটা পরিষেবাদির সাথে নির্বিঘ্নে সংযোগ স্থাপনের জন্য ব্যবহারের জন্য প্রস্তুত সমাধান সরবরাহ করে।
উন্নত চাকরি জমা দেওয়ার অভিজ্ঞতা
ইলুম কেবল এর ক্ষমতার সাথে মেলে না স্পার্ক-সাবমিট তবে কাজের কনফিগারেশন এবং পরিবেশগত সেটআপের সাথে সম্পর্কিত ওভারহেড হ্রাস করে তাদের প্রসারিত করে। এটি একটি সর্বাত্মক প্ল্যাটফর্ম সরবরাহ করে যা স্পার্ক জবগুলির স্থাপনা, পরিচালনা এবং স্কেলিংকে সহজতর করে, এটি অ্যাপাচি স্পার্কের শক্তি এবং নমনীয়তার সাথে আপস না করে তাদের ডেটা প্রসেসিং ওয়ার্কফ্লো বাড়ানোর লক্ষ্যে সংস্থাগুলির জন্য একটি আদর্শ সমাধান তৈরি করে।
Job Configuration Reference
- সাধারণ
- কনফিগারেশন
- সংস্থান
- স্মৃতি
| Parameter | বর্ণনা |
|---|---|
নাম | A unique identifier for the job. This name is used in the dashboard and logs to track the job's execution and history. |
Job Type | The category of the job to be created. Select Spark Job for standard batch processing or Spark Connect Job for client-server Spark applications. |
ক্লাস্টার | The target cluster where the job will be executed. Choose a cluster that has the necessary resources and data access for your job. |
শ্রেণী | The fully qualified class name of the application (e.g., org.apache.spark.examples.SparkPi) or the filename for Python scripts. This tells Spark which code to execute as the entry point. |
ভাষা | The programming language used for the job. Select স্কালা বা পাইথন to match your application code. |
Max Retries | The maximum number of times Ilum will attempt to restart the job if it fails. Setting this helps ensure job completion in case of transient errors. |
| Parameter | বর্ণনা |
|---|---|
প্যারামিটার | Key-value pairs for configuring Spark properties (e.g., spark.executor.instances). These settings allow you to fine-tune the Spark environment for this specific job. |
Arguments | Command-line arguments passed directly to the job's main method. Use these to provide dynamic inputs or configuration flags to your application logic. |
Tags | Custom labels used to categorize and filter jobs in the UI. Tags are helpful for organizing jobs by project, team, or purpose (e.g., production, etl). |
| Parameter | বর্ণনা |
|---|---|
জার | Additional JAR files to be included in the classpath of the driver and executors. These are necessary if your job relies on external libraries not present in the base image. |
Files | Auxiliary files to be placed in the working directory of each executor. These are often used for configuration files or small datasets required by the job. |
PyFiles | Python dependencies such as .zip, .eggবা .py files. These are added to the PYTHONPATH to ensure Python jobs have access to required modules. |
প্রয়োজনীয়তা | A list of additional Python packages to install on the nodes before execution. This ensures the runtime environment matches your development environment. |
Spark Packages | Maven coordinates for Spark JAR packages to be downloaded and included. This is a convenient way to include libraries from Maven Central without manually uploading JARs. |
| Parameter | বর্ণনা |
|---|---|
Executors | The number of executor instances to launch for this job. Increasing this number allows for greater parallelism and faster processing of large datasets. |
Driver Cores | The number of CPU cores allocated to the driver process. More cores can help the driver manage task scheduling and result collection more efficiently. |
Executor Cores | The number of CPU cores allocated to each executor. This determines the number of concurrent tasks each executor can handle. |
Driver Memory | The amount of RAM allocated to the driver (e.g., 2g). Sufficient memory is required for the driver to maintain application state and handle large results. |
Executor Memory | The amount of RAM allocated to each executor (e.g., 4g). This directly affects how much data can be cached and processed in memory on each node. |
Dynamic Allocation | Enables automatic scaling of the number of executors based on the current workload. This helps optimize resource usage by requesting more executors when needed and releasing them when idle. |
Initial Executors | The initial number of executors to start with when dynamic allocation is enabled. This provides a baseline capacity when the job starts. |
Minimal number of executors | The lower bound for the number of executors when dynamic allocation is enabled. The job will never scale below this number. |
Maximal number of executors | The upper bound for the number of executors when dynamic allocation is enabled. This prevents the job from consuming too many cluster resources. |