Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Spark2x Sample Project

Updated on 2024-10-23 GMT+08:00

To obtain an MRS sample project, visit https://github.com/huaweicloud/huaweicloud-mrs-example and switch to the branch that matches the MRS cluster version. Download the package to the local PC and decompress it to obtain the sample project of each component.

MRS provides the following Spark2x sample projects:
Table 1 Spark2x-related sample projects

Sample Project Location

Description

sparknormal-examples/SparkHbasetoCarbonJavaExample

Application development sample code for Spark to synchronize HBase data to CarbonData.

In this sample project, the application writes data to HBase in real time for point query services. Data is synchronized to CarbonData tables in batches at a specified interval for analytical query services.

sparknormal-examples/SparkHbasetoHbaseJavaExample

Spark reads data from HBase and then writes the data to the Java/Scala/Python sample project of HBase.

In this sample project, the Spark applications analyze and summarize data in two HBase tables.

sparknormal-examples/SparkHbasetoHbasePythonExample

sparknormal-examples/SparkHbasetoHbaseScalaExample

sparknormal-examples/SparkHivetoHbaseJavaExample

Application development sample code for Spark to read data from Hive and write the data to HBase.

sparknormal-examples/SparkHivetoHbasePythonExample

sparknormal-examples/SparkHivetoHbaseScalaExample

sparknormal-examples/SparkJavaExample

Java/Python/Scala sample project of Spark Core tasks.

The applications of this project read text data from HDFS and then calculate and analyze the data.

sparknormal-examples/SparkPythonExample

sparknormal-examples/SparkSQLJavaExample

sparknormal-examples/SparkLauncherJavaExample

Java/Scala sample project that uses Spark Launcher to submit jobs.

This project uses the org.apache.spark.launcher.SparkLauncher class through Java or Scala commands to submit Spark applications.

sparknormal-examples/SparkLauncherScalaExample

sparknormal-examples/SparkOnClickHouseJavaExample

Spark uses the native ClickHouse JDBC APIs and Spark JDBC driver to create, query, and insert ClickHouse databases and tables.

sparknormal-examples/SparkOnClickHousePythonExample

sparknormal-examples/SparkOnClickHouseScalaExample

sparknormal-examples/SparkOnHbaseJavaExample

Java/Scala/Python sample project in the Spark on HBase scenario.

You can use HBase as data sources in applications. In this project, data is stored in HBase in Avro format. Data is read from the HBase, and the read data is filtered.

sparknormal-examples/SparkOnHbasePythonExample

sparknormal-examples/SparkOnHbaseScalaExample

sparknormal-examples/SparkOnHudiJavaExample

Java/Scala/Python sample project in the Spark on Hudi scenario.

The applications of this project use Spark to perform operations such as data insertion, query, update, incremental query, query at a specific time point, and data deletion on Hudi.

sparknormal-examples/SparkOnHudiPythonExample

sparknormal-examples/SparkOnHudiScalaExample

sparknormal-examples/SparkSQLJavaExample

Java/Python/Scala sample project of Spark SQL tasks.

The applications of this project read text data from HDFS and then calculate and analyze the data.

sparknormal-examples/SparkSQLPythonExample

sparknormal-examples/SparkSQLScalaExample

sparknormal-examples/SparkStreamingKafka010JavaExample

Java/Scala sample project used by Spark Streaming to receive data from Kafka and perform statistical analysis.

The applications of this project accumulate and calculate the stream data in Kafka in real time and calculate the total number of records of each word.

sparknormal-examples/SparkStreamingKafka010PythonExample

sparknormal-examples/SparkStreamingtoHbaseJavaExample010

Java/Scala/Python sample project used by Spark Streaming to read Kafka data and write the data into HBase.

The applications of this project start a task every 5 seconds to read data from Kafka and update the data to a specified HBase table.

sparknormal-examples/SparkStreamingtoHbasePythonExample010

sparknormal-examples/SparkStreamingtoHbaseScalaExample010

sparknormal-examples/SparkStructuredStreamingJavaExample

In Spark applications, Structured Streaming is used to call Kafka APIs to obtain word records. Word records are classified to obtain the number of records of each word.

sparknormal-examples/SparkStructuredStreamingPythonExample

sparknormal-examples/SparkStructuredStreamingScalaExample

sparknormal-examples/SparkThriftServerJavaExample

Java/Scala sample project for Spark SQL access through JDBC.

In this sample, you can customize JDBCServer clients and use JDBC connections to create, load data to, query, and delete data tables.

sparknormal-examples/SparkThriftServerScalaExample

sparknormal-examples/StructuredStreamingADScalaExample

Structured Streaming is used to read advertisement request data, display data, and click data from Kafka, obtain effective display statistics and click statistics in real time, and write the statistics to Kafka.

sparknormal-examples/StructuredStreamingStateScalaExample

In the Spark structure flow application, the number of events in each session and the start and end timestamp of the sessions are collected in different batches. At the same time, the system exports the sessions that are in the updated state in this batch.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback