首页 \ 问答 \ Hadoop猪拉丁语无法通过python脚本流(Hadoop pig latin unable to stream through a python script)

Hadoop猪拉丁语无法通过python脚本流(Hadoop pig latin unable to stream through a python script)

我有一个简单的python脚本(moo.py),我试图流

import sys, os
for line in sys.stdin:
    print 1;

我试着运行这个猪脚本

DEFINE CMD `python moo.py` ship('moo.py');
data = LOAD 's3://path/to/my/data/*' AS (a:chararray, b:chararray, c:int, d:int);
res = STREAM data through CMD;
dump res;

当我运行这个猪脚本本地(猪-x本地)一切都很好,但当我运行它没有-x本地,它打印出这个错误

[main] ERROR org.apache.pig.tools.grunt.Grunt - 错误2017:创建作业配置的内部错误。

[日志文件]

引起:java.io.FileNotFoundException:文件moo.py不存在。

任何想法?


I have a simple python script (moo.py) that i am trying to stream though

import sys, os
for line in sys.stdin:
    print 1;

and i try to run this pig script

DEFINE CMD `python moo.py` ship('moo.py');
data = LOAD 's3://path/to/my/data/*' AS (a:chararray, b:chararray, c:int, d:int);
res = STREAM data through CMD;
dump res;

when i run this pig script local (pig -x local) everything is fine, but when i run it without -x local, it prints out this error

[main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2017: Internal error creating job configuration.

[Log file]

Caused by: java.io.FileNotFoundException: File moo.py does not exist.

any idea?


原文:https://stackoverflow.com/questions/5650417
更新时间:2022-12-16 10:12

最满意答案

您不能在页眉或详细信息部分中包含图表; 图表仅在报表页眉或页脚中起作用。

如果页眉中需要图表,请在页眉中创建子报表,并将图表放在子报表中。


You can't have a chart in the page header, or detail sections; a chart will only function in the report header or footer.

If you require a chart in the page header, create a subreport in the page header, and place the chart within the subreport.

相关问答

更多
  • 是的,根据我的理解,您应该将所有未绑定的控件置于页眉或页脚之类的未绑定部分,因为中间的可绑定部分仅在数据集中有项目时呈现,甚至根据结果集和报表布局进行多次呈现。 Yes to my understanding you should put all those unbound controls in unbound sections like header or footer because the bindable sections in the middle are rendered only when ...
  • 我得到了答案有一个选项称为保持对象在一起,如果我只是取消选中此选项它已解决 I Got the Answer There's an option Known as Keep Object Together if I just Unchecked this option it is solved
  • 在Crystal Reports中,有关于Template的概念; 我没有发现它非常有用,只是用它来保存一些图表并在其他报告中使用相同的参数。 对于页眉和页脚,我使用子报表 ; 如果要更改模板,可以非常轻松地导入它们并重新导入 编辑: 这是一个例子 创建一个名为header.rpt的报告 在名为Title放置一个参数 插入text area并在其中显示Title 创建一个名为main.rpt的报告 将header.rpt插入header.rpt中的子报表,将其放在Page Header部分 使用subrep ...
  • 不,除了在页脚或细节部分之外,您无法在任何地方可靠地使用“运行总计”。 通常,RT是在打印过程中计算的,也就是说,在报告的渲染过程中很晚。 使用打印时变量/公式也是如此。 它们可能会在报告中显示一个值,但数据基本上没有意义。 但是您可以在标题中使用基本汇总函数,如Sum()或Count() 。 No, you cannot reliably use a Running Total anywhere except in a footer or detail section. As a rule, RTs ar ...
  • 将此公式放在详细信息部分的抑制字段中: WhilePrintingRecords; Global BooleanVar finished; finished := OnLastRecord 并在页面标题中设置这个抑制公式: Global BooleanVar finished 初始化finished之前,将显示页面标题。 一旦你打印了一个细节记录,它将被设置为false 。 当你最终到达最后一个细节部分时, finished设置为true 。 如果您碰巧遇到另一个页面标题,则finished仍然为tru ...
  • 您可以使用子报表执行此操作。 但是在子报表页面页眉/页脚不可用。 它们将在主报告中设定。 如果子报表不适合您,您可以创建一个小应用程序,它将逐个运行报表并打印它们,或将它们导出为PDF,并将结果合并为一个大PDF。 市场上有第三方工具,可以在这种情况下使用。 如果这是一个选项,请告诉我,我会发布链接。 带有子报告的主报告将是最简单的解决方案,不需要额外的软件。 It took me a while but I got it figured out, it was my first time attempti ...
  • 在这里,您需要配置web.config文件,以使Crystal报表处理您的图表和图像。 在web.config文件中添加以下设置 -----在部分添加
    由于报告只有一个“报告标题”,因此您必须以“主标题”为顶级组,“页眉”为子组的方式组织您的组,最后详细信息如下。 完成后,您可以单击“ 专家”部分中的“ 分页”选项卡 ,然后单击“ 之前的新页面”选项,以使页面像您期望的那样中断。 编辑:在菜单报告,组导出下,在分组依据中,有一个选项按钮,然后是选项选项卡。 这就是每页选项上的重复组标题的位置。 然后,返回主标题组的Section Expert,在Suppress函数中,放入InRepeatedGroupHeader。 这样,主标题(GroupHeader# ...
  • 您不能在页眉或详细信息部分中包含图表; 图表仅在报表页眉或页脚中起作用。 如果页眉中需要图表,请在页眉中创建子报表,并将图表放在子报表中。 You can't have a chart in the page header, or detail sections; a chart will only function in the report header or footer. If you require a chart in the page header, create a subreport in ...
  • 如果您还没有这样做,请插入一个组 为该组插入第二部分; 将其设置为underlay following section 将图表添加到第一个group-header部分( gha ); 将它放在页面的右侧 将列标题字段添加/移动到第二个组标题部分( ghb ); 位于页面左侧 将表格的行保留在details部分中 您可能需要调整gha的高度以满足您的需求 If you haven't already done so, insert a group insert a second section for the ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)