In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces how to solve the error reporting problem of running mrunit. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
When you read the authoritative guide of hadoop, when you run the example of mrunit (MaxTemperatureMapperTest), an exception is reported. After looking up the information on the Internet, there is a problem with the version of mrunit. You can find the corresponding version of mrunit by combining the version of hadoop.
In addition, I am looking for mrunit in the process, because the mrunit provided by http://mvnrepository.com/ can not be downloaded, I randomly found one and uploaded it to my nexus server to use, but in the process of running, there are still some problems, mainly mrunit also depends on the other two jar (mockito-all and powermock-api-mockito), add these two dependencies in pom.xml at the same time, pay attention to the version of the two jar.
Java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.TaskInputOutputContext But class was expected at org.apache.hadoop.mrunit.mapreduce.mock.MockContextWrapper.createCommon (MockContextWrapper.java:51) at org.apache.hadoop.mrunit.mapreduce.mock.MockMapContextWrapper.create (MockMapContextWrapper.java:65) at org.apache.hadoop.mrunit.mapreduce.mock.MockMapContextWrapper. (MockMapContextWrapper.java:57) at org.apache.hadoop.mrunit.mapreduce.MapDriver.run (MapDriver.java:195) at org.apache.hadoop.mrunit.MapDriverBase.runTest (MapDriverBase.java:185) at v1.MaxTemperatureMapperTest.processesValidRecord (MaxTemperatureMapperTest) . Java: 22) at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethod) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:601) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall (FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run (ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively (FrameworkMethod.java 47) at org.junit.internal.runners.statements.InvokeMethod.evaluate (InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf (ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild (BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild (BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run (ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule (ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren ( ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000 (ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate (ParentRunner.java:268) at org.junit.runners.ParentRunner.run (ParentRunner.java:363) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run (JUnit4TestReference.java:50) 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) org.apache.hadoop mrunit 1.1.0 Hadoop2 org.mockito mockito-all 1.10.19 org.powermock powermock-api-mockito 1.6.4 this is how to solve the error problem of running mrunit. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.