code: private void createIndexUsingThrift(TableInfo tableInfo, CfDef cfDef) throws Exception
      {
          for (IndexInfo indexInfo : tableInfo.getColumnsToBeIndexed())
          {
              for (ColumnDef columnDef : cfDef.getColumn_metadata())
              {
                  if (new String(columnDef.getName(), Constants.ENCODING).equals(indexInfo.getColumnName()))
                  {
                      columnDef.setIndex_type(CassandraIndexHelper.getIndexType(indexInfo.getIndexType()));
                      // columnDef.setIndex_name(indexInfo.getIndexName());
                  }
              }
          }
          cassandra_client.system_update_column_family(cfDef);
      }
docs: Creates the index using thrift.
  
  @param tableInfo
  the table info
  @param cfDef
  the cf def
  @throws Exception
  the exception