[jira] [Commented] (GEODE-8567) CI Failure: ConcurrentSerialGatewaySenderOperationsDistributedTest > testRestartSerialGatewaySendersWhilePutting
[ https://issues.apache.org/jira/browse/GEODE-8567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227754#comment-17227754 ] Geode Integration commented on GEODE-8567: -- Seen in [DistributedTestOpenJDK8 #607|https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/DistributedTestOpenJDK8/builds/607] ... see [test results|http://files.apachegeode-ci.info/builds/apache-develop-main/1.14.0-build.0471/test-results/distributedTest/1604710695/] or download [artifacts|http://files.apachegeode-ci.info/builds/apache-develop-main/1.14.0-build.0471/test-artifacts/1604710695/distributedtestfiles-OpenJDK8-1.14.0-build.0471.tgz]. > CI Failure: ConcurrentSerialGatewaySenderOperationsDistributedTest > > testRestartSerialGatewaySendersWhilePutting > > > Key: GEODE-8567 > URL: https://issues.apache.org/jira/browse/GEODE-8567 > Project: Geode > Issue Type: Improvement > Components: wan >Reporter: Owen Nichols >Priority: Major > > ConcurrentSerialGatewaySenderOperationsDistributedTest > > testRestartSerialGatewaySendersWhilePutting[1: numDispatchers=3] FAILED > seen in > [DistributedTestOpenJDK11|https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/DistributedTestOpenJDK11/builds/490] > #490 > > Task :geode-wan:distributedTest > org.apache.geode.internal.cache.wan.concurrent.ConcurrentSerialGatewaySenderOperationsDistributedTest > > testRestartSerialGatewaySendersWhilePutting[1: numDispatchers=3] FAILED > org.apache.geode.test.dunit.RMIException: While invoking > org.apache.geode.internal.cache.wan.serial.SerialGatewaySenderOperationsDistributedTest$$Lambda$490/0x00010094b040.run > in VM 5 running on Host 60d64fc07216 with 8 VMs > Caused by: > org.awaitility.core.ConditionTimeoutException: Assertion condition > defined as a lambda expression in > org.apache.geode.internal.cache.wan.serial.SerialGatewaySenderOperationsDistributedTest > that uses org.apache.geode.internal.cache.wan.InternalGatewaySender, > org.apache.geode.internal.cache.wan.InternalGatewaySenderint [Sender > statistics unprocessed event map size] expected:<[0]> but was:<[2]> within 5 > minutes. > Caused by: > org.junit.ComparisonFailure: [Sender statistics unprocessed event > map size] expected:<[0]> but was:<[2]> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-= Test Results URI > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > [*http://files.apachegeode-ci.info/builds/apache-develop-main/1.14.0-build.0380/test-results/distributedTest/1601531249/*] > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > Test report artifacts from this job are available at: > [*http://files.apachegeode-ci.info/builds/apache-develop-main/1.14.0-build.0380/test-artifacts/1601531249/distributedtestfiles-OpenJDK11-1.14.0-build.0380.tgz*] -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-8626) Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
[ https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227755#comment-17227755 ] ASF GitHub Bot commented on GEODE-8626: --- masaki-yamakawa commented on a change in pull request #5637: URL: https://github.com/apache/geode/pull/5637#discussion_r519153030 ## File path: geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/CacheXmlJdbcMappingIntegrationTest.java ## @@ -0,0 +1,89 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.connectors.jdbc; + +import static org.apache.geode.test.util.ResourceUtils.createTempFileFromResource; + +import org.junit.Rule; +import org.junit.contrib.java.lang.system.RestoreSystemProperties; + +import org.apache.geode.cache.CacheFactory; +import org.apache.geode.internal.cache.InternalCache; + +public class CacheXmlJdbcMappingIntegrationTest extends JdbcMappingIntegrationTest { + + @Rule + public RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties(); + + @Override + protected InternalCache createCacheAndCreateJdbcMapping(String cacheXmlTestName) + throws Exception { +String url = dbRule.getConnectionUrl().replaceAll("&", "&"); Review comment: When expanding Java system properties like `` in cache.xml and the connection string contains '?' such as `jdbc:mysql://localhost:3306?user=root&useSSL=false`, if the connection string is not escaped, an error will occur when connecting to the database. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Omitting field-mapping tag of cache.xml when using Simple JDBC Connector > > > Key: GEODE-8626 > URL: https://issues.apache.org/jira/browse/GEODE-8626 > Project: Geode > Issue Type: Improvement > Components: jdbc >Reporter: Masaki Yamakawa >Priority: Minor > Labels: pull-request-available > > When configuring Simple JDBC Connector with gfsh, I don't need to create > field-mapping, the default field-mapping will be created from pdx and table > meta data. > On the other hand, when using cache.xml(cluster.xml), pdx and table meta data > cannot be used, and field-mapping must be described in cache.xml. > I would like to create field-mapping defaults based on pdx and table meta > data when using cache.xml. > If field-mapping is specified in cache.xml, the xml setting has priority, and > only if there are no field-mapping tags. > cache.xml will be as follows: > {code:java} > > data-source="TestDataSource" > table="employees" > pdx-name="org.apache.geode.connectors.jdbc.Employee" > ids="id"> > > > > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-8626) Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
[ https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227756#comment-17227756 ] ASF GitHub Bot commented on GEODE-8626: --- masaki-yamakawa commented on a change in pull request #5637: URL: https://github.com/apache/geode/pull/5637#discussion_r519153095 ## File path: geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/GfshJdbcMappingIntegrationTest.java ## @@ -0,0 +1,208 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.connectors.jdbc; + +import java.lang.reflect.Constructor; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Set; + +import org.apache.geode.cache.CacheFactory; +import org.apache.geode.cache.configuration.JndiBindingsType; +import org.apache.geode.cache.configuration.RegionConfig; +import org.apache.geode.cache.execute.Function; +import org.apache.geode.cache.execute.ResultCollector; +import org.apache.geode.connectors.jdbc.internal.cli.CreateMappingFunction; +import org.apache.geode.connectors.jdbc.internal.cli.CreateMappingPreconditionCheckFunction; +import org.apache.geode.connectors.jdbc.internal.configuration.FieldMapping; +import org.apache.geode.connectors.jdbc.internal.configuration.RegionMapping; +import org.apache.geode.distributed.DistributedMember; +import org.apache.geode.internal.cache.InternalCache; +import org.apache.geode.management.configuration.RegionType; +import org.apache.geode.management.internal.cli.commands.CreateJndiBindingCommand; +import org.apache.geode.management.internal.cli.functions.CreateJndiBindingFunction; +import org.apache.geode.management.internal.cli.functions.CreateRegionFunctionArgs; +import org.apache.geode.management.internal.cli.functions.RegionCreateFunction; +import org.apache.geode.management.internal.configuration.converters.RegionConverter; +import org.apache.geode.management.internal.functions.CliFunctionResult; +import org.apache.geode.management.internal.util.ManagementUtils; + +public class GfshJdbcMappingIntegrationTest extends JdbcMappingIntegrationTest { + + @Override + protected InternalCache createCacheAndCreateJdbcMapping(String cacheXmlTestName) + throws Exception { +InternalCache cache = +(InternalCache) new CacheFactory().set("locators", "").set("mcast-port", "0").create(); +Set targetMembers = findMembers(cache, null, null); + +CliFunctionResult createRegionFuncResult = executeCreateRegionFunction(targetMembers); Review comment: I understand that it is recommended to use GfshRule. With this change, I would like to achieve the same behavior in gfsh command and cache.xml. So I have implimented `JdbcMappingIntegrationTest` class to standardize tests. I have used the internal functions because some parts of GfshRule can not verify in case of errors. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Omitting field-mapping tag of cache.xml when using Simple JDBC Connector > > > Key: GEODE-8626 > URL: https://issues.apache.org/jira/browse/GEODE-8626 > Project: Geode > Issue Type: Improvement > Components: jdbc >Reporter: Masaki Yamakawa >Priority: Minor > Labels: pull-request-available > > When configuring Simple JDBC Connector with gfsh, I don't need to create > field-mapping, the default field-mapping will be created from pdx and table > meta data. > On the other hand, when using cache.xml(cluster.xml), pdx and table meta data > cannot be used, and field-mapping must be described in cache.xml. > I would like to create field-mapping defaults based on pdx and table meta > data when using cache.xml. > If field-mapping is specified in cache.x
[jira] [Commented] (GEODE-8626) Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
[ https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227757#comment-17227757 ] ASF GitHub Bot commented on GEODE-8626: --- masaki-yamakawa commented on a change in pull request #5637: URL: https://github.com/apache/geode/pull/5637#discussion_r519153180 ## File path: geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java ## @@ -1142,7 +1142,7 @@ public void createMappingWithExistingQueueFails() { + " must not already exist."); } - private static class Employee implements PdxSerializable { + public static class Employee implements PdxSerializable { Review comment: In the test, `CreatemappingPreconditionCheckFunction` is called and executed on several JVMs(Distributed members). In this Function, PDX class such as Employee is instantiated, so I need to be able to access this class even if it runs on another JVM. If it is in private scope, the following exceptions will be thrown ``` [error 2020/11/07 12:08:19.411 JST tid=69] Could not generate a PdxType for the class org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommandDUnitTest$IdAndName because it did not have a public zero arg constructor. Details: java.lang.IllegalAccessException: Class org.apache.geode.connectors.jdbc.internal.JdbcConnectorServiceImpl can not access a member of class org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommandDUnitTest$IdAndName with modifiers "public" org.apache.geode.connectors.jdbc.JdbcConnectorException: Could not generate a PdxType for the class org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommandDUnitTest$IdAndName because it did not have a public zero arg constructor. Details: java.lang.IllegalAccessException: Class org.apache.geode.connectors.jdbc.internal.JdbcConnectorServiceImpl can not access a member of class org.apache.geode.connectors.jdbc.internal.cli.CreateMappingCommandDUnitTest$IdAndName with modifiers "public" at org.apache.geode.connectors.jdbc.internal.JdbcConnectorServiceImpl.createInstance(JdbcConnectorServiceImpl.java:361) at org.apache.geode.connectors.jdbc.internal.JdbcConnectorServiceImpl.generatePdxTypeForClass(JdbcConnectorServiceImpl.java:334) at org.apache.geode.connectors.jdbc.internal.JdbcConnectorServiceImpl.getPdxTypeForClass(JdbcConnectorServiceImpl.java:320) at org.apache.geode.connectors.jdbc.internal.cli.CreateMappingPreconditionCheckFunction.executeFunction(CreateMappingPreconditionCheckFunction.java:74) at org.apache.geode.management.cli.CliFunction.execute(CliFunction.java:37) ... ``` Other similar tests like CreateMapingCommandForProxyRegionDUnitTest are also public scope. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Omitting field-mapping tag of cache.xml when using Simple JDBC Connector > > > Key: GEODE-8626 > URL: https://issues.apache.org/jira/browse/GEODE-8626 > Project: Geode > Issue Type: Improvement > Components: jdbc >Reporter: Masaki Yamakawa >Priority: Minor > Labels: pull-request-available > > When configuring Simple JDBC Connector with gfsh, I don't need to create > field-mapping, the default field-mapping will be created from pdx and table > meta data. > On the other hand, when using cache.xml(cluster.xml), pdx and table meta data > cannot be used, and field-mapping must be described in cache.xml. > I would like to create field-mapping defaults based on pdx and table meta > data when using cache.xml. > If field-mapping is specified in cache.xml, the xml setting has priority, and > only if there are no field-mapping tags. > cache.xml will be as follows: > {code:java} > > data-source="TestDataSource" > table="employees" > pdx-name="org.apache.geode.connectors.jdbc.Employee" > ids="id"> > > > > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-8626) Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
[ https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227758#comment-17227758 ] ASF GitHub Bot commented on GEODE-8626: --- masaki-yamakawa commented on a change in pull request #5637: URL: https://github.com/apache/geode/pull/5637#discussion_r519153248 ## File path: geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java ## @@ -1185,7 +1185,7 @@ public void fromData(PdxReader reader) { } } - private static class EmployeeNumeric implements PdxSerializerObject { + public static class EmployeeNumeric implements PdxSerializerObject { Review comment: The reason is the same as previous one. ## File path: geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java ## @@ -1234,7 +1234,7 @@ void setRefid(long refid) { } } - private static class IdAndName implements PdxSerializable { + public static class IdAndName implements PdxSerializable { Review comment: The reason is the same as previous one. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Omitting field-mapping tag of cache.xml when using Simple JDBC Connector > > > Key: GEODE-8626 > URL: https://issues.apache.org/jira/browse/GEODE-8626 > Project: Geode > Issue Type: Improvement > Components: jdbc >Reporter: Masaki Yamakawa >Priority: Minor > Labels: pull-request-available > > When configuring Simple JDBC Connector with gfsh, I don't need to create > field-mapping, the default field-mapping will be created from pdx and table > meta data. > On the other hand, when using cache.xml(cluster.xml), pdx and table meta data > cannot be used, and field-mapping must be described in cache.xml. > I would like to create field-mapping defaults based on pdx and table meta > data when using cache.xml. > If field-mapping is specified in cache.xml, the xml setting has priority, and > only if there are no field-mapping tags. > cache.xml will be as follows: > {code:java} > > data-source="TestDataSource" > table="employees" > pdx-name="org.apache.geode.connectors.jdbc.Employee" > ids="id"> > > > > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-8626) Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
[ https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227759#comment-17227759 ] ASF GitHub Bot commented on GEODE-8626: --- masaki-yamakawa commented on a change in pull request #5637: URL: https://github.com/apache/geode/pull/5637#discussion_r519153312 ## File path: geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/JdbcConnectorServiceImpl.java ## @@ -210,4 +224,152 @@ private TableMetaDataView getTableMetaDataView(RegionMapping regionMapping, + regionMapping.getDataSourceName() + "\": ", ex); } } + + @Override + public TableMetaDataView getTableMetaDataView(RegionMapping regionMapping) { +DataSource dataSource = getDataSource(regionMapping.getDataSourceName()); +if (dataSource == null) { + throw new JdbcConnectorException("No datasource \"" + regionMapping.getDataSourceName() + + "\" found when getting table meta data \"" + regionMapping.getRegionName() + "\""); Review comment: The data source is used to get the table metadata. I would like to confirm your suggestion. Your suggestion is the following, right? ``` if (dataSource == null) { // throw new JdbcConnectorException("No datasource \"" + regionMapping.getDataSourceName() // + "\" found when getting table meta data \"" + regionMapping.getRegionName() + "\""); throw new JdbcConnectorException(); } ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Omitting field-mapping tag of cache.xml when using Simple JDBC Connector > > > Key: GEODE-8626 > URL: https://issues.apache.org/jira/browse/GEODE-8626 > Project: Geode > Issue Type: Improvement > Components: jdbc >Reporter: Masaki Yamakawa >Priority: Minor > Labels: pull-request-available > > When configuring Simple JDBC Connector with gfsh, I don't need to create > field-mapping, the default field-mapping will be created from pdx and table > meta data. > On the other hand, when using cache.xml(cluster.xml), pdx and table meta data > cannot be used, and field-mapping must be described in cache.xml. > I would like to create field-mapping defaults based on pdx and table meta > data when using cache.xml. > If field-mapping is specified in cache.xml, the xml setting has priority, and > only if there are no field-mapping tags. > cache.xml will be as follows: > {code:java} > > data-source="TestDataSource" > table="employees" > pdx-name="org.apache.geode.connectors.jdbc.Employee" > ids="id"> > > > > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-8626) Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
[ https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227760#comment-17227760 ] ASF GitHub Bot commented on GEODE-8626: --- masaki-yamakawa commented on a change in pull request #5637: URL: https://github.com/apache/geode/pull/5637#discussion_r519153350 ## File path: geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/xml/RegionMappingConfiguration.java ## @@ -62,4 +77,17 @@ private void createRegionMapping(JdbcConnectorService service, throw new InternalGemFireException(e); } } + + private Class loadPdxClass(String className) { +try { + return loadClass(className); Review comment: I have fixed this part. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Omitting field-mapping tag of cache.xml when using Simple JDBC Connector > > > Key: GEODE-8626 > URL: https://issues.apache.org/jira/browse/GEODE-8626 > Project: Geode > Issue Type: Improvement > Components: jdbc >Reporter: Masaki Yamakawa >Priority: Minor > Labels: pull-request-available > > When configuring Simple JDBC Connector with gfsh, I don't need to create > field-mapping, the default field-mapping will be created from pdx and table > meta data. > On the other hand, when using cache.xml(cluster.xml), pdx and table meta data > cannot be used, and field-mapping must be described in cache.xml. > I would like to create field-mapping defaults based on pdx and table meta > data when using cache.xml. > If field-mapping is specified in cache.xml, the xml setting has priority, and > only if there are no field-mapping tags. > cache.xml will be as follows: > {code:java} > > data-source="TestDataSource" > table="employees" > pdx-name="org.apache.geode.connectors.jdbc.Employee" > ids="id"> > > > > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-8626) Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
[ https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227761#comment-17227761 ] ASF GitHub Bot commented on GEODE-8626: --- masaki-yamakawa commented on a change in pull request #5637: URL: https://github.com/apache/geode/pull/5637#discussion_r519153380 ## File path: geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingPreconditionCheckFunctionTest.java ## @@ -172,16 +168,6 @@ public void executeFunctionThrowsIfDataSourceDoesNotExist() { + DATA_SOURCE_NAME + "'."); } - @Test Review comment: I changed `CreateMappingPreconditionCheckFunction` class to use `JdbcConnectorService.getTableMetaDataView(regionMapping)`. This test covered by `JdbcConnectorServiceTest.getTableMetaDataViewThrowsExceptionWhenGetConnectionHasSqlException`. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Omitting field-mapping tag of cache.xml when using Simple JDBC Connector > > > Key: GEODE-8626 > URL: https://issues.apache.org/jira/browse/GEODE-8626 > Project: Geode > Issue Type: Improvement > Components: jdbc >Reporter: Masaki Yamakawa >Priority: Minor > Labels: pull-request-available > > When configuring Simple JDBC Connector with gfsh, I don't need to create > field-mapping, the default field-mapping will be created from pdx and table > meta data. > On the other hand, when using cache.xml(cluster.xml), pdx and table meta data > cannot be used, and field-mapping must be described in cache.xml. > I would like to create field-mapping defaults based on pdx and table meta > data when using cache.xml. > If field-mapping is specified in cache.xml, the xml setting has priority, and > only if there are no field-mapping tags. > cache.xml will be as follows: > {code:java} > > data-source="TestDataSource" > table="employees" > pdx-name="org.apache.geode.connectors.jdbc.Employee" > ids="id"> > > > > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-8626) Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
[ https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227762#comment-17227762 ] ASF GitHub Bot commented on GEODE-8626: --- masaki-yamakawa commented on a change in pull request #5637: URL: https://github.com/apache/geode/pull/5637#discussion_r519153415 ## File path: geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingPreconditionCheckFunctionTest.java ## @@ -306,45 +292,10 @@ public void executeFunctionThrowsGivenPdxSerializableWithNoZeroArgConstructor() "Could not generate a PdxType for the class org.apache.geode.connectors.jdbc.internal.cli.CreateMappingPreconditionCheckFunctionTest$PdxClassDummyNoZeroArg because it did not have a public zero arg constructor. Details: java.lang.NoSuchMethodException: org.apache.geode.connectors.jdbc.internal.cli.CreateMappingPreconditionCheckFunctionTest$PdxClassDummyNoZeroArg.()"); } - @Test Review comment: As you mentioned, I have moved some methods. In addition, I have reduced the the particle size of the test. The corresponding test for `executionFuncationGivenNonPdxUsesReflectionBasedAutoSerializer` is `JdbcConnectorServiceTest.getPdxTypepeForClassSucceedsWithGive nonPdxUsesReflectionBasedAutoSerializer`. This test verify the PdxType. And then, the PdxType is specified to `createDefaultFieldMapping` to create the FieldMapping. createDefaultFieldMapping is tested with `JdbcConnectorServiceTest.createDefaultFieldMappingXXX`, which verify the FieldMapping at this level. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Omitting field-mapping tag of cache.xml when using Simple JDBC Connector > > > Key: GEODE-8626 > URL: https://issues.apache.org/jira/browse/GEODE-8626 > Project: Geode > Issue Type: Improvement > Components: jdbc >Reporter: Masaki Yamakawa >Priority: Minor > Labels: pull-request-available > > When configuring Simple JDBC Connector with gfsh, I don't need to create > field-mapping, the default field-mapping will be created from pdx and table > meta data. > On the other hand, when using cache.xml(cluster.xml), pdx and table meta data > cannot be used, and field-mapping must be described in cache.xml. > I would like to create field-mapping defaults based on pdx and table meta > data when using cache.xml. > If field-mapping is specified in cache.xml, the xml setting has priority, and > only if there are no field-mapping tags. > cache.xml will be as follows: > {code:java} > > data-source="TestDataSource" > table="employees" > pdx-name="org.apache.geode.connectors.jdbc.Employee" > ids="id"> > > > > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-8626) Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
[ https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227763#comment-17227763 ] ASF GitHub Bot commented on GEODE-8626: --- masaki-yamakawa commented on pull request #5637: URL: https://github.com/apache/geode/pull/5637#issuecomment-723419059 @jchen21 Thank you for your review. I have fixed some of the source code and added comments. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Omitting field-mapping tag of cache.xml when using Simple JDBC Connector > > > Key: GEODE-8626 > URL: https://issues.apache.org/jira/browse/GEODE-8626 > Project: Geode > Issue Type: Improvement > Components: jdbc >Reporter: Masaki Yamakawa >Priority: Minor > Labels: pull-request-available > > When configuring Simple JDBC Connector with gfsh, I don't need to create > field-mapping, the default field-mapping will be created from pdx and table > meta data. > On the other hand, when using cache.xml(cluster.xml), pdx and table meta data > cannot be used, and field-mapping must be described in cache.xml. > I would like to create field-mapping defaults based on pdx and table meta > data when using cache.xml. > If field-mapping is specified in cache.xml, the xml setting has priority, and > only if there are no field-mapping tags. > cache.xml will be as follows: > {code:java} > > data-source="TestDataSource" > table="employees" > pdx-name="org.apache.geode.connectors.jdbc.Employee" > ids="id"> > > > > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GEODE-8626) Omitting field-mapping tag of cache.xml when using Simple JDBC Connector
[ https://issues.apache.org/jira/browse/GEODE-8626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227775#comment-17227775 ] ASF GitHub Bot commented on GEODE-8626: --- masaki-yamakawa commented on a change in pull request #5637: URL: https://github.com/apache/geode/pull/5637#discussion_r519153415 ## File path: geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingPreconditionCheckFunctionTest.java ## @@ -306,45 +292,10 @@ public void executeFunctionThrowsGivenPdxSerializableWithNoZeroArgConstructor() "Could not generate a PdxType for the class org.apache.geode.connectors.jdbc.internal.cli.CreateMappingPreconditionCheckFunctionTest$PdxClassDummyNoZeroArg because it did not have a public zero arg constructor. Details: java.lang.NoSuchMethodException: org.apache.geode.connectors.jdbc.internal.cli.CreateMappingPreconditionCheckFunctionTest$PdxClassDummyNoZeroArg.()"); } - @Test Review comment: As you mentioned, I have moved some methods. In addition, I have reduced the the particle size of the test. The corresponding test for `executionFuncationGivenNonPdxUsesReflectionBasedAutoSerializer` is `JdbcConnectorServiceTest.getPdxTypeForClassSucceedsWithGivenNonPdxUsesReflectionBasedAutoSerializer`. This test verify the PdxType. And then, the PdxType is specified to `createDefaultFieldMapping` to create the FieldMapping. createDefaultFieldMapping is tested with `JdbcConnectorServiceTest.createDefaultFieldMappingXXX`, which verify the FieldMapping at this level. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Omitting field-mapping tag of cache.xml when using Simple JDBC Connector > > > Key: GEODE-8626 > URL: https://issues.apache.org/jira/browse/GEODE-8626 > Project: Geode > Issue Type: Improvement > Components: jdbc >Reporter: Masaki Yamakawa >Priority: Minor > Labels: pull-request-available > > When configuring Simple JDBC Connector with gfsh, I don't need to create > field-mapping, the default field-mapping will be created from pdx and table > meta data. > On the other hand, when using cache.xml(cluster.xml), pdx and table meta data > cannot be used, and field-mapping must be described in cache.xml. > I would like to create field-mapping defaults based on pdx and table meta > data when using cache.xml. > If field-mapping is specified in cache.xml, the xml setting has priority, and > only if there are no field-mapping tags. > cache.xml will be as follows: > {code:java} > > data-source="TestDataSource" > table="employees" > pdx-name="org.apache.geode.connectors.jdbc.Employee" > ids="id"> > > > > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)