zookeeper+eclipse+plug in

14
ZooKeeper Eclipse Plug-in (pre-release) Author: Mark Masse Author Contact Info [email protected] http://www.linkedin.com/in/markmasse Overview The ZooKeeper Eclipse Plug-in is intended to be a full-featured browser and editor for ZooKeeper . History I began development of the ZooKeeper Eclipse Plug-in in late December 2009. I am still new at working with ZooKeeper and this is also my first attempt at creating an Eclipse Plug-in. This is a “side-project” that I have worked on in my spare time. Thus far I have been the sole developer (and graphic designer) for this plug-in. Dependencies The ZooKeeper Plug-in depends on: The ZooKeeper Java API version 3.2.2. Specifically on the libraries: zookeeper-3.2.2.jar and log4j-1.2.15.jar. These are the only Java dependencies introduced so far. The Eclipse Platform version 3.5.0. Release Plans I intend to have an open source release of this plug-in. Beyond that, I haven’t thought much about the how and where. I am new to both the ZooKeeper and the Eclipse Plug-in communities so I would appreciate some guidance. Ultimately I imagine that there will be an Eclipse Update Site and that users will download and update the plug-in that way. Features The ZooKeeper Eclipse Plug-in has many features, some of which are completed and others which are still on the “TODO” list. The following is a summary of many of the key, already completed features. ZooKeeper Connections Creation of new ZooKeeper connections via a Wizard. Wizard supports naming the connection, specifying the session timeout, an optional Znode root path (ZooKeeper’s “chroot” feature), and a list of servers. Management of multiple ZooKeeper connections with the connection details stored in the Plug-in user’s local directory. Each ZooKeeper connection is displayed as root tree nodes in the Plug-in’s ZooKeeper Explorer view. Optional support for a JMX connection for each server specified in the ZooKeeper connection ensemble. ZooKeeper Explorer View The main singleton view for the Plug-in. Tree view displaying the ZooKeeper connections as root nodes with sub-nodes for the Servers and the root znode (“/”). Lazy loading of data via SWT’s “virtual” tree widget allowing the plug-in to efficiently manage the amount of data requested from the ZooKeeper connection and loaded into the UI. Specifically, znodes (stat, data, and child paths) are loaded on demand when the tree is expanded.

Upload: misbms

Post on 07-Apr-2015

468 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ZooKeeper+Eclipse+Plug In

ZooKeeper Eclipse Plug-in (pre-release) Author: Mark Masse

Author Contact Info [email protected] http://www.linkedin.com/in/markmasse

Overview The ZooKeeper Eclipse Plug-in is intended to be a full-featured browser and editor for ZooKeeper.

History I began development of the ZooKeeper Eclipse Plug-in in late December 2009. I am still new at working with ZooKeeper and this is also my first attempt at creating an Eclipse Plug-in. This is a “side-project” that I have worked on in my spare time. Thus far I have been the sole developer (and graphic designer) for this plug-in.

Dependencies The ZooKeeper Plug-in depends on:

• The ZooKeeper Java API version 3.2.2. Specifically on the libraries: zookeeper-3.2.2.jar and log4j-1.2.15.jar. These are the only Java dependencies introduced so far.

• The Eclipse Platform version 3.5.0.

Release Plans I intend to have an open source release of this plug-in. Beyond that, I haven’t thought much about the how and where. I am new to both the ZooKeeper and the Eclipse Plug-in communities so I would appreciate some guidance. Ultimately I imagine that there will be an Eclipse Update Site and that users will download and update the plug-in that way.

Features The ZooKeeper Eclipse Plug-in has many features, some of which are completed and others which are still on the “TODO” list. The following is a summary of many of the key, already completed features.

ZooKeeper Connections

• Creation of new ZooKeeper connections via a Wizard. Wizard supports naming the connection, specifying the session timeout, an optional Znode root path (ZooKeeper’s “chroot” feature), and a list of servers.

• Management of multiple ZooKeeper connections with the connection details stored in the Plug-in user’s local directory.

• Each ZooKeeper connection is displayed as root tree nodes in the Plug-in’s ZooKeeper Explorer view.

• Optional support for a JMX connection for each server specified in the ZooKeeper connection ensemble.

ZooKeeper Explorer View

• The main singleton view for the Plug-in.

• Tree view displaying the ZooKeeper connections as root nodes with sub-nodes for the Servers and the root znode (“/”).

• Lazy loading of data via SWT’s “virtual” tree widget allowing the plug-in to efficiently manage the amount of data requested from the ZooKeeper connection and loaded into the UI. Specifically, znodes (stat, data, and child paths) are loaded on demand when the tree is expanded.

Page 2: ZooKeeper+Eclipse+Plug In

Editors

• In Eclipse, the primary data viewers are called “Editors”. The ZooKeeper Plug-in currently provides editors for the following data types:

o Znode. A multi-page editor with pages to display/edit a znode’s: data, children, ACL, and stat. Znode data may be exported and edited in external files. Znode data can be imported (replaced) from the contents of a file.

o Various JMX data viewers that currently offer jconsole-like views of the ZooKeeper JMX API. o Znode “Table Editor” that allows for multiple znodes to be edited in a spreadsheet-like way.

Model/View Design

• Data is loaded and managed via a model/view framework that enables the updating of views whenever the data model is changed. As an example of this, changes to znodes are reflected immediately via ZooKeeper’s Watcher capability being extended into the Plug-in’s model view framework. The bottom line is that user’s rarely if ever need to manually “click the Refresh button” to see the latest version of ZooKeeper (and JMX) data.

Screens The screens below should provide an overall sense of the ZooKeeper Plug-in’s current capabilities.

Page 3: ZooKeeper+Eclipse+Plug In

Creating a new ZooKeeper Connection via the Wizard…

Adding a server to the ZooKeeper Connection…

Page 4: ZooKeeper+Eclipse+Plug In

ZooKeeper Explorer view…

Page 5: ZooKeeper+Eclipse+Plug In

ZooKeeper Explorer view (on the left). Viewing or editing znode data as a file (on the right)…

Note that the znode data may also be edited as text by selecting that Edit Mode’s radio button.

Page 6: ZooKeeper+Eclipse+Plug In

ZooKeeper Explorer view’s context menu for a selected (parent) znode…

Page 7: ZooKeeper+Eclipse+Plug In

The second tab (Children) selected inside the znode editor…

Page 8: ZooKeeper+Eclipse+Plug In

The third tab (ACL) selected inside the znode editor…

Page 9: ZooKeeper+Eclipse+Plug In

The fourth tab (Stat) selected inside the znode editor…

Page 10: ZooKeeper+Eclipse+Plug In

Creating a new znode via the wizard…

Page 11: ZooKeeper+Eclipse+Plug In

Setting the initial ACL via the second page of the “New Znode Wizard”…

Page 12: ZooKeeper+Eclipse+Plug In

Editing multiple znodes in the table editor...

Note that the second column (“Data”) provides an in-line text editor for the selected row. Also has full keyboard traversal to enable speedy editing.

Page 13: ZooKeeper+Eclipse+Plug In

One of the JMX views (MBean)…

Future Plans I have a pretty large TODO list that I am working from, but generally…

• Feature-wise, I need to create a few more editors.

• I also want to clean up the comments and add decent javadoc.

• Add logging to the Eclipse Error Log view.

• Write unit tests... I regret not starting off with a more test-driven approach.

• Separate the code a bit so that the JMX portion can be turned into a stand-alone JMX plug-in or an extension for other plug-ins.

Page 14: ZooKeeper+Eclipse+Plug In

• Create a build script.

• Release it.