V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
hitzhaowenqiang
V2EX  ›  Spark

求助几个 Spark 问题

  •  
  •   hitzhaowenqiang · 2022-06-29 12:14:14 +08:00 · 871 次点击
    这是一个创建于 906 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Q1: Someone handed you this dataset (~1GB), and you discovered that it’s over 1,000 tiny files. var df = spark.read.format("orc").load(clean_tracker_cstt_path) ○ Using Spark, please show how you can improve storage efficiency, and explain why this is important. ○ After improving storage efficiency, please explain impact on loading and using dataset in Spark.

    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”.

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2568 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 11:29 · PVG 19:29 · LAX 03:29 · JFK 06:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.