public static boolean isCorrectEncoder(DataBlockEncoder encoder, short encoderId) {
    DataBlockEncoding algorithm = getEncodingById(encoderId);
    String encoderCls = encoder.getClass().getName();
    return encoderCls.equals(algorithm.encoderCls);
  }
Check if given encoder has this id.
@param encoder   encoder which id will be checked
@param encoderId id which we except
@return true if id is right for given encoder, false otherwise
@exception IllegalArgumentException thrown when there is no matching data block encoder
hbase-common/src/main/java/org/apache/hadoop/hbase/io/encoding/DataBlockEncoding.java