You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2020/10/08 17:26:57 UTC
[GitHub] [accumulo] Manno15 opened a new pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Manno15 opened a new pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728
A simple function that tries to establish a connection to the standalone cluster. If nothing is running then it will hang until zookeeper or the test times out, whichever happens first. That will depend if the user passes in a timeout factor or not. I tested out a few other ways to check if the client was established, like some instance operations, but ultimately with table creation. The created table gets deleted in the cleanupTables() function.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] milleruntime commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
milleruntime commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706373640
> Does that test do something different than the rest?
As far as I can tell, no.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] milleruntime commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
milleruntime commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-707815540
> Each test will have a timeout of 6 minutes normally, not the entire IT.
OK thanks for looking into this.
> Would a System.Exit be advisable for this or do we have a better way to hard exit?
I don't think so. I don't know of a better way so we may have to close this ticket.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] milleruntime commented on a change in pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
milleruntime commented on a change in pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#discussion_r501899411
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
Could use an operation that doesn't affect any tables or create anything, like ```list()```
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-707972789
Closed by @milleruntime due to comment: https://github.com/apache/accumulo/issues/1718#issuecomment-707958488
Thanks for taking a look at this, @Manno15 ; even though the code didn't make it in, the effort in investigating the options is appreciated.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-707859446
@milleruntime I'll defer to you whether you want to merge this as-is as a possible slight improvement, or to discard it as being of limited value, given the totality of the circumstances. The only other thing I could think to do is to add a `maven-exec-plugin` task to check for the running cluster *before* the `maven-failsafe-plugin` ran, but I really don't think that's worth it. Whether you decide to merge this or close without merging, I think it's probably best to close the original issue, either way.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-707713940
@milleruntime I ran the ReadWriteIT in the debugger. It is hitting my checkConnection() function and failing but it's doing each test separately which is an issue. Even with a runtime exception, it will still go to the next test in the IT instead of failing completely.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] milleruntime commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
milleruntime commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706291518
Even stranger, is that the IT didn't even timeout after 6 minutes like it is configured. It was going on 10 minutes before I had to kill it...
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a change in pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
EdColeman commented on a change in pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#discussion_r501946691
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
Why is just getting the client not sufficient?
Other options could be InstanceOperations.getSystemConfiguration or getSiteConfiguration()
Another possibility would be to see if you can scan either the root or the metadata table, and if you restricted the colFam to file or ~tab:~pr - that's only going to be a few entries - and that's a fairly robust way of know that a lot is up and ready for operations.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706330255
I'll run the test when I'm back in office Tuesday and try to figure out what's going on.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706299356
Hmmm, that's interesting. I didn't use that test. I just took the first one that is ran and increased the timeout to it so zookeeper's was shorter. Did it properly start in standalone mode?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on a change in pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#discussion_r501994429
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
> Why is just getting the client not sufficient?
I'm not sure getting the client requires any communication with a server. I don't think it does... it's all client side. We'd need something that actually interacts with the server.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on a change in pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on a change in pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#discussion_r502323625
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
> I'm not sure getting the client requires any communication with a serve
That is correct.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706221681
> It won't fail immediately per se. It fails when zookeeper times out. Which, if users are running a standalone IT and add in a timeout factor, will faill faster than the test itself. The limitations are that it checks for a zookeeper connection before trying to do any client activity. So if zookeeper isn't running then it will always hang trying to connect to it. Ideally, I would be able to check for manager status or something like that before trying to connect to zookeeper so I could fail quicker but I don't know if that is possible.
It's not worth it to check the manager status if you can't connect to ZK. If it can't connect to ZK, then you wouldn't be able to connect to the manager either. I think this is fine, as-is. @milleruntime what do you think? Is this okay to merge?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-707831654
> @milleruntime I ran the ReadWriteIT in the debugger. It is hitting my checkConnection() function and failing but it's doing each test separately which is an issue. Even with a runtime exception, it will still go to the next test in the IT instead of failing completely. I assume this is why it looks like it is hanging for 20 minutes but it is just going through each test individually. Each test will have a timeout of 6 minutes normally, not the entire IT.
This is intended. The `integration-test` phase executes all the tests and gathers the results. The `verify` phase is the phase where the results are inspected and the `maven-failsafe-plugin` kills the build or not. I don't think we'd even want to work around this, even if we could.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706117402
Would it be worth checking if Manager is running, using instanceOperations.getManagerLocation()? In the off chance everything else with accumulo is running besides Manager, then we can fast fail ever quicker instead of waiting for the test to timeout. Since it's an instanceOperation, it will also do the same thing as list() and allow zookeeper to timeout if it cannot connect to it.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on a change in pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on a change in pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#discussion_r501914786
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
Yeah, list is a good one that I forgot to try. I liked the instance operations for the same reasoning. I can push your suggestion tomorrow if thats more preferred.
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
> I'm not sure getting the client requires any communication with a serve
That is correct.
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
> I'm not sure getting the client requires any communication with a server.
That is correct.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on a change in pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on a change in pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#discussion_r501914786
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
Yeah, list is a good one that I forgot to try. I liked the instance operations for the same reasoning. I can push your suggestion tomorrow if thats more preferred.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706117402
Would it be worth checking if Manager is running, using instanceOperations.getManagerLocation()? In the off chance everything else with accumulo is running besides Manager, then we can fast fail ever quicker instead of waiting for the test to timeout. Since it's an instanceOperation, it will also do the same thing as list() and allow zookeeper to timeout if it cannot connect to it.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on a change in pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on a change in pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#discussion_r502323625
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
> I'm not sure getting the client requires any communication with a server.
That is correct.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] milleruntime commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
milleruntime commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706290940
I got your changes and the test did not timeout for me. I ran:
```mvn clean verify -Dit.test=ReadWriteIT -Dtest=foo -Dspotbugs.skip -Drat.skip -Dformatter.skip -Dcheckstyle.skip -Dmodernizer.skip -Dimpsort.skip -Dsortpom.skip -DfailIfNoTests=false -Daccumulo.it.properties=/uno/install/accumulo-2.1.0-SNAPSHOT/conf/accumulo-it.properties```
I chose ReadWriteIT because it has a long timeout. I think it is just waiting for ZK... here is what jstack shows me:
```
at org.apache.accumulo.fate.util.UtilWaitThread.sleep(UtilWaitThread.java:33)
at org.apache.accumulo.fate.zookeeper.ZooSession.connect(ZooSession.java:136)
at org.apache.accumulo.fate.zookeeper.ZooSession.getSession(ZooSession.java:216)
- locked <0x00000006296c7fd0> (a java.lang.Class for org.apache.accumulo.fate.zookeeper.ZooSession)
at org.apache.accumulo.fate.zookeeper.ZooSession.getAnonymousSession(ZooSession.java:189)
at org.apache.accumulo.fate.zookeeper.ZooReader.getZooKeeper(ZooReader.java:54)
at org.apache.accumulo.fate.zookeeper.ZooCache.getZooKeeper(ZooCache.java:150)
at org.apache.accumulo.fate.zookeeper.ZooCache$2.run(ZooCache.java:410)
at org.apache.accumulo.fate.zookeeper.ZooCache$2.run(ZooCache.java:383)
at org.apache.accumulo.fate.zookeeper.ZooCache$ZooRunnable.retry(ZooCache.java:275)
at org.apache.accumulo.fate.zookeeper.ZooCache.get(ZooCache.java:438)
at org.apache.accumulo.fate.zookeeper.ZooCache.get(ZooCache.java:368)
at org.apache.accumulo.core.clientImpl.ClientContext.getInstanceID(ClientContext.java:412)
at org.apache.accumulo.core.clientImpl.ClientContext.getInstanceID(ClientContext.java:401)
at org.apache.accumulo.core.clientImpl.Tables.getTableMap(Tables.java:181)
at org.apache.accumulo.core.clientImpl.Tables.getTableMap(Tables.java:169)
at org.apache.accumulo.core.clientImpl.Tables.getNameToIdMap(Tables.java:153)
at org.apache.accumulo.core.clientImpl.TableOperationsImpl.list(TableOperationsImpl.java:178)
at org.apache.accumulo.harness.AccumuloClusterHarness.cleanupTables(AccumuloClusterHarness.java:236)
at org.apache.accumulo.harness.AccumuloClusterHarness.teardownCluster(AccumuloClusterHarness.java:265)
```
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706362550
Does that test do something different than the rest? I didn't have that issue with some of the other ones I ran. You might be right on the before/after part getting in the way. I'm not sure if there is a way to stop the entire standalone suite after the first test times out due to no accumulo connection.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706222791
Yeah, I think the best we can do currently is wait for the zookeeper timeout.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706211890
@Manno15 Have you verified this actually fails immediately if the cluster isn't running, instead of just waiting for it to come online? Many client operations may just wait for the service to come online, but perhaps not all. As for your question, I don't know if it's worth doing any additional checks for the manager, unless listing tables doesn't fail immediately, and that command does.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-707734074
Would a System.Exit be advisable for this or do we have a better way to hard exit?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] EdColeman commented on a change in pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
EdColeman commented on a change in pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#discussion_r501946691
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
Why is just getting the client not sufficient?
Other options could be InstanceOperations.getSystemConfiguration or getSiteConfiguration()
Another possibility would be to see if you can scan either the root or the metadata table, and if you restricted the colFam to file or ~tab:~pr - that's only going to be a few entries - and that's a fairly robust way of know that a lot is up and ready for operations.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706213998
It won't fail immediately per se. It fails when zookeeper times out. Which, if users are running a standalone IT and add in a timeout factor, will faill faster than the test itself. The limitations are that it checks for a zookeeper connection before trying to do any client activity. So if zookeeper isn't running then it will always hang trying to connect to it. Ideally, I would be able to check for manager status or something like that before trying to connect to zookeeper so I could fail quicker but I don't know if that is possible.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] milleruntime closed pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
milleruntime closed pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] milleruntime commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
milleruntime commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706304759
> Hmmm, that's interesting. I didn't use that test. I just took the first one that is ran and increased the timeout to it so zookeeper's was shorter. Did it properly start in standalone mode?
It is difficult to tell since nothing gets printed to the logs. Maybe the framework is catching the Exception and then failing, hence why ```cleanupTables``` is still being called. But what is weird is it is still calling the same ```list()``` method on TableOps haha.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] Manno15 edited a comment on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
Manno15 edited a comment on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-707713940
@milleruntime I ran the ReadWriteIT in the debugger. It is hitting my checkConnection() function and failing but it's doing each test separately which is an issue. Even with a runtime exception, it will still go to the next test in the IT instead of failing completely. I assume this is why it looks like it is hanging for 20 minutes but it is just going through each test individually. Each test will have a timeout of 6 minutes normally, not the entire IT.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on a change in pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#discussion_r501994429
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
> Why is just getting the client not sufficient?
I'm not sure getting the client requires any communication with a server. I don't think it does... it's all client side. We'd need something that actually interacts with the server.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] milleruntime commented on pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
milleruntime commented on pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#issuecomment-706352419
I ran it again and let it timeout after 20+ minutes. I can confirm it is running in standalone mode. The log is just a bunch of ZK timeouts. It is possible this isn't going to work due to the JUnit always running parts like Before/After methods no matter what. I don't know if we will be able to stop these from running.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [accumulo] milleruntime commented on a change in pull request #1728: Closes #1718. Fail if no Accumulo Instance on Standalone setup
Posted by GitBox <gi...@apache.org>.
milleruntime commented on a change in pull request #1728:
URL: https://github.com/apache/accumulo/pull/1728#discussion_r501899411
##########
File path: test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java
##########
@@ -217,6 +219,17 @@ public void setupCluster() throws Exception {
}
}
+ public void checkConnection() {
+ try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) {
+ // Use prefix so cleanupTables deletes it
+ String tablePrefix = this.getClass().getSimpleName() + "_";
+ client.tableOperations().create(tablePrefix);
Review comment:
Could use an operation that doesn't affect any tables or create anything, like ```list()```
----------------------------------------------------------------
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:
users@infra.apache.org