review comments- use final variables

This commit is contained in:
nishantmonu51 2014-04-23 03:33:28 +05:30
parent 0d8c1ffe54
commit 1ca61237c1
1 changed files with 2 additions and 2 deletions

View File

@ -145,12 +145,12 @@ public class DetermineHashedPartitionsJob implements Jobby
if (fileSystem == null) { if (fileSystem == null) {
fileSystem = partitionInfoPath.getFileSystem(groupByJob.getConfiguration()); fileSystem = partitionInfoPath.getFileSystem(groupByJob.getConfiguration());
} }
Long cardinality = config.jsonMapper.readValue( final Long cardinality = config.jsonMapper.readValue(
Utils.openInputStream(groupByJob, partitionInfoPath), new TypeReference<Long>() Utils.openInputStream(groupByJob, partitionInfoPath), new TypeReference<Long>()
{ {
} }
); );
int numberOfShards = (int) Math.ceil((double) cardinality / config.getTargetPartitionSize()); final int numberOfShards = (int) Math.ceil((double) cardinality / config.getTargetPartitionSize());
List<HadoopyShardSpec> actualSpecs = Lists.newArrayListWithExpectedSize(numberOfShards); List<HadoopyShardSpec> actualSpecs = Lists.newArrayListWithExpectedSize(numberOfShards);
if (numberOfShards == 1) { if (numberOfShards == 1) {