草庐IT

method_called

全部标签

hadoop - mapreduce 程序 : Reducer is not getting called

我知道在这里问这个问题是非常愚蠢的。可能是我的眼睛不好或什么的。我无法理解为什么我的reducer没有被调用,即使我已经在驱动程序类中配置了它。请帮助我确定我错过了什么的确切位置。我的司机类(class)publicclassDPDriver{publicstaticvoidmain(String[]args)throwsIOException,InterruptedException,ClassNotFoundException{Configurationconfig=newConfiguration();config.set("mapred.textoutputformat.sep

java - Hadoop 错误 : type mismatch in write method

我刚刚编写了一个简单的hadoop程序,我正在尝试使用AES算法加密文本文件。我在我的map方法中一行一行地读取,加密并写入上下文。很简单。我在我的map方法中进行加密并使用行偏移量作为key,所以我不需要reducer类。这是我的代码:publicclassEnc{publicstaticclassMapextendsMapper{privateTextword=newText();publicvoidmap(LongWritablekey,Textvalue,Contextcontext)throwsIOException,InterruptedException{Stringst

java - 组织.apache.thrift : Invalid method name: 'authenticate'

我正在运行出现此错误的用户手册中的一些基本Accumulo代码。简单的谷歌搜索没有提供任何有用的信息。错误org.apache.accumulo.core.client.AccumuloException:org.apache.thrift.TApplicationException:Invalidmethodname:'authenticate'atorg.apache.accumulo.core.client.impl.ServerClient.execute(ServerClient.java:77)atorg.apache.accumulo.core.client.impl.C

hadoop - 我收到 CDH4.0 错误 "The method addCacheFile(URI) is undefined for the type Job"

我遇到了错误ThemethodaddCacheFile(URI)isundefinedforthetypeJob使用CDH4.0时尝试调用addCacheFile(URIuri)方法,如下图:importjava.net.URI;importorg.apache.hadoop.conf.Configuration;importorg.apache.hadoop.fs.Path;importorg.apache.hadoop.io.LongWritable;importorg.apache.hadoop.io.Text;importorg.apache.hadoop.mapreduce.

斯卡拉 MapReduce : [error] method reduce overrides nothing

我遇到了这个错误,我这样写了我的TableReducer代码:classtreducerextendsTableReducer[Text,IntWritable,ImmutableBytesWritable]{overridedefreduce(key:Text,values:java.lang.Iterable[IntWritable],context:Reducer[Text,IntWritable,ImmutableBytesWritable,Mutation]#Context){vari=0for(v通过这次导入:importorg.apache.hadoop.hbase.HB

Python HDFS 蛇咬伤 : Methods work only with print

我正在使用snakebite客户端https://github.com/spotify/snakebite当我尝试在hdfs中创建目录或移动文件时,我注意到一个奇怪的行为。这是我的代码。它所做的只是将源目录的内容移动到目标目录。最后,显示目标目录的内容defpurge_pending(self,source_dir,dest_dir):if(self.hdfs_serpent.test(path=self.root_dir+"/"+source_dir,exists=True,directory=True)):print"Sourceexists",self.root_dir+sour

r - 库中的错误(功能): there is no package called ‘functional’ - While running MR using rmr2

我正在尝试在单节点Hadoop集群中使用rmr2运行一个简单的MR程序。这里是设置的环境Ubuntu12.04(32位)R(Ubuntu自带2.14.1,所以更新到3.0.2)从here安装了最新的rmr2和rhdfs以及对应的依赖Hadoop1.2.1现在我正在尝试运行一个简单的MR程序作为Sys.setenv(HADOOP_HOME="/home/training/Installations/hadoop-1.2.1")Sys.setenv(HADOOP_CMD="/home/training/Installations/hadoop-1.2.1/bin/hadoop")libra

scala - Spark : Custom key compare method for reduceByKey

我需要在Scala中使用我自己的类作为键/值对中的键。特别是,我有一个包含两个变量id1和id2的简单类,我希望元素仅根据id2和不是id1。我在网上找不到任何关于如何以及在何处可以重写reduceByKey()方法的比较方法的信息,以便它可以根据我的自定义compare()方法。感谢任何帮助。谢谢你。 最佳答案 您不能覆盖reduceByKey的比较,因为它无法利用这样一个事实,即您的数据通常在整个集群中的不同执行程序上按key进行混洗。不过,您可以更改key(请注意,根据您使用的转换/操作,这可能会重新洗牌周围的数据)。RDD中

php - __call 方法在尝试调用 yii Controller 中不存在的函数时未执行?

这是我的YiiController类,当调用index.php?r=reports/testURL时,它必须调用__call方法,因为测试方法不存在但它给出错误Thesystemisunabletofindtherequestedactiontest错误。 最佳答案 在你的Controller中实现missingAction方法,如@xdazz所述,它检查方法是否存在,如果不存在,则调用missingAction方法。//Thismethodisinvokedwhenthecontrollercannotfindtherequest

php - 代码点火器 fatal error : Call to a member function query() on a non-object

现在我正在学习Codeigniter。我的数据库比较多,所以这次选择了Anketaone。为什么会出错:**Fatalerror:Calltoamemberfunctionquery()onanon-objectin/var/www/domains/svastara/application/controllers/anketa.phponline12**???我chack了,用户和passindatabase没问题,conf中加载了数据库,chack了表名。那还有什么?$this->db=$this->load->database('anketa');$q=$this->db->que