What's the bit at the end? looks like pseudo-random number generation,
so just use a Random?

On Sat, Feb 20, 2010 at 11:21 PM, Robin Anil <robin.a...@gmail.com> wrote:
> how does this look
> �...@override
>  public void configure(JobConf job) {
>    super.configure(job);
>    String taskId = job.get("mapred.task.id");
>    String[] parts = taskId.split("_");
>    if (parts.length != 6 || !parts[0].equals("attempt") ||
> (!"m".equals(parts[3]) && !"r".equals(parts[3]))) {
>      throw new IllegalArgumentException("TaskAttemptId string : " + taskId
> + " is not properly formed");
>    }
>    nextCanopyId = ((1 << 31) / 50000) * (Integer.parseInt(parts[4]));
>  }
>

Reply via email to