我是一个新手,一直试图让它在我的Windows7机器上运行。我的hadoop(2.4.0)在本地机器上运行得很好,但是每当我尝试运行一个简单的pig脚本时,每当我尝试转储文件内容时,它就会抛出错误。
在这里找到了一个类似问题的解决方案,我尝试使用ant重建我的pig(0.12.1)。每当我跑的时候
ant clean jar-withouthadoop -Dhadoopversion=23
我得到以下错误:
Buildfile: C:\pig-0.12.1-src\build.xml
......
[org.apache.ftpserver#ftpserver-core;1.0.0] in [hadoop20]
[ivy:resolve] org.apache.mina#mina-core;2.0.0-M2 by [org.apache.mina#mina-core;2.0.0-M5] in [hadoop20]
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| master | 0 | 0 | 0 | 0 || 0 | 0 |
| default | 101 | 32 | 0 | 3 || 101 | 0 |
| runtime | 101 | 32 | 0 | 3 || 101 | 0 |
| compile | 89 | 29 | 0 | 2 || 90 | 0 |
| test | 101 | 32 | 0 | 3 || 101 | 0 |
| javadoc | 101 | 32 | 0 | 3 || 101 | 0 |
| releaseaudit | 3 | 2 | 0 | 0 || 3 | 0 |
| jdiff | 3 | 0 | 0 | 0 || 3 | 0 |
| checkstyle | 10 | 3 | 0 | 0 || 10 | 0 |
| buildJar | 101 | 32 | 0 | 3 || 101 | 0 |
| hadoop20 | 48 | 30 | 0 | 9 || 39 | 0 |
| hadoop23 | 40 | 13 | 0 | 0 || 42 | 0 |
| hbase94 | 1 | 0 | 0 | 0 || 2 | 0 |
| hbase95 | 7 | 0 | 0 | 0 || 13 | 0 |
---------------------------------------------------------------------
ivy-compile:
[ivy:retrieve] :: retrieving :: org.apache.pig#pig
[ivy:retrieve] confs: [compile]
[ivy:retrieve] 90 artifacts copied, 0 already retrieved (80170kB/407ms)
[ivy:cachepath] DEPRECATED: 'ivy.conf.file' is deprecated, use 'ivy.settings.file' instead
[ivy:cachepath] :: loading settings :: file = C:\pig-0.12.1-src\ivy\ivysettings.xml
init:
[mkdir] Created dir: C:\pig-0.12.1-src\src-gen\org\apache\pig\impl\logicalLayer\parser
[mkdir] Created dir: C:\pig-0.12.1-src\src-gen\org\apache\pig\tools\pigscript\parser
[mkdir] Created dir: C:\pig-0.12.1-src\src-gen\org\apache\pig\tools\parameters
[mkdir] Created dir: C:\pig-0.12.1-src\build\classes
[mkdir] Created dir: C:\pig-0.12.1-src\build\test\classes
[mkdir] Created dir: C:\pig-0.12.1-src\test\org\apache\pig\test\utils\dotGraph\parser
[mkdir] Created dir: C:\pig-0.12.1-src\src-gen\org\apache\pig\data\parser
[move] Moving 1 file to C:\pig-0.12.1-src\build\ivy\lib\Pig
cc-compile:
[javacc] Java Compiler Compiler Version 4.2 (Parser Generator)
[javacc] (type "javacc" with no arguments for help)
[javacc] Reading from file C:\pig-0.12.1-
....
[javacc] Parser generated successfully.
prepare:
[mkdir] Created dir: C:\pig-0.12.1-src\src-gen\org\apache\pig\parser
genLexer:
[java] error(1): cannot write file : java.io.FileNotFoundException: C:\pig-0.12.1-src\src-gen\org\apache\pig\parser\C:\QueryLexer.java (The filename, directory name, or volume label syntax is incorrect)
[java] java.io.FileOutputStream.open(Native Method)
[java] java.io.FileOutputStream.<init>(FileOutputStream.java:221)
[java] java.io.FileOutputStream.<init>(FileOutputStream.java:171)
[java] java.io.FileWriter.<init>(FileWriter.java:90)
[java] org.antlr.Tool.getOutputFile(Tool.java:871)
[java] org.antlr.codegen.CodeGenerator.write(CodeGenerator.java:1262)
[java] org.antlr.codegen.Target.genRecognizerFile(Target.java:94)
[java] org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:460)
[java] org.antlr.Tool.generateRecognizer(Tool.java:655)
[java] org.antlr.Tool.process(Tool.java:468)
[java] org.antlr.Tool.main(Tool.java:93)
BUILD FAILED
C:\pig-0.12.1-src\build.xml:495 Java returned: 1
我做错什么了?是缺少文件,还是build.xml中存在此配置问题?
编辑:我已经从cmd和cygwin终端运行了这个命令。它们都输出相同的错误。
edit2:我在用ant构建(1.9.4)
最后的编辑:我需要将pig-src归档文件(pig-0.12.1-src.tar.gz)移到cygwin主目录,解压它,然后将cd放入解压的归档文件并运行命令。
1条答案
按热度按时间ruarlubt1#
我也有同样的问题。我通过在cygwin家中通过cygwin编译pig解决了这个问题。
我的常春藤设置如下: