随笔分类 - 经验
摘要:beeline连接hiveserver2报错 Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: Failed to open new session: java.lang.Runti
阅读全文
摘要:在hive中查看表结构时中文注释乱码,分为两种情况,一种是desc $table,一种是show create table $table 1 数据库字符集 检查 mysql> show variables like '%char%';mysql> show create table COLUMNS_
阅读全文
摘要:docker经常需要挂载文件到容器中,比如启动nginx # docker run -d --name test_nginx -v /tmp/nginx.conf:/etc/nginx/nginx.conf nginx 然后就有修改配置文件然后刷新的功能,如果直接用vi编辑宿主机文件 # vi /t
阅读全文
摘要:redhat6系统默认安装的glibc-2.12,有的软件依赖的是glibc-2.14,这时需要升级glibc,下载安装 http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz # ./configure --prefix=/usr --disable-prof
阅读全文
摘要:hive通过外部表读写elasticsearch数据,和读写hbase数据差不多,差别是需要下载elasticsearch-hadoop-hive-6.6.2.jar,然后使用其中的EsStorageHandler; Connect the massive data storage and deep
阅读全文
摘要:在hive中创建外部表: CREATE EXTERNAL TABLE hive_hbase_table(key string, name string,desc string) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
阅读全文
摘要:hive及其他组件(比如spark、impala等)都会依赖hive metastore,依赖的配置文件位于hive-site.xml hive metastore重要配置 hive.metastore.warehouse.dirhive2及之前版本默认为/user/hive/warehouse/,
阅读全文
摘要:securecrt一段时间没有操作连接就会自动断开(xshell就没有这个问题),提示信息为:信号灯超时时间已到,解决方法为: Options -- Session Options -- Terminal -- Send protocol NO-OP
阅读全文
摘要:redhat查看发行版 # cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) 查看内核版本 # uname -aLinux $host 3.10.0-327.28.3.el7.x86_64 #1 SMP Thu Aug 18 1
阅读全文
摘要:在yarn中的application详情页面 http://resourcemanager/cluster/app/$applicationId 或者通过application命令 yarn application -status $applicationId 只能看到应用启动以来占用的资源*时间统
阅读全文
摘要:spark 2.1.1 系统中希望监控spark on yarn任务的执行进度,但是监控过程发现提交任务之后执行进度总是10%,直到执行成功或者失败,进度会突然变为100%,很神奇, 下面看spark on yarn任务提交过程: spark on yarn提交任务时会把mainClass修改为Cl
阅读全文
摘要:spark中join有两种,一种是RDD的join,一种是sql中的join,分别来看: 1 RDD join org.apache.spark.rdd.PairRDDFunctions /** * Return an RDD containing all pairs of elements wit
阅读全文
摘要:spark sql执行insert overwrite table时,写到新表或者新分区的文件个数,有可能是200个,也有可能是任意个,为什么会有这种差别? 首先看一下spark sql执行insert overwrite table流程: 1 创建临时目录,比如 .hive-staging_hiv
阅读全文
摘要:scala 官方地址 https://www.scala-lang.org/ 本文尽可能包含了一些主要的java和scala在编程实践时的显著差异,展现scala的代码的简洁优雅;scala通吃<面向对象编程Object Oriented Programming>和<函数式编程Functional
阅读全文
摘要:今天遇到一个问题,spark应用中在一个循环里执行sql,每个sql都会向一张表写入数据,比如 insert overwrite table test_table partition(dt) select * from test_table_another; 除了执行sql没有其他逻辑,每个sql都
阅读全文
摘要:一 问题 在hive1.2中使用hive或者beeline执行sql都有进度信息,但是升级到hive2.0以后,只有hive执行sql还有进度信息,beeline执行sql完全silence,在等待结果的过程中完全不知道执行到哪了 1 hive执行sql过程(有进度信息) hive> select
阅读全文
摘要:spark中要将计算结果取回driver,有两种方式:collect和take,这两种方式有什么差别?来看代码: org.apache.spark.rdd.RDD /** * Return an array that contains all of the elements in this RDD.
阅读全文
摘要:之前讨论过hive中limit的实现,详见 https://www.cnblogs.com/barneywill/p/10109217.html下面看spark sql中limit的实现,首先看执行计划: spark-sql> explain select * from test1 limit 10
阅读全文
摘要:spark on yarn通过--deploy-mode cluster提交任务之后,应用已经在yarn上执行了,但是spark-submit提交进程还在,直到应用执行结束,提交进程才会退出,有时这会很不方便,并且不注意的话还会占用很多资源,比如提交spark streaming应用; 最近发现sp
阅读全文
摘要:本地运行spark报错 18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.18/12/18 12:56:55 WARN Utils: Service 'spa
阅读全文