[jira] [Commented] (HBASE-17122) Change in behavior when creating a scanner for a disabled table

2016-11-21 Thread Andrew Purtell (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15684604#comment-15684604
 ] 

Andrew Purtell commented on HBASE-17122:


Thanks for the signpost [~samarth.j...@gmail.com]. I'll save a pointer to this 
issue in my inbox and look for the commit that changed this behavior when I get 
back from vacation. 

> Change in behavior when creating a scanner for a disabled table
> ---
>
> Key: HBASE-17122
> URL: https://issues.apache.org/jira/browse/HBASE-17122
> Project: HBase
>  Issue Type: Bug
>Reporter: Samarth Jain
>
> {code}
> @Test
> public void testQueryingDisabledTable() throws Exception {
> try (Connection conn = DriverManager.getConnection(getUrl())) {
> String tableName = generateUniqueName();
> conn.createStatement().execute(
> "CREATE TABLE " + tableName
> + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK 
> PRIMARY KEY(K1,K2)) ");
> try (HBaseAdmin admin = 
> conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
> admin.disableTable(Bytes.toBytes(tableName));
> }
> String query = "SELECT * FROM " + tableName + " WHERE 1=1";
> try (Connection conn2 = DriverManager.getConnection(getUrl())) {
> try (ResultSet rs = 
> conn2.createStatement().executeQuery(query)) {
> assertFalse(rs.next());
> }
> }
> }
> }
> {code}
> This is a phoenix specific test case. I will try an come up with something 
> using the HBase API. But the gist is that with HBase 0.98.21 and beyond, we 
> are seeing that creating a scanner is throwing a NotServingRegionException. 
> Stacktrace for NotServingRegionException
> {code}
> org.apache.phoenix.exception.PhoenixIOException: 
> org.apache.phoenix.exception.PhoenixIOException: callTimeout=120, 
> callDuration=9000104: row '' on table 'T01' at 
> region=T01,,1479429739864.643dde31cc19b549192576eea7791a6f., 
> hostname=localhost,60022,1479429692090, seqNum=1
>   at 
> org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:113)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:752)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:696)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
>   at 
> org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
>   at 
> org.apache.phoenix.end2end.PhoenixRuntimeIT.testQueryingDisabledTable(PhoenixRuntimeIT.java:167)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>   at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>   at 
> 

[jira] [Commented] (HBASE-17122) Change in behavior when creating a scanner for a disabled table

2016-11-21 Thread Samarth Jain (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15684239#comment-15684239
 ] 

Samarth Jain commented on HBASE-17122:
--

Yes, the problem is with just 0.98. [~stack] - the behavior changed starting 
0.98.21. [~apurtell], I had to add a really hacky work around in Phoenix to 
deal with this bug. But if the plan is to freeze 0.98 branch soon, then I am OK 
with not having to fix this.

> Change in behavior when creating a scanner for a disabled table
> ---
>
> Key: HBASE-17122
> URL: https://issues.apache.org/jira/browse/HBASE-17122
> Project: HBase
>  Issue Type: Bug
>Reporter: Samarth Jain
>
> {code}
> @Test
> public void testQueryingDisabledTable() throws Exception {
> try (Connection conn = DriverManager.getConnection(getUrl())) {
> String tableName = generateUniqueName();
> conn.createStatement().execute(
> "CREATE TABLE " + tableName
> + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK 
> PRIMARY KEY(K1,K2)) ");
> try (HBaseAdmin admin = 
> conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
> admin.disableTable(Bytes.toBytes(tableName));
> }
> String query = "SELECT * FROM " + tableName + " WHERE 1=1";
> try (Connection conn2 = DriverManager.getConnection(getUrl())) {
> try (ResultSet rs = 
> conn2.createStatement().executeQuery(query)) {
> assertFalse(rs.next());
> }
> }
> }
> }
> {code}
> This is a phoenix specific test case. I will try an come up with something 
> using the HBase API. But the gist is that with HBase 0.98.21 and beyond, we 
> are seeing that creating a scanner is throwing a NotServingRegionException. 
> Stacktrace for NotServingRegionException
> {code}
> org.apache.phoenix.exception.PhoenixIOException: 
> org.apache.phoenix.exception.PhoenixIOException: callTimeout=120, 
> callDuration=9000104: row '' on table 'T01' at 
> region=T01,,1479429739864.643dde31cc19b549192576eea7791a6f., 
> hostname=localhost,60022,1479429692090, seqNum=1
>   at 
> org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:113)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:752)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:696)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
>   at 
> org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
>   at 
> org.apache.phoenix.end2end.PhoenixRuntimeIT.testQueryingDisabledTable(PhoenixRuntimeIT.java:167)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>   at 
> 

[jira] [Commented] (HBASE-17122) Change in behavior when creating a scanner for a disabled table

2016-11-20 Thread Andrew Purtell (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15682008#comment-15682008
 ] 

Andrew Purtell commented on HBASE-17122:


I'm going to assume unless informed otherwise given the workaround for Phoenix 
was committed to only the branch for 0.98 (in fact reverted elsewhere) that 
this is a problem with just 0.98. I don't think another change would be better 
than doing nothing at this point. 

> Change in behavior when creating a scanner for a disabled table
> ---
>
> Key: HBASE-17122
> URL: https://issues.apache.org/jira/browse/HBASE-17122
> Project: HBase
>  Issue Type: Bug
>Reporter: Samarth Jain
>
> {code}
> @Test
> public void testQueryingDisabledTable() throws Exception {
> try (Connection conn = DriverManager.getConnection(getUrl())) {
> String tableName = generateUniqueName();
> conn.createStatement().execute(
> "CREATE TABLE " + tableName
> + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK 
> PRIMARY KEY(K1,K2)) ");
> try (HBaseAdmin admin = 
> conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
> admin.disableTable(Bytes.toBytes(tableName));
> }
> String query = "SELECT * FROM " + tableName + " WHERE 1=1";
> try (Connection conn2 = DriverManager.getConnection(getUrl())) {
> try (ResultSet rs = 
> conn2.createStatement().executeQuery(query)) {
> assertFalse(rs.next());
> }
> }
> }
> }
> {code}
> This is a phoenix specific test case. I will try an come up with something 
> using the HBase API. But the gist is that with HBase 0.98.21 and beyond, we 
> are seeing that creating a scanner is throwing a NotServingRegionException. 
> Stacktrace for NotServingRegionException
> {code}
> org.apache.phoenix.exception.PhoenixIOException: 
> org.apache.phoenix.exception.PhoenixIOException: callTimeout=120, 
> callDuration=9000104: row '' on table 'T01' at 
> region=T01,,1479429739864.643dde31cc19b549192576eea7791a6f., 
> hostname=localhost,60022,1479429692090, seqNum=1
>   at 
> org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:113)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:752)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:696)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
>   at 
> org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
>   at 
> org.apache.phoenix.end2end.PhoenixRuntimeIT.testQueryingDisabledTable(PhoenixRuntimeIT.java:167)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>   at 
> 

[jira] [Commented] (HBASE-17122) Change in behavior when creating a scanner for a disabled table

2016-11-18 Thread Andrew Purtell (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15678104#comment-15678104
 ] 

Andrew Purtell commented on HBASE-17122:


We will have another, perhaps final 0.98 release in December. Does this affect 
other branches? If so let's fix for sure. If not, what's the opinion on fix or 
not?

> Change in behavior when creating a scanner for a disabled table
> ---
>
> Key: HBASE-17122
> URL: https://issues.apache.org/jira/browse/HBASE-17122
> Project: HBase
>  Issue Type: Bug
>Reporter: Samarth Jain
>
> {code}
> @Test
> public void testQueryingDisabledTable() throws Exception {
> try (Connection conn = DriverManager.getConnection(getUrl())) {
> String tableName = generateUniqueName();
> conn.createStatement().execute(
> "CREATE TABLE " + tableName
> + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK 
> PRIMARY KEY(K1,K2)) ");
> try (HBaseAdmin admin = 
> conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
> admin.disableTable(Bytes.toBytes(tableName));
> }
> String query = "SELECT * FROM " + tableName + " WHERE 1=1";
> try (Connection conn2 = DriverManager.getConnection(getUrl())) {
> try (ResultSet rs = 
> conn2.createStatement().executeQuery(query)) {
> assertFalse(rs.next());
> }
> }
> }
> }
> {code}
> This is a phoenix specific test case. I will try an come up with something 
> using the HBase API. But the gist is that with HBase 0.98.21 and beyond, we 
> are seeing that creating a scanner is throwing a NotServingRegionException. 
> Stacktrace for NotServingRegionException
> {code}
> org.apache.phoenix.exception.PhoenixIOException: 
> org.apache.phoenix.exception.PhoenixIOException: callTimeout=120, 
> callDuration=9000104: row '' on table 'T01' at 
> region=T01,,1479429739864.643dde31cc19b549192576eea7791a6f., 
> hostname=localhost,60022,1479429692090, seqNum=1
>   at 
> org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:113)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:752)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:696)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
>   at 
> org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
>   at 
> org.apache.phoenix.end2end.PhoenixRuntimeIT.testQueryingDisabledTable(PhoenixRuntimeIT.java:167)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>   at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>   at 
> 

[jira] [Commented] (HBASE-17122) Change in behavior when creating a scanner for a disabled table

2016-11-18 Thread stack (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15677809#comment-15677809
 ] 

stack commented on HBASE-17122:
---

Do you know what commit broke our behavior [~samarth.j...@gmail.com] You have a 
suggestion for how to fix?

> Change in behavior when creating a scanner for a disabled table
> ---
>
> Key: HBASE-17122
> URL: https://issues.apache.org/jira/browse/HBASE-17122
> Project: HBase
>  Issue Type: Bug
>Reporter: Samarth Jain
>
> {code}
> @Test
> public void testQueryingDisabledTable() throws Exception {
> try (Connection conn = DriverManager.getConnection(getUrl())) {
> String tableName = generateUniqueName();
> conn.createStatement().execute(
> "CREATE TABLE " + tableName
> + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK 
> PRIMARY KEY(K1,K2)) ");
> try (HBaseAdmin admin = 
> conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
> admin.disableTable(Bytes.toBytes(tableName));
> }
> String query = "SELECT * FROM " + tableName + " WHERE 1=1";
> try (Connection conn2 = DriverManager.getConnection(getUrl())) {
> try (ResultSet rs = 
> conn2.createStatement().executeQuery(query)) {
> assertFalse(rs.next());
> }
> }
> }
> }
> {code}
> This is a phoenix specific test case. I will try an come up with something 
> using the HBase API. But the gist is that with HBase 0.98.21 and beyond, we 
> are seeing that creating a scanner is throwing a NotServingRegionException. 
> Stacktrace for NotServingRegionException
> {code}
> org.apache.phoenix.exception.PhoenixIOException: 
> org.apache.phoenix.exception.PhoenixIOException: callTimeout=120, 
> callDuration=9000104: row '' on table 'T01' at 
> region=T01,,1479429739864.643dde31cc19b549192576eea7791a6f., 
> hostname=localhost,60022,1479429692090, seqNum=1
>   at 
> org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:113)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:752)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:696)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
>   at 
> org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
>   at 
> org.apache.phoenix.end2end.PhoenixRuntimeIT.testQueryingDisabledTable(PhoenixRuntimeIT.java:167)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>   at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>   at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>   at 
> 

[jira] [Commented] (HBASE-17122) Change in behavior when creating a scanner for a disabled table

2016-11-18 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15677412#comment-15677412
 ] 

Hudson commented on HBASE-17122:


SUCCESS: Integrated in Jenkins build Phoenix-4.8-HBase-1.2 #64 (See 
[https://builds.apache.org/job/Phoenix-4.8-HBase-1.2/64/])
Revert "PHOENIX-3497 Provide a work around for HBASE-17122" (Samarth: rev 
3d4205123f763fdfd875211d551da42deeb78412)
* (edit) phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
* (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java


> Change in behavior when creating a scanner for a disabled table
> ---
>
> Key: HBASE-17122
> URL: https://issues.apache.org/jira/browse/HBASE-17122
> Project: HBase
>  Issue Type: Bug
>Reporter: Samarth Jain
>
> {code}
> @Test
> public void testQueryingDisabledTable() throws Exception {
> try (Connection conn = DriverManager.getConnection(getUrl())) {
> String tableName = generateUniqueName();
> conn.createStatement().execute(
> "CREATE TABLE " + tableName
> + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK 
> PRIMARY KEY(K1,K2)) ");
> try (HBaseAdmin admin = 
> conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
> admin.disableTable(Bytes.toBytes(tableName));
> }
> String query = "SELECT * FROM " + tableName + " WHERE 1=1";
> try (Connection conn2 = DriverManager.getConnection(getUrl())) {
> try (ResultSet rs = 
> conn2.createStatement().executeQuery(query)) {
> assertFalse(rs.next());
> }
> }
> }
> }
> {code}
> This is a phoenix specific test case. I will try an come up with something 
> using the HBase API. But the gist is that with HBase 0.98.21 and beyond, we 
> are seeing that creating a scanner is throwing a NotServingRegionException. 
> Stacktrace for NotServingRegionException
> {code}
> org.apache.phoenix.exception.PhoenixIOException: 
> org.apache.phoenix.exception.PhoenixIOException: callTimeout=120, 
> callDuration=9000104: row '' on table 'T01' at 
> region=T01,,1479429739864.643dde31cc19b549192576eea7791a6f., 
> hostname=localhost,60022,1479429692090, seqNum=1
>   at 
> org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:113)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:752)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:696)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
>   at 
> org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
>   at 
> org.apache.phoenix.end2end.PhoenixRuntimeIT.testQueryingDisabledTable(PhoenixRuntimeIT.java:167)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at 

[jira] [Commented] (HBASE-17122) Change in behavior when creating a scanner for a disabled table

2016-11-18 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15677214#comment-15677214
 ] 

Hudson commented on HBASE-17122:


FAILURE: Integrated in Jenkins build Phoenix-master #1504 (See 
[https://builds.apache.org/job/Phoenix-master/1504/])
Revert "PHOENIX-3497 Provide a work around for HBASE-17122" (Samarth: rev 
8152131e41f9944940b1fd071d815dd5199d5a63)
* (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java


> Change in behavior when creating a scanner for a disabled table
> ---
>
> Key: HBASE-17122
> URL: https://issues.apache.org/jira/browse/HBASE-17122
> Project: HBase
>  Issue Type: Bug
>Reporter: Samarth Jain
>
> {code}
> @Test
> public void testQueryingDisabledTable() throws Exception {
> try (Connection conn = DriverManager.getConnection(getUrl())) {
> String tableName = generateUniqueName();
> conn.createStatement().execute(
> "CREATE TABLE " + tableName
> + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK 
> PRIMARY KEY(K1,K2)) ");
> try (HBaseAdmin admin = 
> conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
> admin.disableTable(Bytes.toBytes(tableName));
> }
> String query = "SELECT * FROM " + tableName + " WHERE 1=1";
> try (Connection conn2 = DriverManager.getConnection(getUrl())) {
> try (ResultSet rs = 
> conn2.createStatement().executeQuery(query)) {
> assertFalse(rs.next());
> }
> }
> }
> }
> {code}
> This is a phoenix specific test case. I will try an come up with something 
> using the HBase API. But the gist is that with HBase 0.98.21 and beyond, we 
> are seeing that creating a scanner is throwing a NotServingRegionException. 
> Stacktrace for NotServingRegionException
> {code}
> org.apache.phoenix.exception.PhoenixIOException: 
> org.apache.phoenix.exception.PhoenixIOException: callTimeout=120, 
> callDuration=9000104: row '' on table 'T01' at 
> region=T01,,1479429739864.643dde31cc19b549192576eea7791a6f., 
> hostname=localhost,60022,1479429692090, seqNum=1
>   at 
> org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:113)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:752)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:696)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
>   at 
> org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
>   at 
> org.apache.phoenix.end2end.PhoenixRuntimeIT.testQueryingDisabledTable(PhoenixRuntimeIT.java:167)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at 

[jira] [Commented] (HBASE-17122) Change in behavior when creating a scanner for a disabled table

2016-11-18 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15676414#comment-15676414
 ] 

Hudson commented on HBASE-17122:


FAILURE: Integrated in Jenkins build Phoenix-4.8-HBase-1.2 #63 (See 
[https://builds.apache.org/job/Phoenix-4.8-HBase-1.2/63/])
PHOENIX-3497 Provide a work around for HBASE-17122 (Samarth: rev 
cd48969c9ef6784f6448c884981e78519eebf1dd)
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
* (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
* (edit) phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java


> Change in behavior when creating a scanner for a disabled table
> ---
>
> Key: HBASE-17122
> URL: https://issues.apache.org/jira/browse/HBASE-17122
> Project: HBase
>  Issue Type: Bug
>Reporter: Samarth Jain
>
> {code}
> @Test
> public void testQueryingDisabledTable() throws Exception {
> try (Connection conn = DriverManager.getConnection(getUrl())) {
> String tableName = generateUniqueName();
> conn.createStatement().execute(
> "CREATE TABLE " + tableName
> + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK 
> PRIMARY KEY(K1,K2)) ");
> try (HBaseAdmin admin = 
> conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
> admin.disableTable(Bytes.toBytes(tableName));
> }
> String query = "SELECT * FROM " + tableName + " WHERE 1=1";
> try (Connection conn2 = DriverManager.getConnection(getUrl())) {
> try (ResultSet rs = 
> conn2.createStatement().executeQuery(query)) {
> assertFalse(rs.next());
> }
> }
> }
> }
> {code}
> This is a phoenix specific test case. I will try an come up with something 
> using the HBase API. But the gist is that with HBase 0.98.21 and beyond, we 
> are seeing that creating a scanner is throwing a NotServingRegionException. 
> Stacktrace for NotServingRegionException
> {code}
> org.apache.phoenix.exception.PhoenixIOException: 
> org.apache.phoenix.exception.PhoenixIOException: callTimeout=120, 
> callDuration=9000104: row '' on table 'T01' at 
> region=T01,,1479429739864.643dde31cc19b549192576eea7791a6f., 
> hostname=localhost,60022,1479429692090, seqNum=1
>   at 
> org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:113)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:752)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:696)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
>   at 
> org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
>   at 
> org.apache.phoenix.end2end.PhoenixRuntimeIT.testQueryingDisabledTable(PhoenixRuntimeIT.java:167)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at 

[jira] [Commented] (HBASE-17122) Change in behavior when creating a scanner for a disabled table

2016-11-18 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15676321#comment-15676321
 ] 

Hudson commented on HBASE-17122:


FAILURE: Integrated in Jenkins build Phoenix-master #1503 (See 
[https://builds.apache.org/job/Phoenix-master/1503/])
PHOENIX-3497 Provide a work around for HBASE-17122 (Samarth: rev 
3aa9c43fd5a8612b63edc42507b057ba8215dac4)
* (edit) phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
* (edit) 
phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
* (edit) phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java


> Change in behavior when creating a scanner for a disabled table
> ---
>
> Key: HBASE-17122
> URL: https://issues.apache.org/jira/browse/HBASE-17122
> Project: HBase
>  Issue Type: Bug
>Reporter: Samarth Jain
>
> {code}
> @Test
> public void testQueryingDisabledTable() throws Exception {
> try (Connection conn = DriverManager.getConnection(getUrl())) {
> String tableName = generateUniqueName();
> conn.createStatement().execute(
> "CREATE TABLE " + tableName
> + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK 
> PRIMARY KEY(K1,K2)) ");
> try (HBaseAdmin admin = 
> conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
> admin.disableTable(Bytes.toBytes(tableName));
> }
> String query = "SELECT * FROM " + tableName + " WHERE 1=1";
> try (Connection conn2 = DriverManager.getConnection(getUrl())) {
> try (ResultSet rs = 
> conn2.createStatement().executeQuery(query)) {
> assertFalse(rs.next());
> }
> }
> }
> }
> {code}
> This is a phoenix specific test case. I will try an come up with something 
> using the HBase API. But the gist is that with HBase 0.98.21 and beyond, we 
> are seeing that creating a scanner is throwing a NotServingRegionException. 
> Stacktrace for NotServingRegionException
> {code}
> org.apache.phoenix.exception.PhoenixIOException: 
> org.apache.phoenix.exception.PhoenixIOException: callTimeout=120, 
> callDuration=9000104: row '' on table 'T01' at 
> region=T01,,1479429739864.643dde31cc19b549192576eea7791a6f., 
> hostname=localhost,60022,1479429692090, seqNum=1
>   at 
> org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:113)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:752)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:696)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
>   at 
> org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
>   at 
> org.apache.phoenix.end2end.PhoenixRuntimeIT.testQueryingDisabledTable(PhoenixRuntimeIT.java:167)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at 

[jira] [Commented] (HBASE-17122) Change in behavior when creating a scanner for a disabled table

2016-11-17 Thread Samarth Jain (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15675309#comment-15675309
 ] 

Samarth Jain commented on HBASE-17122:
--

[~gjacoby]

> Change in behavior when creating a scanner for a disabled table
> ---
>
> Key: HBASE-17122
> URL: https://issues.apache.org/jira/browse/HBASE-17122
> Project: HBase
>  Issue Type: Bug
>Reporter: Samarth Jain
>
> {code}
> @Test
> public void testQueryingDisabledTable() throws Exception {
> try (Connection conn = DriverManager.getConnection(getUrl())) {
> String tableName = generateUniqueName();
> conn.createStatement().execute(
> "CREATE TABLE " + tableName
> + " (k1 VARCHAR NOT NULL, k2 VARCHAR, CONSTRAINT PK 
> PRIMARY KEY(K1,K2)) ");
> try (HBaseAdmin admin = 
> conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
> admin.disableTable(Bytes.toBytes(tableName));
> }
> String query = "SELECT * FROM " + tableName + " WHERE 1=1";
> try (Connection conn2 = DriverManager.getConnection(getUrl())) {
> try (ResultSet rs = 
> conn2.createStatement().executeQuery(query)) {
> assertFalse(rs.next());
> }
> }
> }
> }
> {code}
> This is a phoenix specific test case. I will try an come up with something 
> using the HBase API. But the gist is that with HBase 0.98.21 and beyond, we 
> are seeing that creating a scanner is throwing a NotServingRegionException. 
> Stacktrace for NotServingRegionException
> {code}
> org.apache.phoenix.exception.PhoenixIOException: 
> org.apache.phoenix.exception.PhoenixIOException: callTimeout=120, 
> callDuration=9000104: row '' on table 'T01' at 
> region=T01,,1479429739864.643dde31cc19b549192576eea7791a6f., 
> hostname=localhost,60022,1479429692090, seqNum=1
>   at 
> org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:113)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:752)
>   at 
> org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:696)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.getIterators(ConcatResultIterator.java:50)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.currentIterator(ConcatResultIterator.java:97)
>   at 
> org.apache.phoenix.iterate.ConcatResultIterator.next(ConcatResultIterator.java:117)
>   at 
> org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:778)
>   at 
> org.apache.phoenix.end2end.PhoenixRuntimeIT.testQueryingDisabledTable(PhoenixRuntimeIT.java:167)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>   at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>   at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>   at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>