impala

Dropping multiple partitions in Impala/Hive

非 Y 不嫁゛ 提交于 2019-12-03 20:29:26
1- I'm trying to delete multiple partitions at once, but struggling to do it with either Impala or Hive. I tried the following query, with and without ' : ALTER TABLE cz_prd_corrti_st.s1mme_transstats_info DROP IF EXISTS PARTITION (pr_load_time='20170701000317') PARTITION (pr_load_time='20170701000831') The error I'm getting is as follow: AnalysisException: Syntax error in line 3: PARTITION (pr_load_time='20170701000831') ^ Encountered: PARTITION Expected: CACHED, LOCATION, PURGE, SET, UNCACHED CAUSED BY: Exception: Syntax error The partition column is bigint type, query for deleting only one

自己动手写Impala UDF

回眸只為那壹抹淺笑 提交于 2019-12-03 20:15:34
概述 出于对可扩展性和性能的考虑,UDF已变成 大数据 生态圈查询引擎的必备功能之一,无论是Calcite、Hive、Impala都对其进行支持,但是UDF的支持有利也有弊,好处在于它提供了对某些用户独有需求的支持,例如某些产品需要将表中的某字段使用自定义的方式解析成可读字段,例如需要实现特殊的聚合函数;它的弊端在于它对用户开发,这样对于恶意的用户可能执行非正常的逻辑,例如在函数中删除或者拷贝其它文件内容,从而对非授权数据造成破坏,因此对于一个SQL引擎来说,我们需要UDF的集中管理,所有用户自定义的UDF都需要管理员审查源代码,不允许普通用户自己上传UDF,从而避免意外的发生。 对于通常UDF的需求,个人觉得有两方面的需求:1、系统提供的函数完成不了的需求,或者需要使用系统函数进行拼凑才能完成的需求。2、使用当前系统提供的函数性能太差,需要做一些特别的优化。另外,对于UDF还分为两类:自定义函数(UDF)和自定义聚合函数(UDAF),前者会处理每一条输入的记录,转换成处理后的结果,类似于map的功能,后者对于多条记录进行聚合,输出聚合之后的值,类似于reduce的功能。 众所周知Impala使用了 Java 和C++实现(虽然大多数时候我们都说Impala是C++实现的,所以性能更好,但是它的SQL解析部分的确是Java实现的),Impala同样也支持两种语言的UDF

cdh4 hadoop,hive,impala,hbase本地库搭建及安装

倾然丶 夕夏残阳落幕 提交于 2019-12-03 11:27:44
--hadoop文件位置: log目录 : /var/log/hadoop-hdfs /var/log/hadoop-mapreduce /var/log/hbase /var/log/hive /var/log/hive /var/log/impala 安装目录: /usr/lib 启动命令目录: /etc/init.d/ 配置文件目录: /etc/hadoop/conf /etc/hbase/conf /etc/hive/conf /etc/impala/conf 环境变量: /etc/profile 让/etc/profile文件修改后立即生效 ,可以使用如下命令: source /etc/profile node配置: /etc/hosts 资源库位置 : /etc/yum.repos.d/ 1.本地cdh4 搭建/ 1、安装httpd服务,作用:用browser查看本地库 --安装httpd yum install httpd --启动httpd vi /etctpdtpd.conf (配置文件) service httpd start service httpd stop service httpd restart --关闭防火墙 service iptables status service iptables stop --浏览器查看 http://ip地址 2

Kerberos error connecting to impala and hbase

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: We are developing a web application that interacts with hadoop components such as HDFS, HBase and Impala. The cluster is kerberized, we are authenticating with JAAS config. We are configuring JAAS in VM arguments as below - Djava . security . auth . login . config = /user/ gss - jaas . conf - Djava . security . krb5 . conf = /user/ krb5 . ini - Djavax . security . auth . useSubjectCredsOnly = false Our JAAS config is as below com . sun . security . jgss . initiate { com . sun . security . auth . module . Krb5LoginModule required

How to copy all hive table from one Database to other Database

牧云@^-^@ 提交于 2019-12-03 04:57:37
问题 I have default db in hive table which contains 80 tables . I have created one more database and I want to copy all the tables from default DB to new Databases. Is there any way I can copy from One DB to Other DB, without creating individual table. Please let me know if any solution.. Thanks in advance 回答1: I can think of couple of options. Use CTAS. CREATE TABLE NEWDB.NEW_TABLE1 AS select * from OLDDB.OLD_TABLE1; CREATE TABLE NEWDB.NEW_TABLE2 AS select * from OLDDB.OLD_TABLE2; ... Use IMPORT

impala测试报告

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 04:23:35
机器环境: 4个slave节点 10.200.187.86 cslave1 4核 3G 10.200.187.87 cslave2 2核 4G 10.200.187.88 cslave3 2核 4G 10.200.187.89 cslave4 2核 6G 测试效果: [img] [/img] 总结: 1.在内存够用并且是简单sql条件下,impala相比hive执行效率高很多,简单的sql在百万级别数据中运行,耗时几秒甚至不用一秒。 2.impala性能如何,与数据的存储格式关系很大,百万级别text格式与hbase格式相差十几倍,千万级别parquet格式与text格式相差百倍。 3.在当前集群配置下,百万级别impala join略比hive性能高(3~4倍),但在千万级别时impala大表的join执行失败(内存不足)。 4.impala采用parquet存储(列式),select部分字段+where条件查询效率很高。 问题: 官方表示impala新版本可以在生产环境中使用,但根据业界人反馈,会有很多问题,重点问题是出现内存溢出情况。官方推荐impala节点的内存是128G。 建议使用场景: 部署于生产环境,可应用于运维,做简单查数据工作,效率高。但有一定的内存占用,不建议使用复杂sql例如大表join等。 imapla实时查询,如上可以看到,相对hive性能是有很大提高的

impala docker build

非 Y 不嫁゛ 提交于 2019-12-03 04:23:09
cloudera / impala-dev Last pushed: 22 days ago Repo Info Tags Dockerfile Build Details Short Description Impala development environment Full Description Dockerfiles for an Impala development environment Images Several images are available but only two are inteded for use: Complete The complete image has Impala built and test data loaded. Because of the size and time required to build this image and limitations of dockerhub, the image is not available for download but can be built locally . The built image will be about 50 GB in size and take 1-4 hours depending on your system. To build the

配置Impala支持ODBC(翻译)

老子叫甜甜 提交于 2019-12-03 04:22:50
配置Impala支持ODBC 可以使用ODBC实现第三方产品与Impala的集成。为了获得最佳体验,确保你计划使用的第三方产品支持ODBC。验证支持包括检查Impala、ODBC、操作系统、以及第三方软件的版本允许一起使用。在配置你的系统使用ODBC之前,先下载一个连接器。 注意: 在访问下载ODBC连接器下载页面之前,你可能需要先登录、接受授权协议。 Cloudera ODBC 连接器 1.x版使用原有的 HiveServer1 协议,与 Impala 21000 端口通讯。 新的 2.5 和 2.0 版本,已经认证了部分而不是全部 BI 应用,使用 HiveServer2 协议,与 Impala 21050 端口通讯。尽管 2.x 版本驱动支持通过 Kerberos tickets 或 用户名/密码进行身份验证,但 Impala 只支持 Kerberos 方式。 Connector 下载页 注意 Cloudera ODBC Driver 2.5 for Impala Cloudera ODBC Driver for Cloudera Impala 通用的ODBC驱动,可用于任意的、这里没有列出的、基于ODBC的应用与 Impala 的集成。可用于Linux 和 Windows 系统 Cloudera ODBC Connector 2.0 for Microstrategy

Impala 如何使用 Hadoop 文件格式

北战南征 提交于 2019-12-03 04:22:24
Impala 如何使用 Hadoop 文件格式 Impala 支持几种熟悉的 Apache Hadoop 中使用的文件格式。Impala 可以加载或查询其他 Hadoop 组件如 Pig 或 MapReduce 产生的数据文件,并且 Impala 产生的数据文件也可以被其他组件使用。下面的章节讨论 Impala 使用各种文件格式的步骤、限制和性能注意事项。 Impala 表使用的文件格式具有重要的性能意义。一些文件格式包括压缩支持,会影响到硬盘上数据的大小,因此,也影响反序列化数据时所需的 I/O 和 CPU 资源的数量。因为查询通常以移动和解压缩数据开始,所需的 I/O 和 CPU 资源是查询性能的限制因素。为了避免处理过程中这一部分潜在的冲突,数据通常进行压缩。通过压缩数据,更小的字节数从硬盘传输给内存。这减少了传输数据的时间,但应权衡考虑 CPU 解压缩内容的时间。 Impala 可以查询 Hadoop 中最通用的文件编码和压缩编码(Impala can query files encoded with most of the popular file formats and compression codecs used in Hadoop)。Impala 可以创建并插入数据到部分而不是全部文件格式;对于 Impala 无法写入的文件格式,在 Hive 中创建这些表,在

管理 Impala(部分翻译)

人走茶凉 提交于 2019-12-03 04:22:10
管理 Impala 作为管理员,你应监视 Impala 的资源使用情况,必要时采取行动以保证 Impala 平衡运行,避免与统一集群里的其他 Haoopd 组件冲突。当检测到已发生或将发生的问题时,你应重新配置 Impala 或其他组件,如HDFS乃至集群中的硬件,来解决或避免问题的发生。 继续阅读: 使用 Impala 资源管理器[仅支持CDH5] 管理 Impala 数据的硬盘空间 设置查询与会话的超时时间 作为管理员,你可以在集群的所有机器上执行 Impala 的安装、升级、配置任务。参见 Installing Cloudera Impala , Upgrading Impala , Configuring Impala 了解详细信息。 对于由管理员执行的额外的安全任务,参见 Impala Security 了解详细信息。 使用 Impala 资源管理器 [仅支持 CDH 5] You can limit the CPU and memory resources used by Impala, to manage and prioritize workloads on clusters that run jobs from many Hadoop components. (Currently, there is no limit or throttling on the I