Skip to content

Homework - #6

Open
Georgiy0 wants to merge 3 commits into
polis-vk:masterfrom
Georgiy0:master
Open

Homework#6
Georgiy0 wants to merge 3 commits into
polis-vk:masterfrom
Georgiy0:master

Conversation

@Georgiy0

Copy link
Copy Markdown

No description provided.

@Override
public int run(String[] args) throws Exception {
final Configuration conf = this.getConf();
final Job job = new Job(conf, "GetRow");

Copy link
Copy Markdown

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);

Copy link
Copy Markdown

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]));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Где проверка на присутсвие аргументов, биг дата, бигдатой, но исключение ловить хотелось бы


job.setMapperClass(MyMapper.class);
job.setReducerClass(MyReducer.class);
//job.setCombinerClass(MyReducer.class);

Copy link
Copy Markdown

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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это сработает для всех языков? Даже для тех где мультибайтовая кодировка?
И где проверка на корректность

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants