-
Notifications
You must be signed in to change notification settings - Fork 297
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
Athena to Amazon Neptune connector code #222
Athena to Amazon Neptune connector code #222
Conversation
fixed issue with span function for null values
Thanks Abhishek, per our chime chat I'll get you some feedback tomorrow. Very excited that you and the team have been working on this. |
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.
Looks like a reasonable starting point. Most of my comments are easy to address. The most meaningful comment is about moving RecordHandler to use the extractor framework which is significantly faster (2x-4x) than the current structuring used.
athena-neptune/src/main/java/com/amazonaws/athena/connectors/neptune/NeptuneRecordHandler.java
Outdated
Show resolved
Hide resolved
athena-neptune/src/main/java/com/amazonaws/athena/connectors/neptune/TypeUtils.java
Outdated
Show resolved
Hide resolved
...eptune/src/test/java/com/amazonaws/athena/connectors/neptune/NeptuneMetadataHandlerTest.java
Show resolved
Hide resolved
...eptune/src/test/java/com/amazonaws/athena/connectors/neptune/NeptuneMetadataHandlerTest.java
Outdated
Show resolved
Hide resolved
...eptune/src/test/java/com/amazonaws/athena/connectors/neptune/NeptuneMetadataHandlerTest.java
Outdated
Show resolved
Hide resolved
Hey team, any updates here? |
Done with code review comments and additional code related to mocking up RecordHandler Test . Sending new pull request |
Sending new pull request |
Re-opening as requested to have context of changes |
2Fixed most of the checkstyle issues except for import ordr and wld crd
@abhishekpradeepmishra Ill get you feedback in the next 24hrs, sorry for the delay. |
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 do not generally commit .gitignore in our projects. Can you remove this file?
athena-neptune/src/main/java/com/amazonaws/athena/connectors/neptune/NeptuneRecordHandler.java
Outdated
Show resolved
Hide resolved
athena-neptune/src/main/java/com/amazonaws/athena/connectors/neptune/TypeRowWriter.java
Outdated
Show resolved
Hide resolved
athena-neptune/src/main/java/com/amazonaws/athena/connectors/neptune/TypeRowWriter.java
Outdated
Show resolved
Hide resolved
athena-neptune/src/main/java/com/amazonaws/athena/connectors/neptune/NeptuneRecordHandler.java
Show resolved
Hide resolved
@@ -158,16 +157,20 @@ protected void readWithConstraint(final BlockSpiller spiller, final ReadRecordsR | |||
final Map<Object, Object> obj = graphTraversalFinal.next(); | |||
return (rowWriter.writeRow(block, rowNum, (Object) obj) ? 1 : 0); | |||
}); | |||
} catch (final Exception e) { | |||
} | |||
catch (final Exception e) { | |||
logger.info("readWithContraint: Exception occured " + e); |
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.
You need to re-throw this exception otherwise a customer using Athena will not see a useful error message. They might only see empty results and not even know there was an error.
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.
Removed internal try catch block
@@ -158,16 +157,20 @@ protected void readWithConstraint(final BlockSpiller spiller, final ReadRecordsR | |||
final Map<Object, Object> obj = graphTraversalFinal.next(); | |||
return (rowWriter.writeRow(block, rowNum, (Object) obj) ? 1 : 0); | |||
}); | |||
} catch (final Exception e) { | |||
} | |||
catch (final Exception e) { |
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.
Catching Exception is a bad practice, please catch only RuntimeException + any specific checked exceptions that the code requires (for example IOException is a specific exception that the compiler will complain about if code in your 'try' can throw it but you dont have a corresponding catch.
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.
Fixed.
athena-neptune/src/main/java/com/amazonaws/athena/connectors/neptune/NeptuneRecordHandler.java
Outdated
Show resolved
Hide resolved
.settings/org.eclipse.m2e.core.prefs | ||
.vscode/settings.json |
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 do not typically commit the .gitignore file to our project.
@abhishekpradeepmishra Great progress! I posted a few new comments but they are mostly minor. I resolved ~100 of the previously opened comments. Getting very close! Let me know what you are ready for another review. |
Changes to SAR YAMl
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.
looks good to me. I think this is ready to be merged. Thanks for working with us on this contribution.
Looks like there are a few checkstyle issues as you mentioned on IM. Let me know when you have these resolved and I can do a final review before merging. I'll also speak with the team to see when we can schedule final testing and deployment to serverless application repository on our side. @abhishekpradeepmishra |
Do not merge yet, im discussing 1 issue with the team |
@abhishekpradeepmishra and @sandeepveldi Thanks for this awesome contribution! I'll work with the team to get this into the next official release and also get a pre-built version into Serverless Application Repository. |
cool, thanks for guidance |
Thank you @avirtuos. |
Initial merge of Athena's Neptune connector. Co-authored-by: Sandeep Veldi <veldi@amazon.com>
Issue #, if available:
Description of changes:
Athena to Amazon Neptune connector code
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.