Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution when MapReduce runs the Times ClassNotFound

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Straight to the point.

The MapReduce program reports how to solve the error in ClassNotFound.

If you also encounter this problem, you can solve it in the following ways

1. Report to ClassNotFound if you run the program, and there is no information about the operation of the MapReduce program in the log.

This is the exception in job.

Solution: first of all, there must be a corresponding Jar package in the local Classpath

That is, you must be able to run Job submit tasks, and of course, none of the tasks can be submitted successfully, so there is no second case.

2. ClassNotFound occurs when Map or Reduce is running

This is the problem that occurs when the MapReduce program runs after the task is successfully submitted. It is generally difficult for beginners to find the reason (the author is also very difficult to find with the help of others). The reason is that the environment of MapReduce is different from that of job. MapReduce runs on the (2.x) Yarn framework.

Solution: there must be a corresponding jar package in hadoop classpath

Note: this is not to change hadoop-env, but to put it in the directory contained in hadoop classpath. If you do not put it in the directory contained in hadoop classpath, there may be a ClassNotFound that Job finds the class but the MapReduce program cannot find.

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report