Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Sending pull request #48

Closed
wants to merge 1 commit into from

4 participants

@alexey-romanenko

I need to use existed Configuration in DistributedLzoIndexer
Please, review it

@dvryaboy
Collaborator

LGTM.
Raghu?

@rangadi rangadi commented on the diff
...com/hadoop/compression/lzo/DistributedLzoIndexer.java
@@ -86,8 +86,10 @@ public int run(String[] args) throws Exception {
return 0;
}
- Configuration conf = new Configuration();
@rangadi Collaborator
rangadi added a note

ToolRunner() sets the conf. We should just remove it here. It will give you the same effect anyway.
I hate ToolRunner.

@rangadi Collaborator
rangadi added a note

we will have a different patch to fix it.

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

Hey Alexey, thanks for the patch! We implemented slightly differently in #52 but its largely the same as this one.

@killerwhile killerwhile referenced this pull request from a commit
@traviscrawford traviscrawford This is related to #48
Looking at ToolRunner, the configuration is already set, so this is not necessary. By updating in this way users can set the configuration if necessary too.
e98ec3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/java/com/hadoop/compression/lzo/DistributedLzoIndexer.java
View
6 src/java/com/hadoop/compression/lzo/DistributedLzoIndexer.java
@@ -86,8 +86,10 @@ public int run(String[] args) throws Exception {
return 0;
}
- Configuration conf = new Configuration();
@rangadi Collaborator
rangadi added a note

ToolRunner() sets the conf. We should just remove it here. It will give you the same effect anyway.
I hate ToolRunner.

@rangadi Collaborator
rangadi added a note

we will have a different patch to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
- Job job = new Job(conf);
+ if (getConf() == null) {
+ setConf(new Configuration());
+ }
+ Job job = new Job(getConf());
job.setJobName("Distributed Lzo Indexer " + Arrays.toString(args));
job.setOutputKeyClass(Path.class);
Something went wrong with that request. Please try again.