Reply
New Contributor
Posts: 2
Registered: ‎05-16-2018
Accepted Solution

Unable to find region using springboot app

[ Edited ]

I'm trying to create a simple springboot application that contains hbase-site.xml and various other configuration properties in resources.

App is able to create a connection and during the query phase it seems unable to scan for a valid region that contains the queried table.

We are able to query the table and records using command prompt.

Here's the console log.

 

2018-05-15 12:59:19 - LogSource-hbase-service || Starting HbasePocApplicationTests on L8TBZLH2 with PID 30180 (started by user in C:\...\...\...\standalone\hbase-poc)
2018-05-15 12:59:19 - LogSource-hbase-service || No active profile set, falling back to default profiles: default
2018-05-15 12:59:21 - LogSource-hbase-service || JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-05-15 12:59:24 - LogSource-hbase-service || Exposing 2 endpoint(s) beneath base path '/actuator'
2018-05-15 12:59:24 - LogSource-hbase-service || Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-05-15 12:59:24 - LogSource-hbase-service || Mapped "{[/actuator/info],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-05-15 12:59:24 - LogSource-hbase-service || Mapped "{[/actuator],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto protected java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.springframework.boot.actuate.endpoint.web.Link>> org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.links(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-05-15 12:59:24 - LogSource-hbase-service || Started HbasePocApplicationTests in 6.561 seconds (JVM running for 8.667)
2018-05-15 12:59:25 - LogSource-hbase-service || class-HbaseConfig : getHbaseConnection
2018-05-15 12:59:25 - LogSource-hbase-service || Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2018-05-15 12:59:26 - LogSource-hbase-service || Login successful for user dummy@dummy.COM using keytab file C:\\...\...\\HBASE\\dummy.keytab
2018-05-15 12:59:27 - LogSource-hbase-service || Process identifier=hconnection-0x2be21396 connecting to ZooKeeper ensemble=<>
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:host.name=<>
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:java.version=1.8.0_45
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:java.vendor=Oracle Corporation
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:java.home=C:\...\...\jdk1.8.0_45\jre
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:java.class.path=<>
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:java.library.path=<>
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:java.io.tmpdir=<>
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:java.compiler=<NA>
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:os.name=Windows 7
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:os.arch=amd64
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:os.version=6.1
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:user.name=user
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:user.home=C:...\...
2018-05-15 12:59:27 - LogSource-hbase-service || Client environment:user.dir=C:\...\...\...\standalone\hbase-poc
2018-05-15 12:59:27 - LogSource-hbase-service || Initiating client connection, connectString=<>
2018-05-15 12:59:27 - LogSource-hbase-service || Opening socket connection to server dummy.domain.com/30.231.160.50:2181. Will not attempt to authenticate using SASL (unknown error)
2018-05-15 12:59:27 - LogSource-hbase-service || Socket connection established to dummy.domain.com/30.231.160.50:2181, initiating session
2018-05-15 12:59:27 - LogSource-hbase-service || Session establishment complete on server dummy.domain.com/30.231.160.50:2181, sessionid = 0x1632333c0e130a0, negotiated timeout = 60000
2018-05-15 12:59:27 - LogSource-hbase-service || class-HbaseConfig : getHbaseConnection
----------- Connection done!
2018-05-15 12:59:27 - LogSource-hbase-service || Entered into Class Name - HbaseDAO : getHbaseResult for productid=11761
table=<table-name>;hconnection-0x2be21396
row_key=<key_val>
get={"cacheBlocks":true,"totalColumns":0,"row":"<key_val>","families":{},"maxVersions":1,"timeRange":[0,9223372036854775807]}
org.apache.hadoop.hbase.TableNotFoundException: <table-name>
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegionInMeta(ConnectionManager.java:1283)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1181)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1165)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1122)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.getRegionLocation(ConnectionManager.java:957)
at org.apache.hadoop.hbase.client.HRegionLocator.getRegionLocation(HRegionLocator.java:83)
at org.apache.hadoop.hbase.client.RegionServerCallable.prepare(RegionServerCallable.java:79)
at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:124)
at org.apache.hadoop.hbase.client.HTable.get(HTable.java:870)
at org.apache.hadoop.hbase.client.HTable.get(HTable.java:836)
at com.hbase.poc.dao.HbaseDAO.getHbaseResultByFilters(HbaseDAO.java:29)
at com.hbase.poc.HbasePocApplicationTests.test(HbasePocApplicationTests.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:73)
at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:83)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
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.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

New Contributor
Posts: 2
Registered: ‎05-16-2018

Re: Unable to find region using springboot app

The issue was with the app unable to load hbase-site.xml properly. Fixing that resolved the issue.

https://stackoverflow.com/questions/18424945/how-to-make-sure-hbase-java-client-is-using-the-hbase-s...

 

Announcements