Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails if multiple ZK #337

Closed
kamaldeep-ebay opened this issue Jan 2, 2015 · 7 comments
Closed

Installation fails if multiple ZK #337

kamaldeep-ebay opened this issue Jan 2, 2015 · 7 comments

Comments

@kamaldeep-ebay
Copy link

Came across this minor issue in installation . If you have multiple ZK in your cluster installation fails giving error

java.lang.IllegalArgumentException: Zookeeper connection string is null or empty

This is because the deploy.sh scripts gets the ZK quorum from HbaseConfigPrinter at
/job/src/main/java/com/kylinolap/job/deployment/HbaseConfigPrinter.java#L46

which returns all the ZK configured but the installation script deploy.sh expects only 1.

deploy.sh - https://github.com/KylinOLAP/Kylin/blob/master/deploy.sh#L126

As a workaround you can set KYLIN_ZOOKEEPER_URL="ZK1:2181:/hbase-unsecure"

But better solution is to change /job/src/main/java/com/kylinolap/job/deployment/HbaseConfigPrinter.java#L71

Tokenize the string using ":" operator and pick up the first ZK from that and return that 1 ZK value only . Let me know if i should create a patch

@binmahone
Copy link

it'd be great if you could contribute your patch, thanks for contributing!

@binmahone
Copy link

@kamaldeep-ebay , according to http://hbase.apache.org/book.html#example_config, multiple should be separated by comma, isn't it?

hbase.zookeeper.property.clientPort
2222
Property from ZooKeeper's config zoo.cfg.
The port at which the clients will connect.



hbase.zookeeper.quorum
rs1.example.com,rs2.example.com,rs3.example.com,rs4.example.com,rs5.example.com
Comma separated list of servers in the ZooKeeper Quorum.
For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
By default this is set to localhost for local and pseudo-distributed modes
of operation. For a fully-distributed setup, this should be set to a full
list of ZooKeeper quorum servers. If HBASE_MANAGES_ZK is set in hbase-env.sh
this is the list of servers which we will start/stop ZooKeeper on.

@kamaldeep-ebay
Copy link
Author

Yes you are right you need the value hbase.zookeeper.quorum (since ZOOKEEPER_QUORUM is "hbase.zookeeper.quorum" property ) which is comma separated.

In HbaseConfigPrinter.java we need
sb.append("export KYLIN_ZOOKEEPER_QUORUM=" + new StringTokenizer(ConfigLoader.ZOOKEEP_QUORUM_LOADER.loadValue(), ",").nextToken() + "\n");

@binmahone
Copy link

cool. Anyway, I'm going to submit another patch to support multiple quorums, after all, only taking the first quorum is not the perfect solution:)

@lukehan
Copy link
Contributor

lukehan commented Jan 20, 2015

@lukehan lukehan closed this as completed Jan 20, 2015
@kamaldeep-ebay
Copy link
Author

Totally Agree But i think there is another problem here , Though the change proposed will work when you install kylin but if you click on the SQL tab on the test cubes created it will throw same Connection String is null error.

I was retracing the getSql method that invokes this and see this is called from Cubecontroller so we need to ensure that the ZK value taken up in t he CubeService also takes the correct ZK value .

Attached screenshot
screen shot 2015-01-20 at 4 11 33 pm

@binmahone
Copy link

hi @kamaldeep-ebay can you please pull the latest code on branch "staging" and try again? I faced the same problem during revising, and already got it fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants