-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: develop
Are you sure you want to change the base?
Conversation
src/main/java/org/iot/dsa/dslink/dynamodb/DynamoDBDSAClient.java
Outdated
Show resolved
Hide resolved
ListTablesResult tables = client.listTables(); | ||
List tnames = tables.getTableNames(); | ||
for(int i = 0 ; i < tnames.size();i++){ | ||
System.out.println(tnames.get(i)); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
src/main/java/org/iot/dsa/dslink/dynamodb/DynamoDBDSAClient.java
Outdated
Show resolved
Hide resolved
return setN; | ||
} | ||
|
||
public static Map parseHashMap(DSMap m){ |
There was a problem hiding this comment.
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>)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
src/main/java/org/iot/dsa/dslink/dynamodb/DynamoDBDSAClient.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
if (endpoint.getElement().toString().isEmpty()) { | ||
configFault("Empty End-Point"); |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
No description provided.