V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
hitzhaowenqiang
V2EX  ›  Spark

求助几个 Spark 问题

  •  
  •   hitzhaowenqiang · Jun 29, 2022 · 1901 views
    This topic created in 1399 days ago, the information mentioned may be changed or developed.

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

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3784 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 04:34 · PVG 12:34 · LAX 21:34 · JFK 00:34
    ♥ Do have faith in what you're doing.