protected Map < ByteBuffer , AbstractType > getValidatorMap ( CfDef cfDef ) throws IOException { Map < ByteBuffer , AbstractType > validators = new HashMap < ByteBuffer , AbstractType > ( ) ; for ( ColumnDef cd : cfDef . getColumn_metadata ( ) ) { if ( cd . getValidation_class ( ) != null && ! cd . getValidation_class ( ) . isEmpty ( ) ) { AbstractType validator = null ; try { validator = TypeParser . parse ( cd . getValidation_class ( ) ) ; if ( validator instanceof CounterColumnType ) validator = LongType . instance ; validators . put ( cd . name , validator ) ; } catch ( ConfigurationException e ) { throw new IOException ( e ) ; } catch ( SyntaxException e ) { throw new IOException ( e ) ; } } } return validators ; }
get the validators