Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
6a717cb2
Commit
6a717cb2
authored
Dec 16, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
277f9e4d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
19 deletions
+45
-19
bigfile/.gitignore
bigfile/.gitignore
+1
-0
bigfile/_file_zodb.pyx
bigfile/_file_zodb.pyx
+39
-0
bigfile/file_zodb.py
bigfile/file_zodb.py
+2
-19
setup.py
setup.py
+3
-0
No files found.
bigfile/.gitignore
0 → 100644
View file @
6a717cb2
/_file_zodb.cpp
bigfile/_file_zodb.pyx
0 → 100644
View file @
6a717cb2
# -*- coding: utf-8 -*-
# Wendelin.bigfile | BigFile ZODB backend
# Copyright (C) 2014-2019 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
"""XXX"""
from
wendelin.bigfile
import
BigFile
# helper for ZBigFile - just redirect loadblk/storeblk back
# (because it is not possible to inherit from both Persistent and BigFile at
# the same time - see below)
class
_ZBigFile
(
BigFile
):
# .zself - reference to ZBigFile
def
__new__
(
cls
,
zself
,
blksize
):
obj
=
BigFile
.
__new__
(
cls
,
blksize
)
obj
.
zself
=
zself
return
obj
# redirect load/store/mapper to main class
def
loadblk
(
self
,
blk
,
buf
):
return
self
.
zself
.
loadblk
(
blk
,
buf
)
def
storeblk
(
self
,
blk
,
buf
):
return
self
.
zself
.
storeblk
(
blk
,
buf
)
#def blkmmapper(self): return self.zself.blkmmapper()
bigfile/file_zodb.py
View file @
6a717cb2
...
...
@@ -175,7 +175,8 @@ will be our future approach after we teach NEO about object deduplication.
# natural to also use "2" here.
from
wendelin.bigfile
import
BigFile
,
WRITEOUT_STORE
,
WRITEOUT_MARKSTORED
from
wendelin.bigfile
import
WRITEOUT_STORE
,
WRITEOUT_MARKSTORED
from
wendelin.bigfile._file_zodb
import
_ZBigFile
from
wendelin
import
wcfs
from
wendelin.lib.mem
import
bzero
,
memcpy
from
wendelin.lib.zodb
import
LivePersistent
,
deactivate_btree
,
zconn_at
...
...
@@ -510,24 +511,6 @@ if ZBlk_fmt_write not in ZBlk_fmt_registry:
# ----------------------------------------
# helper for ZBigFile - just redirect loadblk/storeblk back
# (because it is not possible to inherit from both Persistent and BigFile at
# the same time - see below)
class
_ZBigFile
(
BigFile
):
# .zself - reference to ZBigFile
def
__new__
(
cls
,
zself
,
blksize
):
obj
=
BigFile
.
__new__
(
cls
,
blksize
)
obj
.
zself
=
zself
return
obj
# redirect load/store/mapper to main class
def
loadblk
(
self
,
blk
,
buf
):
return
self
.
zself
.
loadblk
(
blk
,
buf
)
def
storeblk
(
self
,
blk
,
buf
):
return
self
.
zself
.
storeblk
(
blk
,
buf
)
#def blkmmapper(self): return self.zself.blkmmapper()
# ZBigFile implements BigFile backend with data stored in ZODB.
#
# NOTE Can't inherit from Persistent and BigFile at the same time - both are C
...
...
setup.py
View file @
6a717cb2
...
...
@@ -256,6 +256,9 @@ setup(
ext_modules
=
[
_bigfile
,
PyGoExt
(
'wendelin.bigfile._file_zodb'
,
[
'bigfile/_file_zodb.pyx'
]),
PyGoExt
(
'wendelin.wcfs.internal._wcfs'
,
[
'wcfs/internal/_wcfs.pyx'
,
'wcfs/internal/wcfs_virtmem.cpp'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment