The constructor Job(Configuration,String) is deprecated

来源:互联网 发布:用友是什么软件 编辑:程序博客网 时间:2024/04/29 18:03

如果你跟我一样有强迫症,可以通过下面两种方式去掉这个提示:

1.添加注解

@SuppressWarnings("deprecation")

Job job = new Job(conf, "word count");

 

2.使用 Job.getInstance(Configuration conf,String jobName )静态方法,创建job对象:

Configuration conf = new Configuration();

Job job = Job.getInstance(conf,"word count");

 

0 0