[azuredocumentdb] Added support for Azure DocumentDB#838
Conversation
risdenk
left a comment
There was a problem hiding this comment.
The changes look pretty good. I had a few minor comments. Can you squash your commits and start the commit with [documentdb]
| <artifactId>documentdb-binding</artifactId> | ||
| <name>DocumentDB Binding</name> | ||
|
|
||
| <properties> |
| @@ -0,0 +1,220 @@ | |||
|
|
|||
| package com.yahoo.ycsb.db; | |||
There was a problem hiding this comment.
Can this be in a documentdb package? (com.yahoo.ycsb.db.documentdb)
| @@ -0,0 +1,48 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <!-- | |||
| Copyright (c) 2012 - 2016 YCSB contributors. All rights reserved. | |||
| @@ -0,0 +1,220 @@ | |||
|
|
|||
| @@ -0,0 +1,22 @@ | |||
| /* | |||
| * Copyright 2015-2016 YCSB Contributors. All Rights Reserved. | |||
|
Looks like #837 has azure as well. What is the difference between table storage and documentdb? |
|
The binding should probably be something like |
|
@k1xme - any plans to update this PR? |
|
@risdenk Sorry! I totally forgot this. Will submit the changes by the end of this week. |
[azuredocumentdb] Refactored code and added license header [azuredocumentdb] deleted unused class
|
@risdenk Sorry for the late update. I've fixed the nits and style problem you mentioned. This PR is ready for integration now. |
risdenk
left a comment
There was a problem hiding this comment.
Some of the package changes didn't seem to be complete. See comments.
| /** | ||
| * The YCSB binding for Azure DocumentDB. | ||
| */ | ||
| package com.yahoo.ycsb.db; |
There was a problem hiding this comment.
also needs to be moved into the package folder
| * for the specific language governing permissions and limitations under | ||
| * the License. | ||
| */ | ||
| package com.yahoo.ycsb.db.azuredocumentdb; |
There was a problem hiding this comment.
Since the package was updated the file needs to be in the folder:
azuredocumentdb/src/main/java/com/yahoo/ycsb/db/azuredocumentdb/AzureDocumentDBClient.java
| cassandra2-cql:com.yahoo.ycsb.db.CassandraCQLClient | ||
| couchbase:com.yahoo.ycsb.db.CouchbaseClient | ||
| couchbase2:com.yahoo.ycsb.db.couchbase2.Couchbase2Client | ||
| azuredocumentdb:com.yahoo.ycsb.db.AzureDocumentDBClient |
There was a problem hiding this comment.
needs to be updated to new package location
| "cassandra2-cql": "com.yahoo.ycsb.db.CassandraCQLClient", | ||
| "couchbase" : "com.yahoo.ycsb.db.CouchbaseClient", | ||
| "couchbase2" : "com.yahoo.ycsb.db.couchbase2.Couchbase2Client", | ||
| "documentdb" : "com.yahoo.ycsb.db.DocumentDBClient", |
There was a problem hiding this comment.
needs to be updated to new package location and should be azuredocumentdb instead of just documentdb
|
@risdenk Done! |
|
|
||
| <artifactId>azuredocumentdb-binding</artifactId> | ||
| <name>Azure DocumentDB Binding</name> | ||
| <properties> |
There was a problem hiding this comment.
This properties section should be removed. Any checkstyle errors should be fixed as well after this is removed.
| // TODO: Something has gone terribly wrong - the app wasn't | ||
| // able to query or create the collection. | ||
| // Verify your connection, endpoint, and key. | ||
| e.printStackTrace(); |
There was a problem hiding this comment.
These errors should be sent to stderr. An example is here:
e.printStackTrace(System.err);
Another option would be to use a logging framework but that would be a bigger change.
There was a problem hiding this comment.
This should be done for the other places w/ e.printStackTrace()
| // TODO: Something has gone terribly wrong - the app wasn't | ||
| // able to query or create the collection. | ||
| // Verify your connection, endpoint, and key. | ||
| e.printStackTrace(); |
There was a problem hiding this comment.
Should this throw an exception or error? Instead of just printing the message?
|
@risdenk fixed style check errors and exception handling nits per request. |
Support Azure DocumentDB.
scanoperation is not supported currently.