[jira] [Commented] (GEODE-8802) Clarify mcast-port default in Docs

2020-12-22 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/GEODE-8802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17253813#comment-17253813
 ] 

ASF GitHub Bot commented on GEODE-8802:
---

karensmolermiller opened a new pull request #5872:
URL: https://github.com/apache/geode/pull/5872


   
   



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


> Clarify mcast-port default in Docs
> --
>
> Key: GEODE-8802
> URL: https://issues.apache.org/jira/browse/GEODE-8802
> Project: Geode
>  Issue Type: Improvement
>  Components: docs
>Reporter: Karen Smoler Miller
>Assignee: Karen Smoler Miller
>Priority: Major
>
> In 
> [https://geode.apache.org/docs/guide/113/configuring/running/firewalls_ports.html,]
>  in the subsection called Default Port Configurations, the default port value 
> for mcast-port is not quite correct.  It says the default is 10334.  It 
> should instead say that the default is 0 when the locators property is set, 
> and 10334 when the locators property is not set.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (GEODE-8802) Clarify mcast-port default in Docs

2020-12-22 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-8802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated GEODE-8802:
--
Labels: pull-request-available  (was: )

> Clarify mcast-port default in Docs
> --
>
> Key: GEODE-8802
> URL: https://issues.apache.org/jira/browse/GEODE-8802
> Project: Geode
>  Issue Type: Improvement
>  Components: docs
>Reporter: Karen Smoler Miller
>Assignee: Karen Smoler Miller
>Priority: Major
>  Labels: pull-request-available
>
> In 
> [https://geode.apache.org/docs/guide/113/configuring/running/firewalls_ports.html,]
>  in the subsection called Default Port Configurations, the default port value 
> for mcast-port is not quite correct.  It says the default is 10334.  It 
> should instead say that the default is 0 when the locators property is set, 
> and 10334 when the locators property is not set.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (GEODE-8802) Clarify mcast-port default in Docs

2020-12-22 Thread Karen Smoler Miller (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-8802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karen Smoler Miller reassigned GEODE-8802:
--

Assignee: Karen Smoler Miller

> Clarify mcast-port default in Docs
> --
>
> Key: GEODE-8802
> URL: https://issues.apache.org/jira/browse/GEODE-8802
> Project: Geode
>  Issue Type: Improvement
>  Components: docs
>Reporter: Karen Smoler Miller
>Assignee: Karen Smoler Miller
>Priority: Major
>
> In 
> [https://geode.apache.org/docs/guide/113/configuring/running/firewalls_ports.html,]
>  in the subsection called Default Port Configurations, the default port value 
> for mcast-port is not quite correct.  It says the default is 10334.  It 
> should instead say that the default is 0 when the locators property is set, 
> and 10334 when the locators property is not set.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (GEODE-8802) Clarify mcast-port default in Docs

2020-12-22 Thread Karen Smoler Miller (Jira)
Karen Smoler Miller created GEODE-8802:
--

 Summary: Clarify mcast-port default in Docs
 Key: GEODE-8802
 URL: https://issues.apache.org/jira/browse/GEODE-8802
 Project: Geode
  Issue Type: Improvement
  Components: docs
Reporter: Karen Smoler Miller


In 
[https://geode.apache.org/docs/guide/113/configuring/running/firewalls_ports.html,]
 in the subsection called Default Port Configurations, the default port value 
for mcast-port is not quite correct.  It says the default is 10334.  It should 
instead say that the default is 0 when the locators property is set, and 10334 
when the locators property is not set.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (GEODE-8442) Exception in server not identified correctly in client

2020-12-22 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/GEODE-8442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17253765#comment-17253765
 ] 

ASF GitHub Bot commented on GEODE-8442:
---

moleske commented on a change in pull request #713:
URL: https://github.com/apache/geode-native/pull/713#discussion_r547503934



##
File path: cppcache/integration/test/ContainsKeyOnServerExceptionTest.cpp
##
@@ -0,0 +1,111 @@
+/*
+ * 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.
+ */
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace {
+using apache::geode::client::Cache;
+using apache::geode::client::CacheableKey;
+using apache::geode::client::CacheableString;
+using apache::geode::client::CacheFactory;
+using apache::geode::client::CacheTransactionManager;
+using apache::geode::client::Pool;
+using apache::geode::client::Region;
+using apache::geode::client::RegionShortcut;
+
+std::string disconnectingStr("Disconnecting from the endpoint");
+
+std::string getClientLogName() {
+  std::string testSuiteName(::testing::UnitTest::GetInstance()
+->current_test_info()
+->test_case_name());
+  std::string testCaseName(
+  ::testing::UnitTest::GetInstance()->current_test_info()->name());
+  std::string logFileName(testSuiteName + "/" + testCaseName + "/client.log");
+  return logFileName;
+}
+
+std::shared_ptr createCache() {
+  auto cache = CacheFactory()
+   .set("log-level", "none")
+   .set("log-file", getClientLogName())
+   .create();
+  return std::make_shared(std::move(cache));
+}
+
+void executeTestCaseHandleException() {
+  Cluster cluster{
+  LocatorCount{1}, ServerCount{3},
+  CacheXMLFiles({
+  std::string(getFrameworkString(FrameworkVariable::TestCacheXmlDir)) +
+  "/cacheserver1_fpr_transaction.xml",
+  std::string(getFrameworkString(FrameworkVariable::TestCacheXmlDir)) +
+  "/cacheserver2_fpr_transaction.xml",
+  std::string(getFrameworkString(FrameworkVariable::TestCacheXmlDir)) +
+  "/cacheserver3_fpr_transaction.xml",
+  })};
+  cluster.start([&]() {
+cluster.getGfsh()
+.deploy()
+.jar(getFrameworkString(FrameworkVariable::JavaObjectJarPath))
+.execute();
+  });
+
+  auto cache = createCache();
+  auto poolFactory = cache->getPoolManager().createFactory();
+  ServerAddress serverAddress = cluster.getServers()[0].getAddress();
+  serverAddress.port = 40401;
+  cluster.applyServer(poolFactory, serverAddress);
+  auto pool = poolFactory.create("default");
+  auto region = cache->createRegionFactory(RegionShortcut::PROXY)
+.setPoolName("default")
+.create("region");
+
+  auto transactionManager = cache->getCacheTransactionManager();
+
+  // this key will be always routed towards server[1]
+  int theKey = 7;
+  std::string theValue = "theValue";
+  try {

Review comment:
   This seems good, though I have one concern and I'm not sure how to 
resolve it.  Since the `EXPECT_THROW` is in the catch, that expectation will 
only run if the `try` fails.  The `EXPECT_FALSE` will check that region doesn't 
contain the key, but the test wouldn't prove the right exception happened.  If 
I get to machine where I can run this (or if you want to try it out before me), 
it would be worth testing that the correct exception is being thrown and tested 
by changing the `EXPECT_THROW` to the wrong exception and see the test fail.  
That would give us more confidence that the test is working as intended.
   
   Otherwise I think everything looks alright.





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


> Exception in server not identified correctly in client
> --
>
> Key: 

[jira] [Commented] (GEODE-8562) Add a new serialization test and example that uses a class for the key

2020-12-22 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/GEODE-8562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17253552#comment-17253552
 ] 

ASF subversion and git services commented on GEODE-8562:


Commit 5c65fc772347a38e739edfaa34f7e45454fae505 in geode-native's branch 
refs/heads/develop from Michael Martell
[ https://gitbox.apache.org/repos/asf?p=geode-native.git;h=5c65fc7 ]

GEODE-8562: Adds new C++ test for using a class as a key (#714)

* Add new ClassAsKey test
* Use new classId for PositionKey (resolves conflict with existing classId)
* Make hashcode matche Java side hashcode
* Convert to C++11 style constructors (use explicit and default)
* Remove unneccessary headers
* Add explicit to constructor.
* Don't use c-style casts
* Improved variable names

Co-authored-by: Jacob Barrett 

> Add a new serialization test and example that uses a class for the key
> --
>
> Key: GEODE-8562
> URL: https://issues.apache.org/jira/browse/GEODE-8562
> Project: Geode
>  Issue Type: Improvement
>  Components: native client
>Reporter: Michael Martell
>Priority: Major
>  Labels: pull-request-available
>
> There appears to be no native client tests that use a class for the key.
> A new DataSerializable test should be added (new framework of course) that 
> uses a class that implements DataSerializable for both the key and the value. 
> Also, the test should be added for both C++ and .NET.
> Also update the existing put/get examples to include using a class as the 
> key. Note, this will require Java code that instantiates the key class.
> Notes:
>  * 
>  Using a class as a key requires the equivalent Java class to be deployed, as 
> well as an Instantiator for that class to be executed by the server on 
> startup. An example of this is the 
> QueryTest::DataSerializableQueryHaveCorrectValues which uses Position.cs and 
> Position.java.
>  * In this existing test, Position.java needs to be deployed and instantiated 
> because the test executes queries. In this new test, we need to deploy and 
> instantiate the java code for the key class because it's a key not a value.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (GEODE-8562) Add a new serialization test and example that uses a class for the key

2020-12-22 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/GEODE-8562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17253553#comment-17253553
 ] 

ASF GitHub Bot commented on GEODE-8562:
---

mmartell merged pull request #714:
URL: https://github.com/apache/geode-native/pull/714


   



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


> Add a new serialization test and example that uses a class for the key
> --
>
> Key: GEODE-8562
> URL: https://issues.apache.org/jira/browse/GEODE-8562
> Project: Geode
>  Issue Type: Improvement
>  Components: native client
>Reporter: Michael Martell
>Priority: Major
>  Labels: pull-request-available
>
> There appears to be no native client tests that use a class for the key.
> A new DataSerializable test should be added (new framework of course) that 
> uses a class that implements DataSerializable for both the key and the value. 
> Also, the test should be added for both C++ and .NET.
> Also update the existing put/get examples to include using a class as the 
> key. Note, this will require Java code that instantiates the key class.
> Notes:
>  * 
>  Using a class as a key requires the equivalent Java class to be deployed, as 
> well as an Instantiator for that class to be executed by the server on 
> startup. An example of this is the 
> QueryTest::DataSerializableQueryHaveCorrectValues which uses Position.cs and 
> Position.java.
>  * In this existing test, Position.java needs to be deployed and instantiated 
> because the test executes queries. In this new test, we need to deploy and 
> instantiate the java code for the key class because it's a key not a value.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)