Spark13: Spark Program Performance Optimization 01: high performance serialization class library, persistence or checkpoint, JVM garbage collection tuning, improving parallelism and data localization

1, Performance optimization analysis The execution of a computing task mainly depends on CPU, memory and bandwidth. Spark is a memory based computing engine, so for it, the biggest impact may be memory. Generally, our tasks encounter performance bottlenecks, and most of them are memory problems. Of course, CPU and bandwidth may also affect th ...

Added by matthewst on Wed, 09 Mar 2022 04:30:50 +0200

Scala basic syntax

Since learning Spark requires Scala, here are some basic grammars of scala. be careful: Scala doesn't need a semicolon at the end of a line 1 variable type val is immutable. It must be initialized at the time of declaration, and it cannot be assigned again after initializationvar is variable. It needs to be initialized when declaring. After ...

Added by fxb9500 on Sun, 06 Mar 2022 10:19:54 +0200

Wholestagecodegenexec in Spark (full code generation)

background In previous articles Analysis and solution of DataSourceScanExec NullPointerException caused by spark DPP , we directly skipped the step of dynamic code generation failure. This time, let's analyze that SQL is still in the article mentioned above. analysis After running the sql, we can see the following physical plan: We can see ...

Added by sgoldenb on Sat, 05 Mar 2022 12:43:09 +0200

Integrated java and scala development environment using maven

Git address: https://gitee.com/jyq_18792721831/sparkmaven.git Create Project Let's start by creating a generic maven project Create a project followed by a hello module Is also a normal maven module Increase scala dependency We don't write code in the parent project, the parent project is just for managing the child project, so th ...

Added by ahundiak on Fri, 18 Feb 2022 00:15:40 +0200

Scala grammar tutorial

Chapter 1 Introduction to Scala 1.1 general Scala is a static type programming language that takes Java virtual machine (JVM) as the running environment and combines the best features of object-oriented and functional programming (static languages need to be compiled in advance, such as Java, c, c + +, dynamic languages such as js). 1) Scala ...

Added by Iconoclast on Thu, 17 Feb 2022 05:15:33 +0200

Akka of Scala concurrent programming

summary Akka is a library developed using Scala. It is based on event driven toolkit for building high concurrency projects Akka characteristics: Provide an asynchronous, non blocking, high-performance event driven programming modelThe built-in fault tolerance mechanism allows the Actor to recover or reset in case of errorLightweight ...

Added by reeferd on Sat, 12 Feb 2022 12:37:20 +0200

Chisel tutorial - 03 Combinatorial logic in chisel (chisel 3 cheat sheet attached at the end)

Chisel combinational logic This section describes how to use Chisel components to implement combinatorial logic. This section will demonstrate how three basic Chisel types (UInt, unsigned integer; SInt, signed integer; Bool, Boolean) can be connected and operated. It should be noted that all Chisel variables are declared as Scala val. never ...

Added by Cerebral Cow on Sat, 12 Feb 2022 07:03:56 +0200

Partial function in scala

Definition of partial function 1) It is a good choice to use disk function when performing logical operations on conditions that meet certain conditions rather than all conditions 2) Encapsulate a group of case statements wrapped in braces as functions, which we call partial functions. It only calculates the parameters that will act on the exec ...

Added by JeBu on Wed, 09 Feb 2022 16:31:44 +0200

Spark learning notes [1]-scala environment installation and basic syntax

Spark learning notes [1]-scala environment installation and basic syntax    just as the saying goes, if you want to do a good job, you must first use your tools. Spark's development language is not Java but scala. Although they both run on the JVM, the basic characteristics of the two languages are still somewhat different. Here is a ...

Added by GateGuardian on Sun, 06 Feb 2022 08:36:12 +0200

Scala pattern matching

Chapter 1 pattern matching Pattern matching in Scala is similar to the switch syntax in Java int i = 10 switch (i) { case 10 : System.out.println("10"); break; case 20 : System.out.println("20"); break; default : System.out.println("other number"); break; } But scala is more powerful ...

Added by titangf on Sat, 05 Feb 2022 14:30:03 +0200