public static void setColumnNumber(Configuration conf, int columnNum) {
    assert columnNum > 0;
    conf.setInt(HiveConf.ConfVars.HIVE_RCFILE_COLUMN_NUMBER_CONF.varname, columnNum);
  }
set number of columns into the given configuration.

@param conf
         configuration instance which need to set the column number
@param columnNum
         column number for RCFile's Writer
ql/src/java/org/apache/hadoop/hive/ql/io/RCFileOutputFormat.java