zoukankan      html  css  js  c++  java
  • Spark学习之RDD算子

    Transformations算子

    1、map(T ⇒ U)

    2、flatMap(T ⇒ List[U])

    3、filter(T ⇒ Boolean)

    4、mapPartitions(List[T] ⇒ List[U])

    5、mapPartitionsWithIndex

    6、mapValues

    7、sample(withReplacement, fraction, seed)

    8、union(other)

    9、intersection(other)

    10、subtract(other, numPartitions)

    11、distinct(numPartitions)

    12、reduceByKey((V, V) ⇒ V, numPartition)

    13、groupByKey()

    14、combineByKey()

    15、aggregateByKey()

    16、foldByKey(zeroValue)((V, V) ⇒ V)

    17、join(other, numPartitions)

    18、cogroup(other, numPartitions)

    19、cartesian(other)

    20、sortBy(ascending, numPartitions)

    21、partitionBy(partitioner)

    22、coalesce(numPartitions)

    23、repartition(numPartitions)

    24、repartitionAndSortWithinPartitions

    Action算子

    1、reduce( (T, T) ⇒ U )

    2、collect()

    3、count()

    4、first()

    5、take( N )

    6、takeSample(withReplacement, fract)

    7、fold(zeroValue)( (T, T) ⇒ U )

    8、saveAsTextFile(path)

    9、saveAsSequenceFile(path)

    10、countByKey()

    11、foreach( T ⇒ … )

  • 相关阅读:
    keepalived的一些。。
    virtualbox复制了以后网卡启动不了。
    mysql安装之后需要调的参数
    mysql5.6 thread pool
    $releasever 不正确解析
    linux 被入侵后扫尾工作
    简单启动脚本编写
    tcmalloc安装
    rsyslog及loganalyzer
    nsswitch & pam
  • 原文地址:https://www.cnblogs.com/xp-thebest/p/14284506.html
Copyright © 2011-2022 走看看