Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Homework #6

wants to merge 3 commits into from

Conversation

Georgiy0
Copy link

No description provided.

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

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

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

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

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

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