parquet

I am trying to write to S3 using assumeRole via FileIO with ParquetIO

一曲冷凌霜 提交于 2021-01-27 20:40:10
问题 Step1 : AssumeRole public static AWSCredentialsProvider getCredentials() { if (roleARN.length() > 0) { STSAssumeRoleSessionCredentialsProvider credentialsProvider = new STSAssumeRoleSessionCredentialsProvider .Builder(roleARN, Constants.SESSION_NAME) .withStsClient(AWSSecurityTokenServiceClientBuilder.defaultClient()) .build(); return credentialsProvider; } return new ProfileCredentialsProvider(); } Step 2 : Set Credentials to pipeline credentials = getCredentials(); pipeline.getOptions().as

Spark read Parquet files of different versions

点点圈 提交于 2021-01-27 20:32:29
问题 I have parquet files generated for over a year with a Version1 schema. And with a recent schema change the newer parquet files have Version2 schema extra columns. So when i load parquet files from the old version and new version together and try to filter on the changed columns i get an exception. I would like for spark to read old and new files and fill in null values where the column is not present.Is there a workaround for this where spark fills null values when the column is not found?

Spark Dataset cache is using only one executor

给你一囗甜甜゛ 提交于 2021-01-27 20:32:28
问题 I have a process which reads hive(parquet-snappy) table and builds a dataset of 2GB. It is iterative(~ 7K) process and This dataset is going to be the same for all iterations so I decided to cache the dataset. Somehow cache task is done on one executor only and seems like the cache is on that one executor only. which leads in delay, OOM etc. Is it because of parquet? How to make sure that cache is distributed on multiple executors? Here is the spark config: Executors : 3 Core: 4 Memory: 4GB

Set parquet snappy output file size is hive?

北城以北 提交于 2021-01-27 08:02:33
问题 I'm trying to split parquet/snappy files created by hive INSERT OVERWRITE TABLE... on dfs.block.size boundary as impala issues a warning when a file in a partition is larger then block size. impala logs the following WARNINGS: Parquet files should not be split into multiple hdfs-blocks. file=hdfs://<SERVER>/<PATH>/<PARTITION>/000000_0 (1 of 7 similar) Code: CREATE TABLE <TABLE_NAME>(<FILEDS>) PARTITIONED BY ( year SMALLINT, month TINYINT ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\037'

Set parquet snappy output file size is hive?

若如初见. 提交于 2021-01-27 08:00:23
问题 I'm trying to split parquet/snappy files created by hive INSERT OVERWRITE TABLE... on dfs.block.size boundary as impala issues a warning when a file in a partition is larger then block size. impala logs the following WARNINGS: Parquet files should not be split into multiple hdfs-blocks. file=hdfs://<SERVER>/<PATH>/<PARTITION>/000000_0 (1 of 7 similar) Code: CREATE TABLE <TABLE_NAME>(<FILEDS>) PARTITIONED BY ( year SMALLINT, month TINYINT ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\037'

Dive into Delta Lake | Delta Lake 尝鲜

ⅰ亾dé卋堺 提交于 2021-01-21 14:04:44
点击上方 蓝色字体 ,选择“ 设为星标 ” 回复”资源“获取更多资源 大数据技术与架构 点击右侧关注,大数据开发领域最强公众号! 大数据 真好玩 点击右侧关注,大数据真好玩! Delta Lake 是一个存储层,为 Apache Spark 和大数据 workloads 提供 ACID 事务能力,其通过写和快照隔离之间的乐观并发控制(optimistic concurrency control),在写入数据期间提供一致性的读取,从而为构建在 HDFS 和云存储上的数据湖(data lakes)带来可靠性。Delta Lake 还提供内置数据版本控制,以便轻松回滚。 为什么需要Delta Lake 现在很多公司内部数据架构中都存在数据湖,数据湖是一种大型数据存储库和处理引擎。它能够存储大量各种类型的数据,拥有强大的信息处理能力和处理几乎无限的并发任务或工作的能力,最早由 Pentaho 首席技术官詹姆斯迪克森在2011年的时候提出。虽然数据湖在数据范围方面迈出了一大步,但是也面临了很多问题,主要概括如下: 数据湖的读写是不可靠的。数据工程师经常遇到不安全写入数据湖的问题,导致读者在写入期间看到垃圾数据。他们必须构建方法以确保读者在写入期间始终看到一致的数据。 数据湖中的数据质量很低。将非结构化数据转储到数据湖中是非常容易的。但这是以数据质量为代价的。没有任何验证模式和数据的机制

What is the difference between “predicate pushdown” and “projection pushdown”?

狂风中的少年 提交于 2021-01-21 05:22:46
问题 I have come across several sources of information, such as the one found here, which explain "predicate pushdown" as : … if you can “push down” parts of the query to where the data is stored, and thus filter out most of the data, then you can greatly reduce network traffic. However, I have also seen the term "projection pushdown" in other documentation such as here, which appears to be the same thing but I am not sure in my understanding. Is there a specific difference between the two terms?

浅淡 Apache Kylin 与 ClickHouse 的对比

不问归期 提交于 2021-01-16 13:27:49
作者简介 周耀,Kyligence 解决方案架构师,Apache Kylin、Apache Superset Contributor。 Apache Kylin 和 ClickHouse 都是目前市场流行的大数据 OLAP 引擎;Kylin 最初由 eBay 中国研发中心开发,2014 年开源并贡献给 Apache 软件基金会,凭借着亚秒级查询的能力和超高的并发查询能力,被许多大厂所采用,包括美团,滴滴,携程,贝壳找房,腾讯,58同城等; OLAP 领域这两年炙手可热的 ClickHouse,由俄罗斯搜索巨头 Yandex 开发,于2016年开源,典型用户包括字节跳动、新浪、腾讯等知名企业。 这两种 OLAP 引擎有什么差异,各自有什么优势,如何选择 ? 本文将尝试从技术原理、存储结构、优化方法和优势场景等方面,对比这两种 OLAP 引擎, 为大家的技术选型提供一些参考。 01 技术原理 技术原理方面,我们主要从 架构 和 生态 两方面做个比较。 1.1 技术架构 Kylin 是基于 Hadoop 的 MOLAP (Multi-dimensional OLAP) 技术,核心技术是 OLAP Cube ;与传统 MOLAP 技术不同,Kylin 运行在 Hadoop 这个功能强大、扩展性强的平台上,从而可以支持海量 (TB到PB) 的数据;它将预计算(通过 MapReduce 或

impala+hdfs+parquet格式文件

心不动则不痛 提交于 2021-01-09 04:35:21
[创建目录] hdfs dfs -mkdir -p /user/hdfs/sample_data/parquet [赋予权限] sudo -u hdfs hadoop fs -chown -R impala:supergroup /user/hdfs/sample_data [删除目录] hdfs dfs -rm -r /user/hdfs/sample_data/parquet [上传文件] hdfs dfs -put -f device /user/hdfs/sample_data/parquet hdfs dfs -put -f metrics /user/hdfs/sample_data/parquet [查看文件] hdfs dfs -ls /user/hdfs/sample_data/parquet [impala建表,不带分区](创建表之后,还需要通过下面的alter语句添加分区) DROP TABLE IF EXISTS device_parquet; CREATE EXTERNAL TABLE device_parquet ( deviceId STRING, deviceName STRING, orgId STRING ) STORED AS PARQUET LOCATION '/user/hdfs/sample_data/parquet/device';

Apache Hudi 介绍与应用

百般思念 提交于 2021-01-08 07:52:32
Apache Hudi Apache Hudi 在基于 HDFS/S3 数据存储之上,提供了两种流原语: 插入更新 增量拉取 一般来说,我们会将大量数据存储到HDFS/S3,新数据增量写入,而旧数据鲜有改动,特别是在经过数据清洗,放入数据仓库的场景。而且在数据仓库如 hive中,对于update的支持非常有限,计算昂贵。另一方面,若是有仅对某段时间内新增数据进行分析的场景,则hive、presto、hbase等也未提供原生方式,而是需要根据时间戳进行过滤分析。 在此需求下,Hudi可以提供这两种需求的实现。第一个是对record级别的更新,另一个是仅对增量数据的查询。且Hudi提供了对Hive、presto、Spark的支持,可以直接使用这些组件对Hudi管理的数据进行查询。 存储类型 我们看一下 Hudi 的两种存储类型: 写时复制(copy on write):仅使用列式文件(parquet)存储数据。在写入/更新数据时,直接同步合并原文件,生成新版本的基文件(需要重写整个列数据文件,即使只有一个字节的新数据被提交)。此存储类型下,写入数据非常昂贵,而读取的成本没有增加,所以适合频繁读的工作负载,因为数据集的最新版本在列式文件中始终可用,以进行高效的查询。 读时合并(merge on read):使用列式(parquet)与行式(avro)文件组合,进行数据存储。在更新记录时