arnaudsjs / YCSB-couchdb-binding

Couchdb database interface for YCSB
Apache License 2.0
2 stars 5 forks source link

can't add couchdb binding #6

Open andrecalcada opened 5 years ago

andrecalcada commented 5 years ago

HI I've tried to install this but when I run mvn clean install this happens:

andre@andre-VirtualBox:~/YCSB$ mvn clean package WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... Downloading from central: https://repo.maven.apache.org/maven2/com/yahoo/ycsb/root/0.1.4/root-0.1.4.pom [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for com.yahoo.ycsb:couchdb-binding:[unknown-version]: Could not find artifact com.yahoo.ycsb:root:pom:0.1.4 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 4, column 11 @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.yahoo.ycsb:couchdb-binding:[unknown-version] (/home/andre/YCSB/couchdb/pom.xml) has 1 error [ERROR] Non-resolvable parent POM for com.yahoo.ycsb:couchdb-binding:[unknown-version]: Could not find artifact com.yahoo.ycsb:root:pom:0.1.4 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 4, column 11 -> [Help 2] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

arnaudsjs commented 5 years ago

I think you are facing the same issue as in #4 . I updated the installation instructions in the README.md.

andrecalcada commented 5 years ago

if you are saying that the problem is the YCSB version, well it's not because i've tried that version and still have the same error

arnaudsjs commented 5 years ago

Ok. I didn't manage to reproduce your issue. Can you send me the following:

I also see you get a couple of warning at the top of the your output log. Which version of java are you using? I didn't have any problems using openjdk 1.8.

andrecalcada commented 5 years ago

pom ycsb 0.14

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0 com.yahoo.ycsb root 0.1.4 pom YCSB Root This is the top level project that builds, packages the core and all the DB bindings for YCSB infrastructure. checkstyle checkstyle 5.0 org.jdom jdom 1.1 com.google.collections google-collections 1.0 org.slf4j slf4j-api 1.6.4 2.2.1 0.90.5 0.7.0 7.1.0.CR1 2.1.1 1.0 2.7.2 2.0.0 0.81 UTF-8 core hbase cassandra couchdb gemfire infinispan jdbc mapkeeper mongodb redis voldemort distribution org.apache.maven.plugins maven-compiler-plugin 2.3.2 1.6 1.6 org.apache.maven.plugins maven-checkstyle-plugin 2.6 true validate validate checkstyle

ycsb ycsb 0.14

!/usr/bin/env python

import os import sys import subprocess

BASE_URL = "https://github.com/brianfrankcooper/YCSB/tree/master/" COMMANDS = { "shell" : { "command" : "", "description" : "Interactive mode", "main" : "com.yahoo.ycsb.CommandLine", }, "load" : { "command" : "-load", "description" : "Execute the load phase", "main" : "com.yahoo.ycsb.Client", }, "run" : { "command" : "-t", "description" : "Execute the transaction phase", "main" : "com.yahoo.ycsb.Client", }, }

DATABASES = { "basic" : "com.yahoo.ycsb.BasicDB", "cassandra-7" : "com.yahoo.ycsb.db.CassandraClient7", "cassandra-8" : "com.yahoo.ycsb.db.CassandraClient8", "cassandra-10" : "com.yahoo.ycsb.db.CassandraClient10", "couchdb" : "com.yahoo.ycsb.db.couchdb.CouchdbClient", "gemfire" : "com.yahoo.ycsb.db.GemFireClient", "hbase" : "com.yahoo.ycsb.db.HBaseClient", "infinispan" : "com.yahoo.ycsb.db.InfinispanClient", "jdbc" : "com.yahoo.ycsb.db.JdbcDBClient", "mapkeeper" : "com.yahoo.ycsb.db.MapKeeperClient", "mongodb" : "com.yahoo.ycsb.db.MongoDbClient", "nosqldb" : "com.yahoo.ycsb.db.NoSqlDbClient", "redis" : "com.yahoo.ycsb.db.RedisClient", "voldemort" : "com.yahoo.ycsb.db.VoldemortClient", }

OPTIONS = { "-P file" : "Specify workload file", "-p key=value" : "Override workload property", "-s" : "Print status to stderr", "-target n" : "Target ops/sec (default: unthrottled)", "-threads n" : "Number of client threads (default: 1)", }

def usage(): print "Usage: %s command database [options]" % sys.argv[0]

print "\nCommands:"
for command in sorted(COMMANDS.keys()):
    print "    %s %s" % (command.ljust(13), COMMANDS[command]["description"])

print "\nDatabases:"
for db in sorted(DATABASES.keys()):
    print "    %s %s" % (db.ljust(13), BASE_URL + db.split("-")[0])

print "\nOptions:"
for option in sorted(OPTIONS.keys()):
    print "    %s %s" % (option.ljust(13), OPTIONS[option])

print """\nWorkload Files:
There are various predefined workloads under workloads/ directory.
See https://github.com/brianfrankcooper/YCSB/wiki/Core-Properties
for the list of workload properties."""

sys.exit(1)

def find_jars(dir, database): jars = [] for (dirpath, dirnames, filenames) in os.walk(dir): if dirpath.endswith("conf"): jars.append(dirpath) for filename in filenames: if filename.endswith(".jar") and \ (filename.startswith("core") or \ filename.startswith(database.split("-")[0]) or \ not "binding" in filename): jars.append(os.path.join(dirpath, filename)) return jars

def get_ycsb_home(): dir = os.path.abspath(os.path.dirname(sys.argv[0])) while "CHANGELOG" not in os.listdir(dir): dir = os.path.join(dir, os.path.pardir) return os.path.abspath(dir)

if len(sys.argv) < 3: usage() if sys.argv[1] not in COMMANDS: print "ERROR: Command '%s' not found" % sys.argv[1] usage() if sys.argv[2] not in DATABASES: print "ERROR: Database '%s' not found" % sys.argv[2] usage()

ycsb_home = get_ycsb_home() command = COMMANDS[sys.argv[1]]["command"] database = sys.argv[2] db_classname = DATABASES[database] options = sys.argv[3:]

ycsb_command = ["java", "-cp", ":".join(find_jars(ycsb_home, database)), \ COMMANDS[sys.argv[1]]["main"], "-db", db_classname] + options if command: ycsb_command.append(command) print " ".join(ycsb_command) subprocess.call(ycsb_command)

files / directories, the / is only to indicate it is a directory:

/bin /build-tools /cassandra /core /couchdb /distribution /doc /gemfire /hbase /infonispan /jbdc /mapkeeper /mongodb /nosqldb /redis /voldemort /workloads .gitignore BUILD CHANGELOG LICENSE.txt NOTICE.txt pom.xml README

andrecalcada commented 5 years ago

I changed something and now I a different error:

andre@andre-VirtualBox:~/YCSB-0.1.4$ mvn clean package WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] YCSB Root [pom] [INFO] Core YCSB [jar] [INFO] HBase DB Binding [jar] [INFO] Cassandra DB Binding [jar] [INFO] Couchdb DB Binding [jar] [INFO] Gemfire DB Binding [jar] [INFO] Infinispan DB Binding [jar] [INFO] JDBC DB Binding [jar] [INFO] Mapkeeper DB Binding [jar] [INFO] Mongo DB Binding [jar] [INFO] Redis DB Binding [jar] [INFO] Voldemort DB Binding [jar] [INFO] YCSB Release Distribution Builder [pom] [INFO] [INFO] ------------------------< com.yahoo.ycsb:root >------------------------- [INFO] Building YCSB Root 0.1.4 [1/13] [INFO] --------------------------------[ pom ]--------------------------------- Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-checkstyle-plugin/2.6/maven-checkstyle-plugin-2.6.pom [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for YCSB Root 0.1.4: [INFO] [INFO] YCSB Root .......................................... FAILURE [ 1.490 s] [INFO] Core YCSB .......................................... SKIPPED [INFO] HBase DB Binding ................................... SKIPPED [INFO] Cassandra DB Binding ............................... SKIPPED [INFO] Couchdb DB Binding ................................. SKIPPED [INFO] Gemfire DB Binding ................................. SKIPPED [INFO] Infinispan DB Binding .............................. SKIPPED [INFO] JDBC DB Binding .................................... SKIPPED [INFO] Mapkeeper DB Binding ............................... SKIPPED [INFO] Mongo DB Binding ................................... SKIPPED [INFO] Redis DB Binding ................................... SKIPPED [INFO] Voldemort DB Binding ............................... SKIPPED [INFO] YCSB Release Distribution Builder .................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.765 s [INFO] Finished at: 2019-06-24T15:39:00+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-checkstyle-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-checkstyle-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-checkstyle-plugin:pom:2.6 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Name or service not known: Unknown host repo.maven.apache.org: Name or service not known -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

arnaudsjs commented 5 years ago

I see two issues:

andrecalcada commented 5 years ago

now I've done mvn clean package sucessfully but when I execute

./bin/ycsb load couchdb -P workloads/workloada -p hosts="127.0.0.1" -p recordcount=1000000 -p threadcount=1 -s > LA1.txt

it shows this error andre@andre-VirtualBox:~/YCSB-0.1.4$ ./bin/ycsb load couchdb -P workloads/workloada -p hosts="127.0.0.1" -p recordcount=1000 -p threadcount=1 -s > LA1.txt Loading workload... Starting test. 0 sec: 0 operations; SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. jun 25, 2019 11:22:02 DA MANHÃ org.apache.http.impl.client.DefaultRequestDirector handleResponse WARNING: Authentication error: Unable to respond to any of these challenges: {} Exception in thread "Thread-1" org.ektorp.DbAccessException: 401:Unauthorized URI: /usertable/ Response Body: { "error" : "unauthorized", "reason" : "You are not a server admin." } at org.ektorp.http.StdResponseHandler.createDbAccessException(StdResponseHandler.java:44) at org.ektorp.http.StdResponseHandler.error(StdResponseHandler.java:62) at org.ektorp.http.RestTemplate.handleVoidResponse(RestTemplate.java:101) at org.ektorp.http.RestTemplate.put(RestTemplate.java:39) at org.ektorp.impl.StdCouchDbInstance.createDatabase(StdCouchDbInstance.java:53) at org.ektorp.impl.StdCouchDbInstance.createDatabase(StdCouchDbInstance.java:45) at org.ektorp.impl.StdCouchDbConnector.createDatabaseIfNotExists(StdCouchDbConnector.java:399) at org.ektorp.impl.StdCouchDbInstance.createConnector(StdCouchDbInstance.java:105) at couchdb.LoadBalancedConnector.createConnectors(LoadBalancedConnector.java:81) at couchdb.LoadBalancedConnector.(LoadBalancedConnector.java:71) at couchdb.CouchdbClient.init(CouchdbClient.java:102) at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:63) at com.yahoo.ycsb.ClientThread.run(Client.java:189) 0 sec: 0 operations;

arnaudsjs commented 5 years ago

This CouchDB binding doesn't support CouchDB servers which require authentication. You will have to remove the authentication from the CouchDB server or adjust the implementation of the binding as such that it supports authentication.

andrecalcada commented 5 years ago

i don't know how to remove authentication or how change the binding in order for it to support it

andrecalcada commented 5 years ago

help please