Hadoop Pipes Exception: Illegal text protocol command

对于Hadoop pipes 出现这样的错误,基本上编译代码依赖的.so和.a 版本不匹配

网上也没有给出更多信息,我的同事最近回复了解决办法,可以参考

https://groups.google.com/a/cloudera.org/forum/#!msg/cdh-user/j0dpYPDx3_A/S1rotrWGSf0J

如果不能翻墙,摘录如下

 
I met with the same issue, and my way to work around it is to apply the attached patch, regenerate the native libraries(libhadooppipes.a, libhadooputils.a, etc.) and recompile user program with the new libraries. Notice that this is only for running against MR1, and don't mess up with those against Yarn. Hope this also works in your case. :-)
 
p.s. I used "mvn -Dskiptests -Pdist,native -Dtar clean package" cmd to generate the tarball and got the native libs under "lib/native" dir
Index: hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc
===================================================================
--- hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc (revision )
+++ hadoop-tools/hadoop-pipes/src/main/native/pipes/impl/HadoopPipes.cc (working copy)
@@ -, +, @@
#include <stdlib.h>
#include <string.h>
#include <strings.h>
-#include <unistd.h>
#include <sys/socket.h>
#include <pthread.h>
#include <iostream>
@@ -, +, @@
}
if (reducer != NULL) {
int64_t spillSize = ;
- if (jobConf->hasKey("mapreduce.task.io.sort.mb")) {
- spillSize = jobConf->getInt("mapreduce.task.io.sort.mb");
+ if (jobConf->hasKey("io.sort.mb")) {
+ spillSize = jobConf->getInt("io.sort.mb");
}
writer = new CombineRunner(spillSize * * , this, reducer,
uplink, partitioner, numReduces);
@@ -, +, @@
*/
void* ping(void* ptr) {
TaskContextImpl* context = (TaskContextImpl*) ptr;
- char* portStr = getenv("mapreduce.pipes.command.port");
+ char* portStr = getenv("hadoop.pipes.command.port");
int MAX_RETRIES = ;
int remaining_retries = MAX_RETRIES;
while (!context->isDone()) {
@@ -, +, @@
try {
TaskContextImpl* context = new TaskContextImpl(factory);
Protocol* connection;
- char* portStr = getenv("mapreduce.pipes.command.port");
+ char* portStr = getenv("hadoop.pipes.command.port");
int sock = -;
FILE* stream = NULL;
FILE* outStream = NULL;
@@ -, +, @@
HADOOP_ASSERT(setbuf == , string("problem with setvbuf for outStream: ")
+ strerror(errno));
connection = new BinaryProtocol(stream, context, outStream);
- } else if (getenv("mapreduce.pipes.commandfile")) {
- char* filename = getenv("mapreduce.pipes.commandfile");
+ } else if (getenv("hadoop.pipes.command.file")) {
+ char* filename = getenv("hadoop.pipes.command.file");
string outFilename = filename;
outFilename += ".out";
stream = fopen(filename, "r");

Hadoop Pipes Exception: Illegal text protocol command的更多相关文章

  1. 在Hadoop 2.3上运行C++程序各种疑难杂症(Hadoop Pipes选择、错误集锦、Hadoop2.3编译等)

    首记 感觉Hadoop是一个坑,打着大数据最佳解决方案的旗帜到处坑害良民.记得以前看过一篇文章,说1TB以下的数据就不要用Hadoop了,体现不 出太大的优势,有时候反而会成为累赘.因此Hadoop的 ...

  2. Hadoop Pipes

    [Hadoop Pipes] 1.MapContext的getInputSplit()可以用于获取当前mapper所对象的文件路经,也就是Pipes中,没有InputSplit接口/对象. 2.在Pi ...

  3. jsp报错问题之“使用jstl的c标签choose报错Illegal text inside "c:choose" tag问题”

    一.报错 [bessky_it][ERROR][2022-03-25 17:19:07] | PLATFORM | ):[c]鍜孾/com.bessky.pss.portal/purchase/sam ...

  4. MySQL之Text Protocol

    1)[01]COM_QUIT 告诉服务器,客户端想要关闭连接 返回:或者关闭一个连接或者一个OK_Packet 有效负载: 1 [01]COM_QUIT 字段: command(1)--0x01 CO ...

  5. windows下eclipse远程连接hadoop错误“Exception in thread"main"java.io.IOException: Call to Master.Hadoop/172.20.145.22:9000 failed ”

    在VMware虚拟机下搭建了hadoop集群,ubuntu-12.04,一台master,三台slave.hadoop-0.20.2版本.在 master机器上利用eclipse-3.3连接hadoo ...

  6. Hadoop错误1(Text类型与String类型)

    在此类的博客中,博主主要记录的是在Hadoop实践过程中遇到的一些错误,先上一个代码 protected void map(Object key,Text value, Context context ...

  7. hadoop pipes wordcount compile

    http://devel.cs.stolaf.edu/projects/bw/wiki.real/index.php/Hadoop_Reference,_January_2011 http://guo ...

  8. hadoop下的Pipes(用C++进行hadoop程序开发)

    说明:这篇博客来自我的CSDN博客:http://blog.csdn.net/lxxgreat/article/details/7755369 经过一上午的努力,终于以伪分布式模式运行了C++版的Ma ...

  9. Hadoop应用开发实战(flume应用开发、搜索引擎算法、Pipes、集群、PageRank算法)

    Hadoop是2013年最热门的技术之一,通过北风网robby老师<深入浅出Hadoop实战开发>.<Hadoop应用开发实战>两套课程的学习,普通Java开发人员可以在最快的 ...

随机推荐

  1. drupal7 Views Slideshow 简单教程

    一.下载安装(略) 二.内容类型建立(过程略,首页幻灯),字段建立(过程略)主要有2个字段,图片字段 和 指向链接字段 三.view 1.建立一个新的view,名称为frontbanner 显示为内容 ...

  2. Xcode报错:“Your build settings specify a provisioning profile with the UUID..... however, no such provisioning profile was found”

    运行环境: Xcode5 & 5.0及以上版本 对工程进行Archive打包的时候出现如下错误   问题描述: Code Sign error: No matching provisionin ...

  3. 没有 RunInstallerAttribute.Yes 的公共安装程序。在 C:/Program/xx.exe 程序集中可能可以找到

    今天在装服务的时候,装了半天总是提示 没有 RunInstallerAttribute.Yes 的公共安装程序.在 C:/Program/xx.exe 程序集中可能可以找到“Yes”属性. 才发现同事 ...

  4. Android网络访问库 - Retrofit学习(1)基础

    Retrofit是什么 Retrofit是一个类型安全的HTTP客户端,支持Android和Java.它是Square公司开源的项目,当前版本2.0. 在实际开发中,我们Retrofit配合OKHTT ...

  5. 10个你必须掌握的超酷VI命令技巧

    摘要:大部分Linux开发者对vi命令相当熟悉,可是遗憾的是,大部分开发者都只能掌握一些最常用的Linux vi命令,下面介绍的10个vi命令虽然很多不为人知,但是在实际应用中又能让你大大提高效率. ...

  6. android手机出现sqlite3 not found的解决方法

    解决方法如下: 1.如果/system目录为不可读写的,需要挂载为读写: C:\Users\easteq>adb shell root@android:/ # mount -o remount, ...

  7. easyui datagrid to excel

    $.extend($.fn.datagrid.methods, { toExcel: function(jq, filename){ return jq.each(function(){ var ur ...

  8. JsonView Tool

  9. Golang控制goroutine的启动与关闭

    最近在用golang做项目的时候,使用到了goroutine.在golang中启动协程非常方便,只需要加一个go关键字: go myfunc(){ //do something }() 但是对于一些长 ...

  10. 快乐的JS正则表达式(二)

    在上一篇中介绍了一个test方法,在本文中将使用另外一个,exec方法可以找到匹配的结果并且返回结果以及位置.exec("正则"): 简单测试: var str = "{ ...