有大佬知道如何转义为 spark sql 的格式?
]]>目前 RDD 的 MVP 已经完成,最大的收获是彻底理解了几个费解的问题:
1 ,Stage 的切分原理,为什么要这么做
2 ,Shuffle 是如何实现的,write/read 是如何衔接
3 ,Partition 为何如此的重要
有兴趣的同学一起 github 交个朋友吧,项目地址 https://github.com/changzhiwin/spark-core-analysis ,特点:
1 ,聚焦在 RDD 层面(这是 Spark 的根本)
2 ,入门明确,代码量小(保留逻辑),容易上手运行(运行起来,理解代码就容易了)
]]>Q2: Given the schema below, use Spark 2.x Dataframe API to give count of events per day for the last 7 days.
root |-- action_id: integer (nullable = true) |-- receive_time: timestamp (nullable = true) |-- uuid: string (nullable = true)
Q3: You have calculated the Daily Event Count above using Spark API. Now please find the Min, Max, Mean, and Standard Deviation of Daily Count by using Scala. Only built-in Scala functions may be used. Please format the answer with 2 decimal places, e.g. “The Average Daily Count from Last 7 Days is x.xx”.
]]>目前没有好的思路,就是获取每一列元素依次遍历提取出所有需要的元素,但是想到要遍历 8 层眼泪都要流下来了:
// 层层对象遍历 val identifiers = row.get(0).asInstanceOf[Row].get(0).asInstanceOf[Row].get(0).asInstanceOf[Row].get(0) // 解析数组 println(identifiers.asInstanceOf[mutable.WrappedArray[AnyRef]](0))
就以图示中的结构来说,数据不算复杂,但是完整的结构实在是令人神伤,贴了图恐怕会占据整个页面。另外最终要插入的 20 多张表中十几张是关联表。 初次使用 Spark 处理数据,求大家给点意见和思路,万分感谢!
]]>• 轻松愉快的工作氛围,众多优秀以及 nice 的小伙伴 • 超长的假期 —— 每年 15 天年假起,每工作满 1 年加一天(最多 20 天);除此以外,工作满 5 年还将获得额外的 4 周带薪假期!以及 15 天带薪病假等等等。 • 包容、多元以及国际化的公司文化 • 市值 2000 亿美元,全民持股,股票激励,薪酬不输 996 公司的“福报”。work-life balance,生活不应只有加班。
PayPal 的大数据组会做什么?
At PayPal Global Data Science(GDS) team, we develop machine learning platform and AI applications to improve PayPal’s global business. Machine learning and AI is one of the core competitive advantage of PayPal, which significantly reduced payment risk loss, brought million dollars’ revenue and expanded to multiple domains rapidly. As an engineer in GDS, you will work closely with analytical team, understand the requirement with cutting-edge algorithm, contribute to the core platform, make the research work to a real product. We are looking for strong technologists who are passionate to solve machine learning problems and able to continuously deliver AI solutions in scalable way.
这个职位的要求是什么?
Qualifications • BS, MS, or PhD in Computer Science or related technical discipline (or equivalent). • 8+ years’ work experience in software development area with at least 5+ years’ experience in Java programming. • Excellent understanding of computer science fundamentals, data structures, and algorithms. • Excellent problem solving skills, can triage and resolve critical tech issues without supervision. • Expertise required in object-oriented design methodology and application development in Java. • Experience in big data technology such as Hadoop/Spark/Pig/HBASE/Streaming • Mastering at least one scripting language such as Unix Shell/Python/Perl/JS • Hands on web application development skill (HTML5/CSS/JS) is a very big plus • Knowledge on Machine Learning application pipeline is a very big plus • Proven results oriented person with a delivery focus in a high velocity, high quality environment. • Strong communication skills in Oral and Written English. • Working Experience in Multi-national Company is a plus. • Geek style is a big plus.
还有附加!!!!!!!!:
如果有兴趣的小伙伴,同时又有点担心年终奖的损失的话。 不用担心!基于面试情况,PayPal 会考虑给予额外奖金或者 Sign-On Bonus 之类减少你的年终奖损失, 让你在年底既能轻松搞定新的 Exciting 的工作机会,又能即时得到一些补偿,何乐不为呢?
]]>关于上面那个图,ShuffleMapStage 中,有三个 RDD,每个 RDD 有三个分区 我看网上文章都是说一个分区对应一个 task,
1.上面那个 ShuffleMapStage 中阶段里是否存在 9 个 Task 。
2.但站在 pipeline 角度上看,应该只有三个 task,每个 RDD 的一个分区组合成一个 task 。
上面两种说法,哪种是正确的呢,被搞糊涂了。谢谢!
]]>有没有大佬能说下 scala 的写法,rdd 处理完多行会挤在一起了,dataframe 写了又不太对
自己去谷歌了一下,这个 bug 被提交过: https://issues.apache.org/jira/browse/SPARK-7688
但是被认为不是 bug,直接关掉了 怎么解决的没说。 有达人知道怎么搞么?
]]>大家有啥好方法进行 spark 的方法搜索么。
]]>取配置文件
,配置文件在本地,所用用 cluster 模式会出现 FilenotfondException , excutor 不知道这个文件的位置,现在想让excutor 知道这个文件的位置和内容 找到了几个参数 就是 spark-submit 加上--files 但是似乎没有起到作用,求个正确的姿势。 有两个配置文件,一个是 project.propeties , 一个是 parser.properties 用 Scala 搞得,但是 io 只能读取本地文件,这个比较坑,因为 hadoop 上面的文件系统似乎和本地的不一样。
还有一个方法似乎是用 --properties-file 但是这个只能载入配置。来个正确的姿势急等。*
spark-submit --class "app.Runml" --master yarn-cluster --files "/home/expertise/BigData2016/conf/project.properties","/home/expertise/BigData2016/conf/2016.properties" --jar ~/BigData2016/ml-assembly-1.0.jar 出现了 FileNotFond ,但是 client 模式就 ok 。 郁闷死了,不想重新改 parser 的代码,这里是读取文件的代码,返回一个 properties ,可以之间 properties.get(你想要的参数)
object Tools { def conf(file: String): Properties = { val properties = new Properties() properties.load(new FileInputStream(file)) properties } }
]]>