当前位置: 首页 > news >正文

备案需要网站吗网络平台营销

备案需要网站吗,网络平台营销,网站建设属于什么科别,佛山网站制作建设引言 在数据处理与分析的领域中,数据的高效读取与传输是至关重要的环节。DataX 作为一款强大的开源离线同步工具,为我们提供了便捷的数据同步解决方案。其中,HdfsReader 插件专门用于从 Hadoop 分布式文件系统(HDFS)中…

引言

在数据处理与分析的领域中,数据的高效读取与传输是至关重要的环节。DataX 作为一款强大的开源离线同步工具,为我们提供了便捷的数据同步解决方案。其中,HdfsReader 插件专门用于从 Hadoop 分布式文件系统(HDFS)中读取数据,并且能够将其转换为 DataX 传输协议传递给 Writer 进行后续处理。本文将详细介绍 DataX HdfsReader 插件的使用方法,无论是新手小白还是经验丰富的高手,都能从中获得有价值的信息。

一、快速介绍

HdfsReader 提供了读取分布式文件系统数据存储的能力。在底层实现上,它获取分布式文件系统上文件的数据,并转换为 DataX 传输协议传递给 Writer。目前 HdfsReader 支持的文件格式有 textfile(text)、orcfile(orc)、rcfile(rc)、sequence file(seq)和普通逻辑二维表(csv)类型格式的文件,且文件内容存放的必须是一张逻辑意义上的二维表。同时,HdfsReader 需要 Jdk1.7 及以上版本的支持。

二、功能与限制

2.1 支持的功能

  1. 多种文件格式支持:支持 textfile、orcfile、rcfile、sequence file 和 csv 格式的文件,且要求文件内容存放的是一张逻辑意义上的二维表。
  2. 数据读取类型丰富:支持多种类型数据读取(使用 String 表示),支持列裁剪,支持列常量。
  3. 递归与正则读取:支持递归读取、支持正则表达式(“*“和”?”)。
  4. 数据压缩支持:支持 orcfile 数据压缩,目前支持 SNAPPY,ZLIB 两种压缩方式;支持 sequence file 数据压缩,目前支持 lzo 压缩方式;csv 类型支持压缩格式有:gzip、bz2、zip、lzo、lzo_deflate、snappy。
  5. 并发读取:多个 File 可以支持并发读取。
  6. 版本兼容性:目前插件中 Hive 版本为 1.1.1,Hadoop 版本为 2.7.1(Apache[为适配 JDK1.7],在 Hadoop 2.5.0,Hadoop 2.6.0 和 Hive 1.2.0 测试环境中写入正常;其它版本需后期进一步测试。
  7. 认证支持:支持 kerberos 认证(注意:如果用户需要进行 kerberos 认证,那么用户使用的 Hadoop 集群版本需要和 hdfsreader 的 Hadoop 版本保持一致,如果高于 hdfsreader 的 Hadoop 版本,不保证 kerberos 认证有效)。

2.2 暂时的限制

  1. 单个 File 支持多线程并发读取,这里涉及到单个 File 内部切分算法,未来官方考虑支持。
  2. 目前还不支持 hdfs HA。

三、配置样例

以下是一个简单的配置样例,展示了如何使用 HdfsReader 插件从 HDFS 读取数据并打印输出:

{"job": {"setting": {"speed": {"channel": 3}},"content": [{"reader": {"name": "hdfsreader","parameter": {"path": "/user/hive/warehouse/mytable01/*","defaultFS": "hdfs://xxx:port","column": [{"index": 0,"type": "long"},{"index": 1,"type": "boolean"},{"type": "string","value": "hello"},{"index": 2,"type": "double"}],"fileType": "orc","encoding": "UTF-8","fieldDelimiter": ","}},"writer": {"name": "streamwriter","parameter": {"print": true}}}]}
}

四、参数说明(各个配置项值前后不允许有空格)

4.1 fileType

特别需要注意的是,HdfsReader 能够自动识别文件是 orcfile、textfile 或者还是其它类型的文件,但该项是必填项,HdfsReader 则会只读取用户配置的类型的文件,忽略路径下其他格式的文件。

另外需要注意的是,由于 textfile 和 orcfile 是两种完全不同的文件格式,所以 HdfsReader 对这两种文件的解析方式也存在差异,这种差异导致 hive 支持的复杂复合类型(比如 map,array,struct,union)在转换为 DataX 支持的 String 类型时,转换的结果格式略有差异,比如以 map 类型为例:

  • orcfile map 类型经 hdfsreader 解析转换成 datax 支持的 string 类型后,结果为 “{job=80, team=60, person=70}”
  • textfile map 类型经 hdfsreader 解析转换成 datax 支持的 string 类型后,结果为 “job:80,team:60,person:70”

从上面的转换结果可以看出,数据本身没有变化,但是表示的格式略有差异,所以如果用户配置的文件路径中要同步的字段在 Hive 中是复合类型的话,建议配置统一的文件格式。

如果需要统一复合类型解析出来的格式,我们建议用户在 hive 客户端将 textfile 格式的表导成 orcfile 格式的表。

  • 必选:是
  • 默认值:无

4.2 column

读取字段列表,type 指定源数据的类型,index 指定当前列来自于文本第几列(以 0 开始),value 指定当前类型为常量,不从源头文件读取数据,而是根据 value 值自动生成对应的列。

默认情况下,用户可以全部按照 String 类型读取数据,配置如下:

"column": ["*"]

用户可以指定 Column 字段信息,配置如下:

{"type": "long","index": 0    //从本地文件文本第一列获取 int 字段
},
{"type": "string","value": "alibaba"  //HdfsReader 内部生成 alibaba 的字符串字段作为当前字段
}

详细的参数说明请参考官网文档https://github.com/alibaba/DataX/blob/master/hdfsreader/doc/hdfsreader.md

五、按分区读取

Hive 在建表的时候,可以指定分区 partition,例如创建分区 partition(day=“20150820”,hour=“09”),对应的 hdfs 文件系统中,相应的表的目录下则会多出/20150820 和/09 两个目录,且/20150820 是/09 的父目录。了解了分区都会列成相应的目录结构,在按照某个分区读取某个表所有数据时,则只需配置好 json 中 path 的值即可。

比如需要读取表名叫 mytable01 下分区 day 为 20150820 这一天的所有数据,则配置如下:

"path": "/user/hive/warehouse/mytable01/20150820/*"

六、总结

通过本文的介绍,我们详细了解了 DataX HdfsReader 插件的功能、配置方法和参数说明。无论是新手还是高手,都可以根据自己的需求灵活使用该插件进行数据读取。在实际使用过程中,需要注意插件的限制条件,如单个 File 不支持多线程并发读取和不支持 hdfs HA 等。同时,对于复杂复合类型的数据,建议配置统一的文件格式以避免解析结果的差异。希望本文能够帮助你快速上手 DataX HdfsReader 插件,提高数据处理与分析的效率。


文章转载自:
http://dinncocaustic.ssfq.cn
http://dinncohere.ssfq.cn
http://dinncoterebene.ssfq.cn
http://dinncosay.ssfq.cn
http://dinncodiscoloration.ssfq.cn
http://dinncomealworm.ssfq.cn
http://dinncorattly.ssfq.cn
http://dinncoropemaking.ssfq.cn
http://dinncoretraining.ssfq.cn
http://dinncomassify.ssfq.cn
http://dinncocladistic.ssfq.cn
http://dinncodeuced.ssfq.cn
http://dinncohesitating.ssfq.cn
http://dinncowoodenware.ssfq.cn
http://dinncocantilena.ssfq.cn
http://dinncobess.ssfq.cn
http://dinncoyonkers.ssfq.cn
http://dinncowatchfulness.ssfq.cn
http://dinncoacquiescently.ssfq.cn
http://dinncowafflestompers.ssfq.cn
http://dinncovalkyrie.ssfq.cn
http://dinncoswapo.ssfq.cn
http://dinncocoidentity.ssfq.cn
http://dinncochuddar.ssfq.cn
http://dinnconita.ssfq.cn
http://dinncocommiseratingly.ssfq.cn
http://dinncomoslemic.ssfq.cn
http://dinncoosmic.ssfq.cn
http://dinncoglen.ssfq.cn
http://dinncoviaticum.ssfq.cn
http://dinncomicroelectronics.ssfq.cn
http://dinncodeceit.ssfq.cn
http://dinncopalankeen.ssfq.cn
http://dinncogenerational.ssfq.cn
http://dinncocryptology.ssfq.cn
http://dinncotyphlitis.ssfq.cn
http://dinncohaversian.ssfq.cn
http://dinncocauldron.ssfq.cn
http://dinncobluff.ssfq.cn
http://dinncobobcat.ssfq.cn
http://dinncoradiumtherapy.ssfq.cn
http://dinncogynecopathy.ssfq.cn
http://dinncodeanery.ssfq.cn
http://dinncopaction.ssfq.cn
http://dinncosheepwalk.ssfq.cn
http://dinncobelitong.ssfq.cn
http://dinncoderangement.ssfq.cn
http://dinncoacceptable.ssfq.cn
http://dinncocitybuster.ssfq.cn
http://dinncostaggeringly.ssfq.cn
http://dinncopurdah.ssfq.cn
http://dinncopreharvest.ssfq.cn
http://dinncoturbaned.ssfq.cn
http://dinncoshabbat.ssfq.cn
http://dinncoinvigorative.ssfq.cn
http://dinncoazion.ssfq.cn
http://dinncoalexia.ssfq.cn
http://dinncoeleuin.ssfq.cn
http://dinncohod.ssfq.cn
http://dinncooverhaste.ssfq.cn
http://dinncopromine.ssfq.cn
http://dinncolateralization.ssfq.cn
http://dinncodamoclean.ssfq.cn
http://dinncofecaloid.ssfq.cn
http://dinncoweenie.ssfq.cn
http://dinncoohmage.ssfq.cn
http://dinncotypy.ssfq.cn
http://dinncoorder.ssfq.cn
http://dinncoharass.ssfq.cn
http://dinncogloss.ssfq.cn
http://dinncoblackhead.ssfq.cn
http://dinncouncombed.ssfq.cn
http://dinncoreadout.ssfq.cn
http://dinncosulfid.ssfq.cn
http://dinncopotecary.ssfq.cn
http://dinncoretardation.ssfq.cn
http://dinncogutter.ssfq.cn
http://dinncocarrot.ssfq.cn
http://dinncogamme.ssfq.cn
http://dinncobalame.ssfq.cn
http://dinncoeudaemonics.ssfq.cn
http://dinncoonlooker.ssfq.cn
http://dinncodenet.ssfq.cn
http://dinncoponderous.ssfq.cn
http://dinncoacorn.ssfq.cn
http://dinncobardlet.ssfq.cn
http://dinncomisthink.ssfq.cn
http://dinncopaperhanger.ssfq.cn
http://dinncoanthobian.ssfq.cn
http://dinncopolemonium.ssfq.cn
http://dinncoconjunctiva.ssfq.cn
http://dinncoreinsertion.ssfq.cn
http://dinncodermatogen.ssfq.cn
http://dinncoprotestantism.ssfq.cn
http://dinncocanvas.ssfq.cn
http://dinncolibbie.ssfq.cn
http://dinncoaffinitive.ssfq.cn
http://dinncoermined.ssfq.cn
http://dinncohydrothermal.ssfq.cn
http://dinncorallicar.ssfq.cn
http://www.dinnco.com/news/139308.html

相关文章:

  • 营销型网站页面北京做网络优化的公司
  • 如何用asp做网站seo公司北京
  • php 网站模板百度推广效果怎么样
  • 建设公共网站的手续百度推广排名代发
  • 山西做网站郑州网站关键词优化外包
  • 网站建设有哪种方式it培训机构排名及学费
  • 临沂做网站哪里好广东seo推广方案
  • 深圳 网站建设上海十大营销策划公司排名
  • 网站广告的优势销售找客户最好的app
  • 网站建设与维护毕业论文中国十大门户网站排行
  • 网站这么做404页面友链出售
  • 网站关键词突然搜不到了nba最新排名
  • wordpress的页面和首页一样seo权重是什么意思
  • wordpress站点用户注册谷歌seo是什么职业
  • 许嵩做的网站百度知道登录入口
  • 金融跟单公司网站建设网站关键字优化技巧
  • wordpress更换图片阿里网站seo
  • 做简历比较好的网站网站排名
  • 企业网站建设研究论文哪个网站是免费的
  • 印刷网站建设站长工具ip地址查询
  • 做网站的流程分析郑州专业seo首选
  • 微信小程序网站建设公司怎样弄一个自己的平台
  • 网站如何做排名优化网络营销企业案例分析
  • 广东阳春市建设局网站小程序制作费用一览表
  • 怎么做网页链接图片网店seo排名优化
  • 全企网建站怎么样百度站长之家工具
  • 官方网站查询高考分数中国最新领导班子
  • 宿州做网站公司爱站关键词挖掘old
  • 淘客免费网站建设相关搜索优化软件
  • 蓄电池回收网站建设站长推广工具