README.txt 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. ==========================================
  2. ZooInspector - Browser and Editor for ZooKeeper Instances
  3. Author: Colin Goodheart-Smithe
  4. Date: February 2010
  5. ==========================================
  6. ZooInspector is a Java Swing based application for browsing and editing ZooKeeper instances.
  7. Contents
  8. --------
  9. - Features
  10. - Pre-requisites
  11. - Build Instructions
  12. - Using ZooInspector
  13. - Creating and Using Plugins
  14. Features
  15. --------
  16. Below is a list of features in the current release of ZooInspector.
  17. - Load connection settings from a zookeeper properties file
  18. - Pluggable DataEncryptionManagers to specify how data should be encrypted and decrypted in the Zookeeper instance
  19. - Browsable tree view of the ZooKeeper instance
  20. - View the data in a node
  21. - View the ACLs currently applied to a node
  22. - View the metadata for a node (Version, Number of Children, Last modified Time, etc.)
  23. - Pluggable NodeViewers interface
  24. - Ability to save/load and set default Node Viewers
  25. Maven Build Instructions
  26. -------------------------
  27. 0. Pre-requisites
  28. - Run "mvn install" in the root directory of the Zookeeper project
  29. 1. Open a command line
  30. 2. cd into this directory
  31. 3. mvn install
  32. 4. To run ZooInspector run zooInspector.cmd (on Windows) or zooInspector.sh (on Linux) (these scripts will
  33. find the built JAR automatically in the "target" directory as long as you don't move it)
  34. Ant Build Instructions
  35. -----------------------
  36. 0. Pre-requisites
  37. - The main zookeeper build script must have been run before building this module
  38. 1. Open a command line.
  39. 2. cd into this directory
  40. 3. Run command: ant
  41. 4. ZooInspector will be built to ../../../build/contrib/ZooInspector
  42. 5. Copy zookeeper-3.x.x.jar into the lib sub-directory (if you are using zookeeper-3.3.0.jar it will have been
  43. copied to this directory during the build
  44. 6. By default the zookeeper.cmd and zookeeper.sh files expect zookeeper-3.3.0.jar. If you are using another version
  45. you will need to change these files to point to the zookeeper-3.x.x.jar you copied to the lib directory
  46. 7. To run ZooInspector run zooInspector.cmd (on Windows) or zooInspector.sh (on Linux). If you are using
  47. zookeeper-3.3.0.jar and do not require any classpath changes you can run the zookeeper-dev-ZooInspector.jar
  48. directly
  49. Using ZooInspector
  50. ------------------
  51. To start ZooInspector run zooInspector.cmd (on Windows) or zooInspector.sh (on Linux). If you are using
  52. zookeeper-3.3.0.jar and do not require any classpath changes you can run the zookeeper-dev-ZooInspector.jar
  53. directly.
  54. Click the play button on the toolbar to bring up the connection dialog. From here you can enter connection
  55. information for your zookeeper instance. You can also load the connection properties from a file. This file can
  56. have the format as a normal zookeeper properties file (i.e. hosts and timeout key-value pairs) and van optional have
  57. an encryptionManager key-value pair to specify the DataEncryptionManager to use for this connection
  58. (DataEncryptionManagers are explained in further detail in the 'Creating and Using Plugins' section below). You can
  59. also set the entered information as the defaults so that when you first start ZooInspector these settings are
  60. automatically loaded into this dialog. Pressing the OK button with connect to your ZooKeeper instance and show the
  61. current node tree on the left of the main panel.
  62. Clicking a node in the node tree will load the data for that node into the node viewers. Three node viewers are
  63. currently distributed with ZooInspector:
  64. 1. Node Data - This enables you to see the data current stored on that node. This data can be modified and
  65. saved. The data is decrypted and encrypted using the DataEncryptionManager specified on the connection
  66. dialog.
  67. 2. Node Metadata - This enables you to see the metadata associated with this node. This is essentially the data
  68. obtained from the Stat object for this node.
  69. 3. Node ACLs - This allows you to see the ACLs currently applied to this node. Currently there is no ability
  70. to change the ACLs on a node, but it is a feature I would like to add.
  71. Other custom Node Viewers can be added, this is explained in the 'Creating and Using Plugins' section below.
  72. Creating and Using Plugins
  73. --------------------------
  74. There are two types of plugin which can be used with ZooInspector:
  75. 1. DataEncryptionManager - This specifies how data should be encrypted and decrypted when working with a
  76. zookeeper instance.
  77. 2. ZooInspectorNodeViewer - This is a GUI panel which provides a view of visualisation on a node.
  78. More information on these interfaces can be found in the javadocs for this module.
  79. To use a plugin in ZooInspector, build the plugin to a jar and copy the jar to the lib sub-directory. Edit the
  80. zooInspector.cmd and/or zooInspector.sh files to include your new jar on the classpath and run ZooInspector.
  81. For DataEncryptionManagers, click the play button to open the connection dialog and enter the full class name of
  82. your DataEncryptionManager in the 'Data Encryption Manager' field. You can make this Data Encryption Manager the
  83. default by clicking 'Set As Default'. Click the 'OK' button to instantiate and use your plugin.
  84. For ZooInspectorNodeViewers, Click the 'Change Node Viewers' button on the toolbar (looks like a tree with a pencil)
  85. and enter the full classname for your Node Viewer in the field left of the 'Add' button, then click the 'Add'
  86. button. The Node Viewer will be instantiated and should appear in the list. You can change the order of the Node
  87. viewers by clicking the up and down buttons and delete a Node Viewer by clicking the delete button. You can save
  88. to configuration to a file or set it as the default if necessary. Then click the 'OK' button and your Node Viewer
  89. should appear in the tabs on the right of the main panel.