@Override
    public int getPartition(Text key, DoubleWritable value,
                            int numberOfPartitions) {
        String newSchemaStr = conf.get(SystemConf
                .getNewSchemaForConfSetString());
        if (null == newSchemaStr || "".equals(newSchemaStr)) {
            try {
                throw new NewSchemaNotSetException();
            } catch (NewSchemaNotSetException e) {
                e.printStackTrace();
                // TODO exit is not a good way
                System.exit(-1);
            }
        }
        Schema newSchema = null;
        try {
            newSchema = Schema.constructedFromString(newSchemaStr);
//			System.err.println(newSchemaStr);
        } catch (InvalidObjectStringException e) {
            e.printStackTrace();
            // TODO exit is not a good way
            System.exit(-1);
        }
        BigInteger elementNo = new BigInteger(key.toString());
        // TODO numberOfPages cannot bigger than Integer.MAX_VALUE
        int pageNo = (int) PageHelper.belongTo(elementNo, newSchema);
//		System.err.println("pageNo: " + pageNo);
        if (pageNo != 0) {
//			System.err.println("*******************************************");
        }
        return pageNo;
    }