Skip to content

Conversation

@jongyoul
Copy link
Member

@jongyoul jongyoul commented Dec 6, 2015

Changed multiple statements to multiple connection. Some JDBC don't support parallel executions with one connection.

- keyConnectionMap -> propertyKeyConnectionMap
- Multiple Statements -> multiple connections
@prasadwagle
Copy link

I tested the pull request and it allowed Vertica queries to execute in parallel with one modification. Thanks!

I had to comment:
// if (statement.isClosed()) {
// connection = getConnection(propertyKey);
// statement = connection.createStatement();
// }
since I ran into:
java.lang.AbstractMethodError: com.vertica.jdbc.VerticaStatementImpl.isClosed()Z
at org.apache.zeppelin.hive.HiveInterpreter.getStatement(HiveInterpreter.java:208)

Can you help me understand the need for the statement.isClosed() check in line 208 since the statement is created in line 207?

@jongyoul
Copy link
Member Author

jongyoul commented Dec 6, 2015

It's soft of defensive code for avoiding error. Do you think it's redundant? I'll fix this code more general :-). Thanks for the review quickly.

- Fix the error when statement doesn't support isClosed method
@jongyoul jongyoul closed this Dec 7, 2015
@jongyoul jongyoul reopened this Dec 7, 2015
@jongyoul
Copy link
Member Author

jongyoul commented Dec 8, 2015

@praagarw Could you please review this PR again?

@prasadwagle
Copy link

Hi Jongyoul, since createStatement is implemented in the JDBC drivers, I think it is unlikely it will return a closed statement. However, I am all for defensive coding and your fix in ZEPPELIN-487 looks good to me.

@jongyoul
Copy link
Member Author

jongyoul commented Dec 9, 2015

@praagarw Sure, but I couldn't guarantee all of jdbc connections create statement when it's alive. Thus double check might be helpful in that case. And thanks for kind review. I'm merging in three day.

@jongyoul
Copy link
Member Author

jongyoul commented Dec 9, 2015

Merging without additional discussion

@asfgit asfgit closed this in 82af1e7 Dec 14, 2015
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.

2 participants