Skip to content

[azuredocumentdb] Added support for Azure DocumentDB#838

Merged
risdenk merged 9 commits into
brianfrankcooper:masterfrom
k1xme:documentdb
Dec 16, 2016
Merged

[azuredocumentdb] Added support for Azure DocumentDB#838
risdenk merged 9 commits into
brianfrankcooper:masterfrom
k1xme:documentdb

Conversation

@k1xme

@k1xme k1xme commented Sep 4, 2016

Copy link
Copy Markdown

Support Azure DocumentDB.

scan operation is not supported currently.

@risdenk risdenk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look pretty good. I had a few minor comments. Can you squash your commits and start the commit with [documentdb]

Comment thread documentdb/pom.xml Outdated
<artifactId>documentdb-binding</artifactId>
<name>DocumentDB Binding</name>

<properties>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed?

@@ -0,0 +1,220 @@

package com.yahoo.ycsb.db;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be in a documentdb package? (com.yahoo.ycsb.db.documentdb)

Comment thread documentdb/pom.xml Outdated
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012 - 2016 YCSB contributors. All rights reserved.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be 2016

@@ -0,0 +1,220 @@

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing license header

@@ -0,0 +1,22 @@
/*
* Copyright 2015-2016 YCSB Contributors. All Rights Reserved.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 2016

@risdenk

risdenk commented Sep 27, 2016

Copy link
Copy Markdown
Collaborator

Looks like #837 has azure as well. What is the difference between table storage and documentdb?

@risdenk

risdenk commented Sep 27, 2016

Copy link
Copy Markdown
Collaborator

The binding should probably be something like azuredocumentdb

@risdenk risdenk added the db-new label Sep 27, 2016
@risdenk

risdenk commented Oct 31, 2016

Copy link
Copy Markdown
Collaborator

@k1xme - any plans to update this PR?

@k1xme

k1xme commented Nov 1, 2016

Copy link
Copy Markdown
Author

@risdenk Sorry! I totally forgot this. Will submit the changes by the end of this week.

@risdenk risdenk changed the title Added support for Azure DocumentDB [azuredocumentdb] Added support for Azure DocumentDB Nov 28, 2016
[azuredocumentdb] Refactored code and added license header

[azuredocumentdb] deleted unused class
@k1xme

k1xme commented Dec 13, 2016

Copy link
Copy Markdown
Author

@risdenk Sorry for the late update. I've fixed the nits and style problem you mentioned. This PR is ready for integration now.

@risdenk risdenk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the package changes didn't seem to be complete. See comments.

/**
* The YCSB binding for Azure DocumentDB.
*/
package com.yahoo.ycsb.db;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package incorrect now?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the package was updated the file needs to be in the folder:
azuredocumentdb/src/main/java/com/yahoo/ycsb/db/azuredocumentdb/AzureDocumentDBClient.java

Comment thread bin/bindings.properties Outdated
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be updated to new package location

Comment thread bin/ycsb Outdated
"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",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be updated to new package location and should be azuredocumentdb instead of just documentdb

@k1xme

k1xme commented Dec 14, 2016

Copy link
Copy Markdown
Author

@risdenk Done!

@risdenk risdenk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@k1xme I missed a few items from my previous review:

  • Error messages should go to stderr
  • checkstyle enforcement should be enabled
  • There is one error handling spot that just prints instead of exiting?

Comment thread azuredocumentdb/pom.xml Outdated

<artifactId>azuredocumentdb-binding</artifactId>
<name>Azure DocumentDB Binding</name>
<properties>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this throw an exception or error? Instead of just printing the message?

@k1xme

k1xme commented Dec 16, 2016

Copy link
Copy Markdown
Author

@risdenk fixed style check errors and exception handling nits per request.

@risdenk risdenk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @k1xme

@risdenk
risdenk merged commit a37bc78 into brianfrankcooper:master Dec 16, 2016
tzm41 pushed a commit to tzm41/YCSB that referenced this pull request May 7, 2017
@manolama manolama mentioned this pull request Sep 22, 2017
@busbey busbey mentioned this pull request May 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants