apache / apache/accumulo-fluo

Improve exception thrown if Fluo application has not been initialized

Open
#469 0 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
Java
Stars
200
Forks
73
PR merge metrics
No merged PRs in 30d

Description

If you a user runs `fluo scan app1` or `fluo wait app1` without running `fluo init app1`, a Zookeeper exception like below is thrown. It would be better to create a more clear exception stating that Zookeeper has not been initialized yet for `app1` and the user should run `fluo init app1` in order to initialize it.

```
org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /config/accumulo.instance.name
java.lang.IllegalStateException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /config/accumulo.instance.name
at io.fluo.core.impl.Environment.readZookeeperConfig(Environment.java:150)
at io.fluo.core.impl.Environment.(Environment.java:80)
at io.fluo.cluster.runner.AppRunner.wait(AppRunner.java:303)
at io.fluo.cluster.command.FluoCommand.main(FluoCommand.java:78)
Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /config/accumulo.instance.name
at org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:1155)
at org.apache.curator.framework.imps.GetDataBuilderImpl$4.call(GetDataBuilderImpl.java:302)
at org.apache.curator.framework.imps.GetDataBuilderImpl$4.call(GetDataBuilderImpl.java:291)
at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:107)
at org.apache.curator.framework.imps.GetDataBuilderImpl.pathInForeground(GetDataBuilderImpl.java:287)
at org.apache.curator.framework.imps.GetDataBuilderImpl.forPath(GetDataBuilderImpl.java:279)
at org.apache.curator.framework.imps.GetDataBuilderImpl.forPath(GetDataBuilderImpl.java:41)
at io.fluo.core.impl.Environment.readZookeeperConfig(Environment.java:126)
... 3 more
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.