Skip to content

Review #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

Review #2

wants to merge 9 commits into from

Conversation

ketanvh
Copy link

@ketanvh ketanvh commented Feb 6, 2019

No description provided.

@d-shapiro d-shapiro self-requested a review February 11, 2019 19:53
ListTablesResult tables = client.listTables();
List tnames = tables.getTableNames();
for(int i = 0 ; i < tnames.size();i++){
System.out.println(tnames.get(i));
Copy link
Contributor

Choose a reason for hiding this comment

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

System.out.println shouldn't be used. If necessary to write to the log, extend DSLogger and call one of the logging methods.

Copy link
Author

Choose a reason for hiding this comment

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

ok

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done!

Copy link
Contributor

Choose a reason for hiding this comment

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

There are still some System.out.println calls in Util.java, could you change those as well?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done!

return setN;
}

public static Map parseHashMap(DSMap m){
Copy link
Contributor

Choose a reason for hiding this comment

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

Map, List, Set, etc. should be parameterized (e.g. Map<String, String>)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done!

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm still seeing unparameterized references to ArrayList, List, and Set in Util.java, please change those as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done!

}
}
if (endpoint.getElement().toString().isEmpty()) {
configFault("Empty End-Point");
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be okay to have an empty endpoint? (Since you handle that case on line 55 of Util.java)

Copy link
Author

Choose a reason for hiding this comment

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

In Util we included because we were testing for local DynamoDB. But for clound connection this is mandatory field.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is always the case. I commented out that check and was able to connect without specifying an endpoint, region was enough.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We tested with local dynamodb. commenting out and without specifying endurl we are getting "java.lang.IllegalStateException: The security token included in the request is invalid. (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: UnrecognizedClientException; Request ID: GRR8OEUBBU2EMMH8L4L3MU4A7JVV4KQNSO5AEMVJF66Q9ASUAAJG)
".

So not sure how it behaves with cloud dynamodb. So is it possible if you have test accesskey and secretkey to share us? So that we test at our end. But we feel there is no harm to keep this code snippet.

}
};
act.addParameter(Constants.TABLENAME, DSValueType.STRING, "Table Name");
act.addParameter(Constants.PROJECTIONEXPRESSION, DSValueType.STRING, "ProjectionExpression");
Copy link
Contributor

Choose a reason for hiding this comment

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

We really need some documentation on how to use all these actions (Query, Scan, Put Item, etc.)

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Great! Could you set that as the help url? Currently it just reads "TODO : Need to upload in github"

Copy link
Collaborator

Choose a reason for hiding this comment

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

done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants