private static String adjustBucketNumLen(String bucketNum, String taskId) {
    int bucketNumLen = bucketNum.length();
    int taskIdLen = taskId.length();
    StringBuilder s = new StringBuilder();
    for (int i = 0; i < taskIdLen - bucketNumLen; i++) {
      s.append('0');
    }
    s.append(bucketNum);
    return s.toString();
  }
Adds 0's to the beginning of bucketNum until bucketNum and taskId are the same length.

@param bucketNum - the bucket number, should not be prefixed
@param taskId - the taskId used as a template for length
@return
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java