Skip to content

Commit

Permalink
brianfrankcoopergh-97 Bug fixes in dynamodb plugin
Browse files Browse the repository at this point in the history
I have fixed a bug in insert() and delete() methods.There are also
some cosmetic changes to readme and properties files.
  • Loading branch information
jananin authored and Joey Echeverria committed Feb 7, 2013
1 parent f0c8083 commit 9c85aad
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1 +1 @@
/elasticsearch/target/
/elasticsearch/target/
2 changes: 1 addition & 1 deletion bin/ycsb
Expand Up @@ -40,7 +40,7 @@ DATABASES = {
"nosqldb" : "com.yahoo.ycsb.db.NoSqlDbClient",
"orientdb" : "com.yahoo.ycsb.db.OrientDBClient",
"redis" : "com.yahoo.ycsb.db.RedisClient",
"voldemort" : "com.yahoo.ycsb.db.VoldemortClient",
"voldemort" : "com.yahoo.ycsb.db.VoldemortClient",
}

OPTIONS = {
Expand Down
7 changes: 5 additions & 2 deletions dynamodb/README
Expand Up @@ -3,10 +3,13 @@ CONFIGURE
YCSB_HOME - YCSB home directory
DYNAMODB_HOME - Amazon DynamoDB package files

Please refer to https://github.com/brianfrankcooper/YCSB/wiki/Using-the-Database-Libraries
for more information on setup.

BENCHMARK

$YCSB_HOME/bin/ycsb load dynamodb -P worklaods/workloada -P dynamodb.properties
$YCSB_HOME/bin/ycsb run dynamodb -P worklaods/workloada -P dynamodb.properties
$YCSB_HOME/bin/ycsb load dynamodb -P workloads/workloada -P dynamodb.properties
$YCSB_HOME/bin/ycsb run dynamodb -P workloads/workloada -P dynamodb.properties

PROPERTIES

Expand Down
2 changes: 1 addition & 1 deletion dynamodb/conf/dynamodb.properties
Expand Up @@ -17,7 +17,7 @@
#dynamodb.endpoint = http://dynamodb.us-east-1.amazonaws.com

# Strongly recommended to set to uniform.Refer FAQs in README
#requestdistribution = uniform
#requestdistribution = uniform

# Enable/disable debug messages.Defaults to false
# "true" or "false"
Expand Down
6 changes: 3 additions & 3 deletions dynamodb/src/main/java/com/yahoo/ycsb/db/DynamoDBClient.java
Expand Up @@ -200,7 +200,7 @@ public int scan(String table, String startkey, int recordcount,
}
startKey = res.getLastEvaluatedKey();

}
}

return OK;
}
Expand Down Expand Up @@ -249,7 +249,7 @@ public int insert(String table, String key,HashMap<String, ByteIterator> values)
logger.error(ex.getMessage());
return CLIENT_ERROR;
}
return res.getConsumedCapacityUnits().intValue();
return OK;
}

@Override
Expand All @@ -267,7 +267,7 @@ public int delete(String table, String key) {
logger.error(ex.getMessage());
return CLIENT_ERROR;
}
return res.getConsumedCapacityUnits().intValue();
return OK;
}

private static Map<String, AttributeValue> createAttributes(
Expand Down

0 comments on commit 9c85aad

Please sign in to comment.