-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homework #6
base: master
Are you sure you want to change the base?
Homework #6
Conversation
@Override | ||
public int run(String[] args) throws Exception { | ||
final Configuration conf = this.getConf(); | ||
final Job job = new Job(conf, "GetRow"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Job считается deprecated, ужасов никаких нет, но будъте добры выберите из двух вариантов:
Напишите комментарий, почему новый код идёт с deprecated API или используйте рекомендуемое API 😄
job.setJarByClass(GetRow.class); | ||
|
||
job.setInputFormatClass(TextInputFormat.class); | ||
job.setOutputFormatClass(TextOutputFormat.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
job.setOutputKeyClass(Text.class); | ||
job.setOutputValueClass(IntWritable.class); | ||
|
||
FileInputFormat.addInputPath(job, new Path(args[0])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Где проверка на присутсвие аргументов, биг дата, бигдатой, но исключение ловить хотелось бы
job.setJarByClass(WordCount.class); | ||
|
||
job.setMapperClass(MyMapper.class); | ||
job.setReducerClass(MyReducer.class); | ||
//job.setCombinerClass(MyReducer.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему выключили комбайнер?
protected void map(Object key, Text value, Context context) throws IOException, InterruptedException { | ||
final String line = value.toString(); | ||
|
||
int pos = line.indexOf(0x09); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Это сработает для всех языков? Даже для тех где мультибайтовая кодировка?
И где проверка на корректность
No description provided.