<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[自渡]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/helloworld0906</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; helloworld0906]]></copyright><item><title><![CDATA[shell使用命令firefox打开浏览器报错]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/122774631</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/122774631</guid><author>helloworld0906</author><pubDate>Thu, 03 Feb 2022 11:06:09 +0800</pubDate><description><![CDATA[Failed to open connection to "session" message bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

执行命令


eval `dbus-launch --sh-syntax`

Error: no display specified

在ssh到另一台服务器时加参数 “-X”，可正常打开

ssh -X w997@10.109.105.5
...]]></description><category></category></item><item><title><![CDATA[IDEA打包]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/122310105</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/122310105</guid><author>helloworld0906</author><pubDate>Tue, 04 Jan 2022 19:47:51 +0800</pubDate><description><![CDATA[jar包在out文件夹里





上传jar包到spark集群，submit提交。


]]></description><category></category></item><item><title><![CDATA[IDEA下修改spark源码报错]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/122242659</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/122242659</guid><author>helloworld0906</author><pubDate>Thu, 30 Dec 2021 18:01:50 +0800</pubDate><description><![CDATA[Scalastyle examines your Scala code and indicates potential problems with it. Place scalastyle_config.xml in the &lt;root&gt;/.idea or &lt;root&gt;/project directory.


scalastyle官网上下载scalastyle_config.xml文件到spark代码根目录下，替换原来的xml文件，重启IDEA即可。




...]]></description><category></category></item><item><title><![CDATA[SPARK_DIST_CLASSPATH配置]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/122183034</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/122183034</guid><author>helloworld0906</author><pubDate>Mon, 27 Dec 2021 23:56:19 +0800</pubDate><description><![CDATA[请注意，Spark2.x是用Scala2.11预构建的，但2.4.2版本除外，它是用Scala2.12预构建的。Smark3.0+是用Scala2.12预构建的。
spark-env.sh中配置：

export SPARK_DIST_CLASSPATH=$(/opt/bigdata/hadoop-2.9.2/bin/hadoop classpath)
有了SPARK_DIST_CLASSPATH配置信息以后，Spark就可以把数据存储到Hadoop分布式文件系统HDFS中，也可以从HDFS中读取数据。如果]]></description><category></category></item><item><title><![CDATA[CAJ使用]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/121409934</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/121409934</guid><author>helloworld0906</author><pubDate>Thu, 18 Nov 2021 20:56:41 +0800</pubDate><description><![CDATA[复制caj文字的时候会出现很多换行。选中需要删除换行的一段文字，ctrl+H



当我们写报告，需要复制一些caj文献中的参考文献，如果我们直接复制到word中，经常格式会错乱，这时候需要设置一下，具体操作步骤如下：


	点击Aa更改大小写按钮
	
	
	点击半角
	
这样就可以恢复成正常格式。

caj粘贴到word中会出现很多换行_XIONGDA的博客-优快云博客_caj文档复制到word有分行


...]]></description><category></category></item><item><title><![CDATA[java.lang.OutOfMemoryError: GC overhead limit exceeded]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/103657372</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/103657372</guid><author>helloworld0906</author><pubDate>Fri, 10 Sep 2021 11:09:45 +0800</pubDate><description><![CDATA[解决办法：
由于我们在执行Spark任务是，读取所需要的原数据，数据量太大，导致在Worker上面分配的任务执行数据时所需要的内存不够，直接导致内存溢出了，所以我们有必要增加Worker上面的内存来满足程序运行需要。
在Spark Streaming或者其他spark任务中，会遇到在Spark中常见的问题，典型如Executor Lost相关的问题(shuffle fetch失败，Task失败...]]></description><category></category></item><item><title><![CDATA[spark dataframe 中 drop 和 .na.drop 详解]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/114525760</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/114525760</guid><author>helloworld0906</author><pubDate>Mon, 08 Mar 2021 11:09:49 +0800</pubDate><description><![CDATA[问题描述：原始数据data总行数是1303638，使用data.drop()后数据总行数是1303638，使用data.na.drop()后数据总行数是0；为啥data.drop()没有丢弃null或nan的数据？

总结：

1）data.drop()如果不传递列名，不会做任何操作；

2）通过以下比较发现，drop是用来丢弃列的，而na.drop是用来丢弃行的；

3）通过以下比较发现，dataframe.drop是直接调用的dataset中drop接口；

4）如果想要...]]></description><category></category></item><item><title><![CDATA[Latex 算法过长 分页显示方法]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/114383864</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/114383864</guid><author>helloworld0906</author><pubDate>Fri, 05 Mar 2021 10:00:10 +0800</pubDate><description><![CDATA[1.引用algorithm包；

2.在\begin{document}前加上以下Latex代码：


\makeatletter
\newenvironment{breakablealgorithm}
  {% \begin{breakablealgorithm}
   \begin{center}
     \refstepcounter{algorithm}% New algorithm
     \hrule height.8pt depth0pt \kern2pt% \@fs@pre for \@]]></description><category></category></item><item><title><![CDATA[如何更改Spark程序的HDFS复制因子？]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/110003830</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/110003830</guid><author>helloworld0906</author><pubDate>Mon, 23 Nov 2020 18:06:52 +0800</pubDate><description><![CDATA[将Spark程序的HDFS复制因子从3更改为1


    val sparkConf = new SparkConf()
    sparkConf.set("spark.driver.maxResultSize", "10g")//.set("autoBroadcastJoinThresho1d","8388608000").set("spark.sql.broadcastTimeout","")

    val spark =SparkSession.builder().config(sparkCo]]></description><category></category></item><item><title><![CDATA[spark-大表和小表join-未完待续]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/109011595</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/109011595</guid><author>helloworld0906</author><pubDate>Sun, 11 Oct 2020 14:37:21 +0800</pubDate><description><![CDATA[https://cn.bing.com/search?q=spark+sql+%E5%A4%A7%E8%A1%A8%E5%92%8C%E5%B0%8F%E8%A1%A8join&amp;qs=n&amp;form=QBRE&amp;sp=-1&amp;pq=spark+sql+%E5%A4%A7%E8%A1%A8%E5%92%8C%E5%B0%8F%E8%A1%A8join&amp;sc=0-19&amp;sk=&amp;cvid=2F2FD7C73D614449B45C6942AE30BB11

http]]></description><category></category></item><item><title><![CDATA[spark之Row]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/109011565</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/109011565</guid><author>helloworld0906</author><pubDate>Sun, 11 Oct 2020 14:33:57 +0800</pubDate><description><![CDATA[hkl曰：直接搞过来官方的API文档，看不懂英文没关系，看它的实例就可以了。



http://spark.apache.org/docs/1.3.1/api/scala/index.html#org.apache.spark.sql.Row



注意：import org.apache.spark.sql._ 要先导入这个包 。





Represents one row of output from a relational operator. Allows both generic ...]]></description><category></category></item><item><title><![CDATA[解决升级Spark2.0之后，DataFrame map操作报错]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/109011500</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/109011500</guid><author>helloworld0906</author><pubDate>Sun, 11 Oct 2020 14:29:42 +0800</pubDate><description><![CDATA[　当我们在使用spark1.6的时候，当我们创建SQLContext读取一个文件之后,返回DataFrame类型的变量可以直接.map操作，不会报错。但是升级之后会包一个错误，如下：

　　报错：No implicits found for parameter evidence$6: Encoder[Unit]

　　　　

　　主要的错误原因为：　


　　******error: Unable to find encoder for type stored in a Dataset. Primitive]]></description><category></category></item><item><title><![CDATA[spark空指针错误可能的原因之一——df.rdd.toDF]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/109011363</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/109011363</guid><author>helloworld0906</author><pubDate>Sun, 11 Oct 2020 14:28:16 +0800</pubDate><description><![CDATA[这空值动不动就Null point error，是个巨大的坑，昨天调试了一天的程序发现，dataframe转rdd进行类似于filter一些的操作，最后count的时候就会报空指针的错误，但是df不转为rdd而是直接df.filter(func)的话，就可以不报错地完美运行。究其根本...待下回分解。

关于spark/Scala的空值处理：

https://www.cnblogs.com/wwxbi/p/6011422.html

https://blog.youkuaiyun.com/u012798083/art]]></description><category></category></item><item><title><![CDATA[java.lang.NullPointerException的可能原因及处理]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/109011221</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/109011221</guid><author>helloworld0906</author><pubDate>Sun, 11 Oct 2020 14:10:28 +0800</pubDate><description><![CDATA[https://www.cnblogs.com/StrayWolf/p/6035952.html

java.lang.NullPointerException具体意思是空指针异常，最常见的问题就是没有初始化。


	字符串等数据类型没有初始化
	
	
	类实例（对象）有用具体的类初始化
	
	没有判断是否为空
https://www.php.cn/java-article-450636.html

“java.lang.NullPointerException”主要是运行时才会发生，该异常属于Runti.]]></description><category></category></item><item><title><![CDATA[RDD和Dataframe相互转换]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/109011185</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/109011185</guid><author>helloworld0906</author><pubDate>Sun, 11 Oct 2020 14:05:26 +0800</pubDate><description><![CDATA[参考：https://www.cnblogs.com/starwater/p/6841807.html

在spark中，RDD、DataFrame、Dataset是最常用的数据类型，本博文给出笔者在使用的过程中体会到的区别和各自的优势



共性：

1、RDD、DataFrame、Dataset全都是spark平台下的分布式弹性数据集，为处理超大型数据提供便利

2、三者都有惰性机制，在进行创建、转换，如map方法时，不会立即执行，只有在遇到Action如foreach时，三者才会开始遍历运算，极端情.]]></description><category></category></item><item><title><![CDATA[scala中的time.parse]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/109010974</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/109010974</guid><author>helloworld0906</author><pubDate>Sun, 11 Oct 2020 14:03:49 +0800</pubDate><description><![CDATA[docs.oracle.com/javase/8/docs/api/java/text/DateFormat.html#parse-java.lang.String-



简而言之就是把字符串的“日期”转为真正的日期。真正的日期会自带一些split的操作。

https://blog.youkuaiyun.com/u012940753/article/details/51218466?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMac]]></description><category></category></item><item><title><![CDATA[spark sql 之 limit]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/108987248</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/108987248</guid><author>helloworld0906</author><pubDate>Fri, 09 Oct 2020 22:00:42 +0800</pubDate><description><![CDATA[limit执行的不是action操作。

show/head一类的是action操作。

Spark limit改进

在执行一条SQL，类似sparkSession.sql(“select * from table where id=1 limit 10000000”)这种SQL时，发现速度很慢。后面只有一个partition在处理。

limit的原理就是在先根据查询条件组成一个RDD，然后每个partition取limit数量，再统一发给一个partition，然后取出limit数量的Row.

这个]]></description><category></category></item><item><title><![CDATA[关于spark中的groupByKey、reduceByKey、foldByKey]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/108985991</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/108985991</guid><author>helloworld0906</author><pubDate>Fri, 09 Oct 2020 21:56:45 +0800</pubDate><description><![CDATA[避免使用GroupByKey

我们看一下两种计算word counts 的方法，一个使用reduceByKey，另一个使用 groupByKey：


val words = Array("one", "two", "two", "three", "three", "three")
 
val wordPairsRDD = sc.parallelize(words).map(word =&gt; (word, 1))
 
val wordCountsWithReduce = wordPairsRDD
  ]]></description><category></category></item><item><title><![CDATA[sparkSQL执行计划详解]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/108973521</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/108973521</guid><author>helloworld0906</author><pubDate>Fri, 09 Oct 2020 10:01:59 +0800</pubDate><description><![CDATA[一：首先将我们从文本中读取的数据映射到表也就是视图

eg:

　　$&gt;cat b.txt



　　1 ded
　　2 dsfre
　　3 sfs
　　4 fr

　　$&gt;val sc = spark.sparkContext 　　　　#创建SparkContext

　　$&gt;val rdd = sc.textFile("file:///home/Alex_lei/b.txt").map(x=&gt;x.split(" ")).map(x=&gt;(x(0),x(1))) 

　　　..]]></description><category></category></item><item><title><![CDATA[小分区合并问题-Coalesce()方法和repartition方法]]></title><link>https://blog.youkuaiyun.com/helloworld0906/article/details/108967118</link><guid>https://blog.youkuaiyun.com/helloworld0906/article/details/108967118</guid><author>helloworld0906</author><pubDate>Thu, 08 Oct 2020 19:44:43 +0800</pubDate><description><![CDATA[小分区合并问题介绍：

在使用spark进行数据处理的过程中，常会使用filter方法对数据进行一些预处理，过滤掉一些不符合条件的数据。在使用该方法对数据进行频繁过滤或者是过滤掉的数据量过大的情况下就会造成大量小分区的生成。在spark内部会对每一个分区分配一个task来执行任务，如果task过多，那么每个task处理的数据量就会很小，造成线程频繁在task之间切换，使得资源开销较大，且很多任务等待执行，并行度不高，最终造成集群工作效益低下。

为了解决这一个问题，常采用RDD中重分区的函数（coalesc]]></description><category></category></item></channel></rss>