code: public void configure(JobConf job) {
      shards = Shard.getIndexShards(new IndexUpdateConfiguration(job));
      map = new HashMap<Shard, Integer>();
      for (int i = 0; i < shards.length; i++) {
        map.put(shards[i], i);
      }
    }
docs: /* (non-Javadoc)
  @see org.apache.hadoop.mapred.JobConfigurable#configure(org.apache.hadoop.mapred.JobConf)