草庐IT

field_one

全部标签

hadoop - Hive Server 2 节俭客户端错误 : Required field 'operationHandle' is unset

我正在尝试在CDH4.3上的hiveserver2上运行以下hivethrift代码并出现以下错误。这是我的代码:我可以成功运行到同一台服务器的配置单元jdbc连接,只是thrift不起作用。publicstaticvoidmain(String[]args)throwsException{TSockettransport=newTSocket("my.org.hiveserver2.com",10000);transport.setTimeout(999999999);TBinaryProtocolprotocol=newTBinaryProtocol(transport);TCLI

hadoop - 错误 1128 : Cannot find field dryTemp

我的pig运行代码temperature而我报错,把代码和报错放在下面,方便理解我的问题发生了。错误在第38行第15列,尝试删除dryTemp,又报错。代码:--Loadfilesintorelationsmonth1=LOAD'hdfs:/data/big/data/weather/weather/201201hourly.txt'USINGPigStorage(',');month2=LOAD'hdfs:/data/big/data/weather/weather/201202hourly.txt'USINGPigStorage(',');month3=LOAD'hdfs:/dat

hadoop - pig 脚本: count returns 0 on null field

我有一个pig脚本,它通过json的“公司”部分加载文件。当我执行计数时,如果文件中缺少域(或为空),则计数为0。我怎样才能将它分组为空字符串并仍然对其进行计数?文件示例:{"company":{"domain":"test1.com","name":"test1company"}}{"company":{"domain":"test1.com","name":"test1company"}}{"company":{"domain":"test1.com","name":"test2company"}}{"company":{"domain":"test2.com","name":"t

hadoop - Apache-PIG 脚本 : ERROR Invalid field projection on joined variable

我创建的Pig脚本有效,除非我尝试在我加入的字段上使用GENERATE。cc_data=LOAD'default.complaint1'USINGorg.apache.hive.hcatalog.pig.HCatLoader();cc2_data=LOAD'default.complaint2'USINGorg.apache.hive.hcatalog.pig.HCatLoader();combined=joincc_databycomplaintid,cc2_databycomplaintid;如果我对我的组合执行DESCRIBE,它会显示如下:合并:{cc_data::datere

hadoop - pig 错误 0 : Scalar has more than one row in the output

我有两个文件,我试图在模式匹配的基础上加入这两个文件。File1:weather.bbc.co.uk,112ads.facebook.com,113ads.amazon.co.uk,114www.sky.com,115news.bbc.co.uk,116pics.facebook.com,117File2:facebook.com,facebookbbc.co.uk,bbcnetflix.com,netflixflipkart.com,flipkartoutput:weather.bbc.co.uk,112,bbc.co.uk,bbcads.facebook.com,113,faceb

scala - Spark 流 : Write Data to HDFS by reading from one HDFSdir to another

我正在尝试使用SparkStreaming将数据从一个HDFS位置读取到另一个位置下面是我在spark-shell上的代码片段但我看不到在HDFS输出目录上创建的文件能否指出如何在HDFS上加载文件scala>sc.stop()scala>importorg.apache.spark.SparkConfscala>importorg.apache.spark.streamingscala>importorg.apache.spark.streaming.{StreamingContext,Seconds}scala>valconf=newSparkConf().setMaster("l

scala - Spark : Would a dataframe repartitioned to one node experience a shuffle when a groupBy is called on it?

假设我有一些数据都在同一个分区上(我之前在数据帧上执行了.coalesce(1))。我现在想对数据进行分组并对其进行聚合。如果我在数据框上使用.groupBy,这些组会被放置到不同的节点上吗?如果这是真的,我想避免这种情况,因为我想对这些组执行这些计算而不需要过多改组。 最佳答案 首先,coalesce(1)并不能保证你的所有数据都在一个节点中,要确保你必须使用repartition(1),这将迫使您将所有数据统一在一个节点中。coalesce仅对同一节点中的分区进行分组,因此如果您的数据分布在5个节点中(每个节点中有多个分区),它

hadoop - PIG 拉丁语 : Output Path based on Field Value

我有一个日志文件,其中包含来自多个域的日志。现在我想对它们进行一些分析并将输出存储在一个名为域的目录中。我在日志中将域作为字段值:STOREoutputlogsINTO'testpath/DOMAIN/logsUSING....这可能吗?或者我只能将输出存储在硬编码文件路径中吗? 最佳答案 如果域的名称是outputlogs中的一个字段,那么您可以使用MultiStorage从存钱jar。像这样的东西:STOREoutputlogsINTO'testpath/DOMAIN/logs'USINGMultiStorage('testpa

hadoop - "the container format for fields in a row"对文件格式意味着什么?

来自Hadoop:权威指南:TherearetwodimensionsthatgoverntablestorageinHive:therowformatandthefileformat.Therowformatdictateshowrows,andthefieldsinaparticularrow,arestored.InHiveparlance,therowformatisdefinedbyaSerDe,aportmanteauwordforaSerializer-Deserializer.Whenactingasadeserializer,whichisthecasewhenque

java - Hadoop : Multiple Emits from one Map function

我正在用java编写一个小的hadoop程序,我的要求是从一个Map方法执行两个Emits,并在一个Reduce方法中处理这两个Emits。这可能吗?如果可能,我如何区分这两个Emits以便我可以在我的Reduce方法中以不同方式处理它们?我对此进行了很多搜索,但无法获得任何具体信息。我不允许使用任何外部库。 最佳答案 map/reduce任务将键/值作为输入。值不必是像WordCount这样的大多数示例中的字符串,它也可以是复杂的结构。你可以有一个结构,其中有两个字段对应于两个发射器,并且该键/值对将自动发送到一个缩减器。