与Hadoop的Graphbuilder(Graphbuilder with Hadoop)
我正在使用hadoop(单节点)运行graphbuilder。 我遵循了教程“ https://01.org/graphbuilder/documentation/how-run-demo-application ”。 但是,当我运行命令时
bin/hadoop jar /usr/local/graphbuilder/target/graphbuilder-0.0.1-SNAPSHOT-hadoop-job.jar com.intel.hadoop.graphbuilder.demoapps.wikipedia.docwordgraph.TFIDFGraphEnd2End 1 /user/hduser/wiki-input /user/hduser/en-wiki-articles-output ingressCode*
我收到了错误
INFO docwordgraph.CreateWordCountGraph: ========== Creating Graph ================ Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.filecache.DistributedCache.addFileToClassPath(Lorg/apache/hadoop/fs/Path;Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/FileSystem;)V at com.intel.hadoop.graphbuilder.util.FsUtil.distributedTempClassToClassPath(FsUtil.java:46) at com.intel.hadoop.graphbuilder.job.AbstractPreprocessJob.run(AbstractPreprocessJob.java:111) at com.intel.hadoop.graphbuilder.demoapps.wikipedia.docwordgraph.CreateWordCountGraph.main(CreateWordCountGraph.java:77) at com.intel.hadoop.graphbuilder.demoapps.wikipedia.docwordgraph.TFIDFGraphEnd2End.main(TFIDFGraphEnd2End.java:69) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.main(RunJar.java:156)"
你能指导我如何解决这个问题吗? 谢谢
I am running graphbuilder with hadoop (single-node). I have followed the tutorial "https://01.org/graphbuilder/documentation/how-run-demo-application". However, when I run the command
bin/hadoop jar /usr/local/graphbuilder/target/graphbuilder-0.0.1-SNAPSHOT-hadoop-job.jar com.intel.hadoop.graphbuilder.demoapps.wikipedia.docwordgraph.TFIDFGraphEnd2End 1 /user/hduser/wiki-input /user/hduser/en-wiki-articles-output ingressCode*
I am getting error
INFO docwordgraph.CreateWordCountGraph: ========== Creating Graph ================ Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.filecache.DistributedCache.addFileToClassPath(Lorg/apache/hadoop/fs/Path;Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/FileSystem;)V at com.intel.hadoop.graphbuilder.util.FsUtil.distributedTempClassToClassPath(FsUtil.java:46) at com.intel.hadoop.graphbuilder.job.AbstractPreprocessJob.run(AbstractPreprocessJob.java:111) at com.intel.hadoop.graphbuilder.demoapps.wikipedia.docwordgraph.CreateWordCountGraph.main(CreateWordCountGraph.java:77) at com.intel.hadoop.graphbuilder.demoapps.wikipedia.docwordgraph.TFIDFGraphEnd2End.main(TFIDFGraphEnd2End.java:69) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.main(RunJar.java:156)"
Can you please guide me how to solve this issue? Thanks
原文:https://stackoverflow.com/questions/21738823
最满意答案
int
最大尺寸如下: -PHP的32位版本:
Integers can be from -2147483648 to 2147483647
PHP的64位版本:
Integers can be from -9223372036854775808 to 9223372036854775807
看起来你正在使用32位版本,这就是为什么你会遇到这个问题。
Max size of
int
are as follows:-32-bit builds of PHP:
Integers can be from -2147483648 to 2147483647
64-bit builds of PHP:
Integers can be from -9223372036854775808 to 9223372036854775807
It seems you are using 32 bit builds and that's why you are getting that problem.
相关问答
更多-
没有; 不,这不对: 从手册 : 键可以是整数或字符串。 如果一个关键字是一个整数的标准表示,它将被解释为(即“8”将被解释为8,而“08”将被解释为“08”)。 附录 由于下面的意见,我认为很有趣的是指出这个行为是类似的,但与 JavaScript对象键不相同 。 foo = { '10' : 'bar' }; foo['10']; // "bar" foo[10]; // "bar" foo[012]; // "bar" foo['012']; // undefined! No; no it's n ...
-
PHP数组键存在(PHP Array key exist)[2022-05-02]
$ tet的第一个数组键是什么? 我们可以看到第一个是数据,但其他数据呢? if(array_key_exists('first_name', $tet['data'])) { //code... } 编辑:as @lma说array_key_exists不能挖掘到孩子,甚至你给我们编辑的结构看起来很奇怪,在数组中间有一些尾随。 What are the first array keys of $tet? We can see the first one is data, but what about ... -
来自函数的php数组键(php array key from function)[2023-05-21]
从您的建议开始创建新功能,您可以尝试以下方法: function getTranslations($translationKey, $arrayKey) { $translation = getTranslation($translationKey); $result = array($arrayKey => $translation['key']); if (/*user settings enabled translations*/) { $result ... -
@Robbie Averill对于array_flip是正确的,它可以实现翻转键和值的“总体目标”。 有多种更有效的方法可以修复当前的代码,最好的方法可能是array_map ,但我也想告诉你为什么你当前的代码失败: 问题是你每次迭代计数$foodsArray (它总是等于3),而不是计数$countryAssocFood : $numberOfFoods = count(array_values($countryAssocFood)); @Robbie Averill is right about arr ...
-
int最大尺寸如下: - PHP的32位版本: Integers can be from -2147483648 to 2147483647 PHP的64位版本: Integers can be from -9223372036854775808 to 9223372036854775807 看起来你正在使用32位版本,这就是为什么你会遇到这个问题。 Max size of intare as follows:- 32-bit builds of PHP: Integers can be from -2 ...
-
为什么在最后一个foreach中使用数组键和值作为$ tabulation的键? 这应该工作...... $tabulation = array(); while ($row = mysql_fetch_array($result)) { $pid = $row[1]; //if this post isn't in the tabulation array, add it w a click value of 1 if ( ! isset( $tabulation[$pid ...
-
整数溢出为负数(Integer overflow to negative number)[2023-10-23]
当表示32位的数字时,最高位用作符号位,因此当用二进制表示像2147483647这样的数字时,它是 01111...111 哪里有31个1。 当我们再添加一个,我们得到 10000...000 哪里有31 0。 因此,我们将符号位跳闸为表示负数的一位。 但是,由于需要避免两次表示0,我们将数字换行,因此不代表-0,而是代表负2147483648(不是2147483647,因为正面需要表示0,但由于负面不表示,我们获得一个“额外”负数)。 每次我们添加一个,它将增加二进制表示,通过负数倒计时 1000.. ... -
不会像这样的工作吗? function test_print($item, $key) { if ($key === 'wantedkey') { print $item; } } array_walk_recursive($myarray, 'test_print'); 或者我错过了你的要求? [我想我是] 因此,我能够处理您正在寻找的东西的最佳方式是: function inner_walk ($item, $key) { if ($key === 'wantedkey2') { ...
-
我想到的是一个简单的解决方案,如下所示(测试并产生想要的结果): $a = array( 0 => 'cat', 2 => 'fruit', 3 => 'apple', 4 => 'orange', 5 => 'banana', 11 => 'cat', 12 => 'dog', 16 => 'Sea', 17 => 'ocean', 18 => 'sea', 21 => 'Land', ); $last = 0; $ ...
-
检查字符串是否为整数(包括负数)PHP(Check to see if string is an integer (includes negative numbers) PHP)[2022-10-06]
只需使用is_numeric(abs($val)) just use is_numeric(abs($val))