In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to configure getConf and new Configuration". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to configure getConf and new Configuration.
# getConf
All configurations are in the form of commands, in which case-files is supported
Sudo-uwirelessdev hadoop jar\ / home/q/script/mods/mrjob/mods-1.0-SNAPSHOT-jar-with-dependencies.jar\-files / home/q/script/mods/mrjob/mods.acid\-D mapreduce.job.queuename=wirelessdev\-D mapreduce.job.priority=VERY_HIGH\-D mapreduce.map.memory.mb=8192\-D mapreduce.map.java.opts='-Xmx8192M'\-D mapreduce.reduce.memory.mb=8192\-D mapreduce.reduce.java.opts= '- Xmx8192M'\-D mapreduce.job.reduces=100\-D mapred.reduce.tasks=100\-D mapreduce.job.name=mods_firstjob_leofei.li\ / user/wirelessdev/marmot_warehouse/ods/ods_modss_frame/dt=2016-07-13 Universe * / user/wirelessdev/leofei.li/firstjob
# new Configuration configuration items are configured through code. In this case, configuration items through the command line will become invalid.
Configuration conf = new Configuration (); conf.set ("fs.defaultFS", "hdfs://qunarcluster"); conf.set ("mapreduce.job.queuename", "wirelessdev"); conf.set ("mapreduce.job.reduces", "100th"); conf.set ("mapreduce.job.priority", "VERY_HIGH"); conf.set ("mapreduce.map.memory.mb", "8192"); conf.set ("mapreduce.map.java.opts", "- Xmx8192M") Conf.set ("mapreduce.reduce.memory.mb", "8192"); conf.set ("mapreduce.reduce.java.opts", "- Xmx8192M")
-files is not supported in this case, and DistributedCache is required. The default hdfs path is
DistributedCache.addCacheFile (new Path ("/ user/wirelessdev/leofei.li/conf/mods.acid") .toUri (), conf)
# recommended
Configuration conf = getConf (); conf.set ("mapreduce.job.queuename", "wirelessdev"); Job job = Job.getInstance (conf, "mods_firstjob_leofei.li"). Now that you have a better understanding of "how to configure getConf and new Configuration", you might as well do it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.