fastutil

Spark实践 -- 性能优化基础

我只是一个虾纸丫 提交于 2020-05-07 13:56:01
性能调优相关的原理讲解、经验总结; 掌握一整套Spark企业级性能调优解决方案;而不只是简单的一些性能调优技巧。 针对写好的spark作业,实施一整套数据倾斜解决方案:实际经验中积累的数据倾斜现象的表现,以及处理后的效果总结。 调优前首先要对spark的作业流程清楚: Driver到Executor的结构; Master: Driver |-- Worker: Executor |-- job |-- stage |-- Task Task 一个Stage内, 最终的RDD有多少个partition,就会产生多少个task ,一个task处理一个partition的数据; 作业划分为task分到Executor上,然后一个cpu core执行一个task; BlockManager负责Executor,task的数据管理,task来它这里拿数据; 1.1 资源分配 性能调优的王道:分配更多资源。 分配哪些资源? executor、cpu per executor、memory per executor、driver memory 在哪里分配这些资源? 在我们在生产环境中,提交spark作业时,用的spark-submit shell脚本,里面调整对应的参数 /usr/local/spark/bin/spark-submit \ --class cn.spark.sparktest

Android Studio 编译报错:download fastutil-7.2.0.jar

孤街醉人 提交于 2020-04-10 11:20:30
引用: https://www.cnblogs.com/caoxinyu/p/10568462.html build.gradle 可能有多个,一般在app 节点,默认里面不包含 buildscript, allprojects 这两项。 把这段代码加入 build.gradle (Moudle:app) 尾部: buildscript { repositories { maven{ url = "http://maven.aliyun.com/nexus/content/groups/public/" } google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.1.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { maven{ url = "http://maven.aliyun.com/nexus/content/groups/public/" } google() jcenter() } } 来源: oschina 链接:

How do I implement a fastutils map in a Spark UDAF?

╄→гoц情女王★ 提交于 2019-12-11 17:43:33
问题 I'm building a Spark UDAF where I'm storing the intermediate data in a fastutils map. Schema looks like this: def bufferSchema = new StructType().add("my_map_col", MapType(StringType, IntegerType)) I initialize with no problem: def initialize(buffer: MutableAggregationBuffer) = { buffer(0) = new Object2IntOpenHashMap[String]() } Problem comes when I try to update: def update(buffer: MutableAggregationBuffer, input: Row) = { val myMap = buffer.getAs[Object2IntOpenHashMap[String]](0) myMap.put

Why is Integer parameter of Java method mapped to Int and not platform type?

不羁岁月 提交于 2019-11-29 04:23:11
Inspired by another question . In fastutil library there's IntArrayList class which has a method with the following Java signature: public void push(Integer o) From Kotlin it is seen as push(o: Int) Is there a specific reason why it is Int and not platform type Int! ? I expected it to be push(o: Int!) at least because a method with the same signature defined in Java source within the project with Kotlin sources has Int! as parameter type seen from Kotlin (even defined in different module, and even imported from jar of that module!). Also, the described behavior causes push(Integer o) to

Why is Integer parameter of Java method mapped to Int and not platform type?

五迷三道 提交于 2019-11-27 18:30:53
问题 Inspired by another question. In fastutil library there's IntArrayList class which has a method with the following Java signature: public void push(Integer o) From Kotlin it is seen as push(o: Int) Is there a specific reason why it is Int and not platform type Int! ? I expected it to be push(o: Int!) at least because a method with the same signature defined in Java source within the project with Kotlin sources has Int! as parameter type seen from Kotlin (even defined in different module, and