phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-956) Connection properties ignored
Date Fri, 02 May 2014 05:26:18 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13987349#comment-13987349
] 

Hudson commented on PHOENIX-956:
--------------------------------

SUCCESS: Integrated in Phoenix #222 (See [https://builds.apache.org/job/Phoenix/222/])
PHOENIX-956 Connection properties ignored (SamarthJain) (jtaylor: rev e7cd8b960b221e68bf7afe01c954928dc51ac973)
* phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixDriverTest.java
* phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java


> Connection properties ignored
> -----------------------------
>
>                 Key: PHOENIX-956
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-956
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>         Environment: Win 7
>            Reporter: Cristian Armaselu
>            Assignee: Samarth Jain
>             Fix For: 5.0.0, 3.1, 4.1
>
>         Attachments: PHOENIX-956_v2.patch
>
>
> Connection opened as:
>             Properties connectionProperties = new Properties();
>             connectionProperties.setProperty(QueryServices.MAX_MUTATION_SIZE_ATTRIB,"10000000");
>             connectionProperties.setProperty(QueryServices.IMMUTABLE_ROWS_ATTRIB,"10000000");
>             connection = DriverManager.getConnection("jdbc:phoenix:ulvdtlchd01:2181",connectionProperties);
> Executing:
> preparedStatement = connection.prepareStatement("upsert into cristi_test(id,name,other)
values(?,?,?)");
> for (int i = 0; i < 10000000; i++) {
>                 preparedStatement.setString(1, "AAAA" + i);
>                 preparedStatement.setString(2, "BBBB" + i);
>                 preparedStatement.setString(3, "cccc" + i);
>                 preparedStatement.execute();
> }
> Getting:
> java.lang.IllegalArgumentException: MutationState size of 500001 is bigger than max allowed
size of 500000
> 	at org.apache.phoenix.execute.MutationState.throwIfTooBig(MutationState.java:114)
> 	at org.apache.phoenix.execute.MutationState.join(MutationState.java:163)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:227)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:185)
> 	at org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:146)
> 	at org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:151)
> Because:
> In PhoenixConnection constructor :
> this.info = info == null ? new Properties() : new Properties(info);
> info passed to the constructor is size 3
> the above is not copying the properties so the below is executed
>         if (this.info.isEmpty() && tenantId == null) {
>             this.services = services;
> since this.info.isEmpty() is true
> That means the passed info connection properties are ignored and not wrapped in the DelegateConnectionQueryServices
which follows the other branch of the if above



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message