class TwoDimTaskGenerator extends Generator {

    @Override public long decode(String column, String globalID) {
        // 后20位的信息(包括第一维和第二维的hash信息)
        Long hashNum;
        try {
            hashNum = Long.parseLong(
                globalID.substring(globalID.length() - HASH_LENGTH, globalID.length()), 16);
        } catch (Exception ignore) {
            LOG.error("Parse globalID failed", ignore);
            return -1;
        }

        long result = -1;
        if (column.equals(firstDim))
            result = hashNum >> 10;
        if (column.equals(secondDim))
            result = hashNum - (hashNum >> 10 << 10);
        return result;
    }

    public  TwoDimTaskGenerator(String prefix, String firstDim, String secondDim);

}