Beispiel #1
0
def on_disk_data_cleaner(generator):
    rootdir = tempfile.mkdtemp(prefix='bcolz-')
    os.rmdir(rootdir)  # folder should be emtpy
    ct = bz.fromiter(generator, dtype='i4,i4', count=N, rootdir=rootdir)
    ct = bq.open(rootdir)
    # print ct
    ct.flush()
    ct = bq.open(rootdir)

    yield ct

    shutil.rmtree(rootdir)
Beispiel #2
0
def on_disk_data_cleaner(generator):
    rootdir = tempfile.mkdtemp(prefix='bcolz-')
    os.rmdir(rootdir)  # folder should be emtpy
    ct = bz.fromiter(generator, dtype='i4,i4', count=N, rootdir=rootdir)
    ct = bq.open(rootdir)
    # print ct
    ct.flush()
    ct = bq.open(rootdir)

    yield ct

    shutil.rmtree(rootdir)
Beispiel #3
0
    def on_disk_data_cleaner(self, data):
        self.rootdir = tempfile.mkdtemp(prefix='bcolz-')
        os.rmdir(self.rootdir)  # folder should be emtpy
        ct = bquery.ctable(data, rootdir=self.rootdir)
        # print(ct)
        ct.flush()
        ct = bquery.open(self.rootdir)

        yield ct

        shutil.rmtree(self.rootdir)
        self.rootdir = None
Beispiel #4
0
    def on_disk_data_cleaner(self, data):
        self.rootdir = tempfile.mkdtemp(prefix='bcolz-')
        os.rmdir(self.rootdir)  # folder should be emtpy
        ct = bquery.ctable(data, rootdir=self.rootdir)
        # print ct
        ct.flush()
        ct = bquery.open(self.rootdir)

        yield ct

        shutil.rmtree(self.rootdir)
        self.rootdir = None