猪的分层抽样

时间:2014-02-22 10:30:03

标签: apache-pig

我正尝试使用以下代码在猪身上实施分层抽样:

REGISTER datafu-1.2.0.jar
DEFINE SRS datafu.pig.sampling.SimpleRandomSample('0.01');
pop = LOAD 'pop';
grouped = GROUP pop BY metroid;
strsampled = FOREACH grouped GENERATE FLATTEN(SRS(pop));
strsampled2 = FOREACH (GROUP strsampled all) GENERATE FLATTEN(strsampled);
STORE strsampled2 INTO 'strsample';

但是我收到以下错误:

ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2997: Encountered IOException. Call From pdnhwhdplinc04.xxxxx.local/0.0.0.0 to pnnhwhdplinc01.xxxxx.local:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

任何人都可以提供任何见解吗?

谢谢!

0 个答案:

没有答案