Comments (5)
Thats the InetAddress implementation? How is that? They are different throws?
St.Ack
On Wed, May 11, 2011 at 11:15 PM, tsuna
[email protected]
wrote:
Give asynchbase a single hostname that doesn't exist for a ZooKeeper quorum spec and observe this:
2011-05-11 23:09:52,631 ERROR [main] HBaseClient: Failed to connect to ZooKeeper java.net.UnknownHostException: tmpzookeeper at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.6.0_24] at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:850) ~[na:1.6.0_24] at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1201) ~[na:1.6.0_24] at java.net.InetAddress.getAllByName0(InetAddress.java:1154) ~[na:1.6.0_24] at java.net.InetAddress.getAllByName(InetAddress.java:1084) ~[na:1.6.0_24] at java.net.InetAddress.getAllByName(InetAddress.java:1020) ~[na:1.6.0_24] at org.apache.zookeeper.ClientCnxn.(ClientCnxn.java:383) ~[zookeeper-3.3.1.jar:3.3.1-942149] at org.apache.zookeeper.ClientCnxn.(ClientCnxn.java:328) ~[zookeeper-3.3.1.jar:3.3.1-942149] at org.apache.zookeeper.ZooKeeper.(ZooKeeper.java:377) ~[zookeeper-3.3.1.jar:3.3.1-942149] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2203) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.getDeferredRoot(HBaseClient.java:2120) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient.locateRegion(HBaseClient.java:1102) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient.sendRpcToRegion(HBaseClient.java:1005) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient.get(HBaseClient.java:700) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient.ensureTableFamilyExists(HBaseClient.java:653) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient.ensureTableExists(HBaseClient.java:673) [hbaseasync-1.0.jar:d1aff70] at net.opentsdb.tools.TSDMain.main(TSDMain.java:130) [tsdb-1.0.jar:b4a37c5] [...] 2011-05-11 23:09:52,644 ERROR [main] HBaseClient: Failed to connect to ZooKeeper java.net.UnknownHostException: tmpzookeeper at java.net.InetAddress.getAllByName0(InetAddress.java:1158) ~[na:1.6.0_24] at java.net.InetAddress.getAllByName(InetAddress.java:1084) ~[na:1.6.0_24] at java.net.InetAddress.getAllByName(InetAddress.java:1020) ~[na:1.6.0_24] at org.apache.zookeeper.ClientCnxn.(ClientCnxn.java:383) ~[zookeeper-3.3.1.jar:3.3.1-942149] at org.apache.zookeeper.ClientCnxn.(ClientCnxn.java:328) ~[zookeeper-3.3.1.jar:3.3.1-942149] at org.apache.zookeeper.ZooKeeper.(ZooKeeper.java:377) ~[zookeeper-3.3.1.jar:3.3.1-942149] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2203) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2209) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2209) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2209) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2209) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2209) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2209) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2209) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2209) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2209) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2209) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.connectZK(HBaseClient.java:2209) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient$ZKClient.getDeferredRoot(HBaseClient.java:2120) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient.locateRegion(HBaseClient.java:1102) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient.sendRpcToRegion(HBaseClient.java:1005) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient.get(HBaseClient.java:700) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient.ensureTableFamilyExists(HBaseClient.java:653) [hbaseasync-1.0.jar:d1aff70] at org.hbase.async.HBaseClient.ensureTableExists(HBaseClient.java:673) [hbaseasync-1.0.jar:d1aff70] at net.opentsdb.tools.TSDMain.main(TSDMain.java:130) [tsdb-1.0.jar:b4a37c5]Notice how stack frames in
connectZK
keep adding up? Bad.Reply to this email directly or view it on GitHub:
https://github.com/stumbleupon/asynchbase/issues/5
from asynchbase.
No the problem is that ZKClient.connectZK
is calling itself recursively when it catches an IOException
right after creating a ZooKeeper
object. The code is roughly like this:
private void connectZK() {
// [...]
// Session establishment is asynchronous, so this won't block.
zk = new ZooKeeper(quorum_spec, 5000, this);
} catch (IOException e) {
LOG.error("Failed to connect to ZooKeeper", e);
// XXX don't retry recursively, create a timer with an exponential
// backoff and schedule the reconnection attempt for later.
connectZK();
}
It's time to fix that XXX
comment! :)
from asynchbase.
good one. you told the boys about it?
On Thu, May 12, 2011 at 8:43 AM, tsuna
[email protected]
wrote:
No the problem is that
ZKClient.connectZK
is calling itself recursively when it catches anIOException
right after creating aZooKeeper
object. The code is roughly like this:private void connectZK() { // [...] // Session establishment is asynchronous, so this won't block. zk = new ZooKeeper(quorum_spec, 5000, this); } catch (IOException e) { LOG.error("Failed to connect to ZooKeeper", e); // XXX don't retry recursively, create a timer with an exponential // backoff and schedule the reconnection attempt for later. connectZK(); }It's time to fix that
XXX
comment! :)Reply to this email directly or view it on GitHub:
https://github.com/stumbleupon/asynchbase/issues/5#comment_1147334
from asynchbase.
... if only java had tail-call elimination. sigh
from asynchbase.
Although it's really too bad that the JVM platform (or rather the byte code) doesn't do tail-call optimizations, in this case it would simply turn the imminent stack overflow error into an endless loop.
from asynchbase.
Related Issues (20)
- Asynchbase MultiAction deserializes response from batch putRequest incorrectly HOT 1
- PR build failed with Java environment error HOT 1
- AssertionError: "Must not be used." HOT 1
- IN version2.3.0 HOT 1
- An exception was thrown by TimerTask. java.lang.OutOfMemoryError: Java heap space HOT 1
- Should buffering gets be possible? HOT 1
- When a scanner lease expires, it will retry request same regionserver endless. RS too busy! HOT 16
- can't set async wal?
- Mutation Attributes support
- Appends with no returns and few errors can break deserialization
- Can't re-write data correctly HOT 1
- Can you open chat room
- Why ConnectionResetException happen? HOT 1
- SparkStreaming with mapPartitions use client find error ”Too many open files“ HOT 1
- Comparison method violates its general contract
- org.hbase.async.NonRecoverableException: Too many attempts: OpenScannerRequest HOT 1
- How do i use the PageFilter
- Broken pipe error with "hbase.rpc.protection: privacy" HOT 1
- Can this support the kerberos authentication of hbase 2.2 HOT 1
- Not able to create jar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asynchbase.