- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试在 hadoop 中进行测试。有代码为: System.setProperty("test.build.data","/folder"); 配置=新配置(); cluster = new MiniDFSCluster(config,1,true,null);
但在 new MiniDFSCluster(config,1,true,null) 中,它抛出异常:
java.io.IOException: Cannot run program "du": CreateProcess error=2, The system cannot find the file specified.
at java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
at org.apache.hadoop.util.Shell.runCommand(Shell.java:149)
at org.apache.hadoop.util.Shell.run(Shell.java:134)
at org.apache.hadoop.fs.DU.<init>(DU.java:53)
at org.apache.hadoop.fs.DU.<init>(DU.java:63)
at org.apache.hadoop.hdfs.server.datanode.FSDataset$FSVolume.<init>(FSDataset.java:333)
at org.apache.hadoop.hdfs.server.datanode.FSDataset.<init>(FSDataset.java:689)
at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:302)
at org.apache.hadoop.hdfs.server.datanode.DataNode.<init>(DataNode.java:216)
at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:1283)
at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1238)
at org.apache.hadoop.hdfs.MiniDFSCluster.startDataNodes(MiniDFSCluster.java:417)
at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:280)
at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:124)
at ebay.Crawler.TestAll.testinit(TestAll.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified.
at java.lang.ProcessImpl.<init>(ProcessImpl.java:92)
at java.lang.ProcessImpl.start(ProcessImpl.java:41)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:463)
... 33 more
有人可以给我一些提示如何解决这个问题吗?非常感谢。
最佳答案
关于exception - MiniDFSCluster 给出 ioexception,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8393930/
我想测试一下我的代码,唤起org.apache.hadoop.hdfs.MiniDFSCluster类示例。但是,在我举一个例子的时候,我收到一条错误消息,通知我进程不会访问某些文件。我遵循了堆栈跟踪
关于 hadoop-minicluster 我需要你的帮助 我正在使用 scala(使用 sbt)并尝试模拟 HDFS 的调用。我播种 hadoop-minicluster 用于部署一个小集群并在其上
我正在测试中启动 MiniDfsCluster(我的依赖项是 2.0.0-cdh4.5.0)。我使用一个简单的例程来启动它: File baseDir = new File("./target/hdf
我正在尝试在 hadoop 中进行测试。有代码为: System.setProperty("test.build.data","/folder"); 配置=新配置(); cluster = new M
我正在编写一些代码来访问 HBase,我正在编写单元测试以创建一个 MiniDFSCluster 作为测试设置的一部分。 (defn test-config [& options] (let
我正在尝试使用 miniDFSCluster 编写单元测试,但它抛出以下错误 java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio
我正在使用 MiniDFSCluster 进行 junit 测试。现在我只是启动和关闭集群,junit 运行绿色。但我得到这个异常(exception): javax.management.Insta
我想实现一个 Maven 项目,它可以帮助我对 Hadoop MapReduce 作业进行单元测试。我最大的问题是定义 Maven 依赖项以便能够使用测试类:MiniDFSCluster 和 Mini
我在 HDFS 配置中使用 defaultFS 设置。我创建配置,然后显式设置它。 import org.apache.hadoop.conf.Configuration import org
做的时候: new MiniDFSCluster.Builder(config).build() 我得到这个异常: java.lang.UnsatisfiedLinkError: org.apache
我正在尝试启动一个小型 Hadoop 集群以进行单元测试。 我的 Maven 配置具有以下依赖项: org.apache.hbase hbase
我是一名优秀的程序员,十分优秀!