Giter VIP home page Giter VIP logo

cpy-leveldb's Introduction

cpy-leveldb's People

Contributors

carlopires avatar forhappy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpy-leveldb's Issues

some errors ...

i've just get the git clone of : git://github.com/forhappy/cpy-leveldb.git
i'm on ubuntu 11.10
here are my problem :


in /tmp/cpy-leveldb :
cd snappy
but no ./configure file need to ./autogen.sh first

after done everything in the README.TXT
all compile installation ok

But when try python and test leveldb i've got that :
the import of leveldb ok

Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import leveldb
db = leveldb.LevelDB("/tmp/leveldb")
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'LevelDB'

thks for help

bloom filter require

I found that leveldb_options_set_filter_policy was not called in LevelDB_init . Does any reason to do so ?

/crtbeginT.o: could not read symbols: Bad value

Here's an error I get when I come to python setup.py build. Any ideas of how to resolve it? I use a Fedora system, leveldb and snappy compiled and installed fine.

gcc -pthread -shared build/temp.linux-x86_64-2.7/src/initmodule.o build/temp.linux-x86_64-2.7/src/leveldb.o build/temp.linux-x86_64-2.7/src/write_batch.o build/temp.linux-x86_64-2.7/src/iterator.o build/temp.linux-x86_64-2.7/src/snapshot.o build/temp.linux-x86_64-2.7/src/range_iterator.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/leveldb.so -L./leveldb -static -lleveldb -lsnappy -lpthread
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.6.1/crtbeginT.o: relocation R_X86_64_32 against `DTOR_END' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/crtbeginT.o: could not read symbols: Bad value

invoke pure virtual function error

code:

!/usr/bin/env python

-- coding: utf-8 --

import datetime
import uuid
import leveldb

def main():
n=10000

print("%s: write %d items to db.."%(datetime.datetime.now(),n))

db = leveldb.LevelDB("./leveldb.db")
for i in range(n):
    db.Put(str(i), "this is item %d"%(i))

print("%s: lookup a item from map..."%(datetime.datetime.now()))
print(db.Get("43"))
print("%s: ok"%(datetime.datetime.now()))



return 0

if name == 'main':
main()

error when exit
#0 0x008aa410 in __kernel_vsyscall ()
#1 0x0099ddf0 in raise () from /lib/libc.so.6
#2 0x0099f701 in abort () from /lib/libc.so.6
#3 0x00275b10 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#4 0x00273515 in ?? () from /usr/lib/libstdc++.so.6
#5 0x00273552 in std::terminate() () from /usr/lib/libstdc++.so.6
#6 0x00273c75 in __cxa_pure_virtual () from /usr/lib/libstdc++.so.6
#7 0x0013c91f in leveldb::InternalKeyComparator::Compare(leveldb::Slice const&, leveldb::Slice const&) const ()

from /usr/local/lib/python2.7/site-packages/leveldb.so
#8 0x0014d779 in leveldb::(anonymous namespace)::MergingIterator::FindSmallest() () from /usr/local/lib/python2.7/site-packages/leveldb.so
#9 0x0014e05c in leveldb::(anonymous namespace)::MergingIterator::Next() () from /usr/local/lib/python2.7/site-packages/leveldb.so
#10 0x0013698e in leveldb::DBImpl::DoCompactionWork(leveldb::DBImpl::CompactionState*) () from /usr/local/lib/python2.7/site-packages/leveldb.so
#11 0x00137241 in leveldb::DBImpl::BackgroundCompaction() () from /usr/local/lib/python2.7/site-packages/leveldb.so
#12 0x001377e8 in leveldb::DBImpl::BackgroundCall() () from /usr/local/lib/python2.7/site-packages/leveldb.so
#13 0x00153f92 in leveldb::(anonymous namespace)::PosixEnv::BGThreadWrapper(void*) () from /usr/local/lib/python2.7/site-packages/leveldb.so
#14 0x00af1832 in start_thread () from /lib/libpthread.so.0
#15 0x00a46e0e in clone () from /lib/libc.so.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.