[pig] encountered errors at the first time

1. Error Handling : -stop_on_failure

Ooops! Some job has failed! Specify -stop_on_failure if you want Pig to stop immediately on failure.


[This option is recommended by performance and Efficiency in http://pig.apache.org/docs/r0.9.1/perf.html ]

With multi-query execution Pig processes an entire script or a batch of statements at once. By default Pig tries to run all the jobs that result from that, regardless of whether some jobs fail during execution. To check which jobs have succeeded or failed use one of these options.

First, Pig logs all successful and failed store commands. Store commands are identified by output path. At the end of execution a summary line indicates success, partial failure or failure of all store commands.

Second, Pig returns different code upon completion for these scenarios:

  • Return code 0: All jobs succeeded

  • Return code 1: Used for retrievable errors

  • Return code 2: All jobs have failed

  • Return code 3: Some jobs have failed

In some cases it might be desirable to fail the entire script upon detecting the first failed job. This can be achieved with the "-F" or "-stop_on_failure" command line flag. If used, Pig will stop execution when the first failed job is detected and discontinue further processing. This also means that file commands that come after a failed store in the script will not be executed (this can be used to create "done" files).

This is how the flag is used:

$ pig -F myscript.pig
or
$ pig -stop_on_failure myscript.pig

2. UnknownHostException

Failed Jobs:
JobId   Alias   Feature Message Outputs
N/A     A,B     MAP_ONLY        Message: java.net.UnknownHostException: sonora.peking.corp.com: sonora.peking.corp.com

Caused by: java.net.UnknownHostException: sonora.peking.corp.com

Solution:

add the hostname: sonora.peking.corp.com to your host's configuration file: /etc/hosts

127.0.0.1 localhost  sonora.peking.corp.com


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 这个问题可能是由于你的Android项目中存在一些编译错误导致的。你可以尝试以下几个步骤来解决这个问题: 1. 检查你的代码,看看是否存在语法错误或者其他编译错误。 2. 清除你的项目并重新构建它。你可以在Eclipse中选择Project -> Clean来清除你的项目。 3. 确保你的Android SDK和Eclipse插件都是最新版本。你可以在Eclipse中选择Help -> Check for Updates来检查更新。 如果以上步骤都没有解决你的问题,你可以尝试重新安装Eclipse和Android SDK,并重新导入你的项目。 ### 回答2: 当eclipse运行android application时出现"launching jj has encountered problem errors occurred during the build"错误提示时,这通常是由于项目中存在一些编译错误或配置问题所导致的。 首先,我们可以检查项目代码中是否存在语法错误或逻辑错误,这可能会导致编译器无法正确地构建应用程序。在eclipse中,我们可以通过查看控制台窗口或“问题”视图来查看详细的编译错误信息,并尝试修复这些错误。 其次,检查项目的构建配置是否正确。在eclipse中,可以通过右键单击项目并选择“属性”来访问项目的属性设置。确保项目的构建路径、SDK版本和依赖库等设置都正确。 另外,可能还需要确保安装了正确版本的ADT插件和相应的Android SDK。在eclipse中,可以通过“帮助”菜单中的“安装新软件”选项来查看和安装所需的插件和SDK。 如果上述方法仍然无法解决问题,可以尝试清理项目并重新构建应用程序。在eclipse中,可以选择“项目”菜单中的“清理”选项,然后重新构建项目。 总之,当eclipse运行android application时弹出"launching jj has encountered problem errors occurred during the build"错误提示时,我们需要仔细检查项目中的编译错误和配置问题,并尝试修复它们。如果问题仍然存在,可以尝试清理项目并重新构建应用程序。 ### 回答3: 当Eclipse运行Android应用程序时出现"launching jj has encountered problem errors occurred during the build"错误,可能有以下几个原因: 1. 缺少依赖库:请确保项目中所需的所有依赖库都已正确添加和配置。检查项目的构建路径和依赖项,并确保所有相关的库文件都存在且正确链接。 2. 项目中存在错误:在问题发生之前,请先确保项目中没有任何错误或警告。在Eclipse的问题视图中查看并解决所有问题。 3. Android SDK版本不匹配:请确保项目的目标SDK版本与您的Android SDK版本相匹配。在Eclipse中打开项目的AndroidManifest.xml文件,检查<uses-sdk>元素中的android:minSdkVersion和android:targetSdkVersion属性是否正确设置。 4. 缺少运行时环境:请检查您的电脑上是否安装了适当版本的Java Development Kit(JDK)。在Eclipse中,打开Window -> Preferences -> Java -> Installed JREs,确保JRE的路径设置正确。 5. 项目构建配置错误:在Eclipse的"项目"菜单中,选择"构建自动"来确保项目在每次更改后都会自动构建。如果仍然遇到问题,尝试清理项目并重新构建。 如果以上解决方法仍然没有解决问题,建议尝试以下进一步的操作: 1. 重启Eclipse:有时,重启Eclipse可以解决临时的构建问题。 2. 清理Eclipse缓存:在Eclipse中选择"项目"菜单,然后选择"清理",并选中"清理项目"。 3. 更新Eclipse和Android SDK插件:确保您正在使用最新版本的Eclipse和Android SDK插件。可以通过Eclipse的"帮助"菜单中的"检查更新"选项进行更新。 如果问题仍未解决,建议搜索与具体错误消息相对应的详细错误信息,以获取更多解决方案或寻求其他开发者的帮助。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值