Friday, 15 July 2011

Java class to read a zoo.cfg using Apache Zoo Keeper -


I am working with Apache Zucker and I have been asked to read zoo.cfg which has the attribute:

  TickTime = 2000 DataDir = / var / lib / zookeeper clientPort = 2181 server.1 = 192.168.100.125: 2888: 3888 Server 2 = 1 9 2.168.3.41: 2888: 3888  < / Ex> 

I was looking for a section of structure (org.apache.zookeeper ...) but I could not find anything, I had some information but I have got something related to some sections which I use I am not involved in the jar In and does not allow me to add another library. Code is given to me:

  System.setProperty ("java.security.auth.login.config", "conf / zoo.conf");   

I was planning to read it from system property, but I do not know it would be a good practice. what would you suggest? Or any suggestions please?

Thank you in advance for your help best regards.

You can use and load the zoo.cfg file. Specific values ​​will be presented as strings. It will be more sophisticated, but two or more additional libraries will be required to be included in it.

Regards, Christian

No comments:

Post a Comment