- Mastering Apache Spark 2.x(Second Edition)
- Romeo Kienzler
- 145字
- 2021-07-02 18:55:33
Code generation
Finally, things can be improved even more, since Apache Spark runs on the Java Virtual Machine (JVM), which allows byte code to be created and modified during runtime. Let's consider an addition of values a and b, resulting in the expression a+b. Normally, this expression had to be interpreted by the JVM for each row of the Dataset. It would be nice if we could generate the JVM ByteCode for this expression on the fly. This is possible, and Catalyst makes use of a very cool Scala feature called Quasiquotes, which basically allows an arbitrary string containing Scala code to be compiled into ByteCode on the fly, if it starts with q. So for example, q"row.get($a)+row.get($b)" will tell the Scala compiler to use this String to generate further JVM byte code. This way, less code has to be interpreted, which speeds things up.
- TestNG Beginner's Guide
- 技術領導力:程序員如何才能帶團隊
- VMware vSphere 6.7虛擬化架構實戰指南
- C#程序設計教程
- Building Wireless Sensor Networks Using Arduino
- C/C++數據結構與算法速學速用大辭典
- .NET 4.5 Parallel Extensions Cookbook
- R Data Science Essentials
- Python 3 數據分析與機器學習實戰
- RubyMotion iOS Develoment Essentials
- Implementing Domain:Specific Languages with Xtext and Xtend
- 輕松學Scratch 3.0 少兒編程(全彩)
- PHP從入門到精通(微視頻精編版)
- Flutter for Beginners
- 給產品經理講技術