def __init__(self, file_loc,
                 data_type='c',
                 init_params=None,
                 block_unit_size=0,
                 disk_sector_size=0,
                 open_c_reader=True,
                 **kwargs):
        """
        :param file_loc:            location of the file
        :param data_type:           type of data, can be "l" for int/long, "c" for string
        :param init_params:         the init_params for opening csv
        :param block_unit_size:     block size for storage system, 0 when disabled
        :param disk_sector_size:    size of disk sector
        :param open_c_reader:       bool for whether open reader in C backend
        :param kwargs:              not used now
        """

        super(CsvReader, self).__init__(file_loc, data_type, block_unit_size, disk_sector_size,
                                        open_c_reader, kwargs.get("lock", None))
        assert init_params is not None, "please provide init_param for csvReader"
        assert "label" in init_params, "please provide label for csv reader"

        self.trace_file = open(file_loc, 'rb')
        # self.trace_file = open(file_loc, 'r', encoding='utf-8', errors='ignore')
        self.init_params = init_params
        self.label_column = init_params['label']
        self.time_column = init_params.get("real_time", )
        self.size_column = init_params.get("size", )

        if self.time_column != -1:
            self.support_real_time = True

        if self.size_column != -1:
            self.support_size = True

        if block_unit_size != 0:
            assert "size" in init_params, "please provide size_column option to consider request size"

        self.header_bool = init_params.get('header', )
        self.delimiter = init_params.get('delimiter', ",")
        if "delimiter" not in init_params:
            INFO("open {} using default delimiter \",\" for CsvReader".format(file_loc))


        if self.header_bool:
            self.headers = [i.strip(string.whitespace) for i in
                            self.trace_file.readline().decode().split(self.delimiter)]
            # self.trace_file.readline()

        if ALLOW_C_MIMIRCACHE and open_c_reader:
            self.c_reader = c_cacheReader.setup_reader(file_loc, 'c', data_type=data_type,
                                                                 block_unit_size=block_unit_size,
                                                                 disk_sector_size=disk_sector_size,
                                                                 init_params=init_params)