Monday, June 18, 2012

Cassandra GUI 2.0 - Making things a little bit easier

Cassandra GUI evolved from its first version and new version includes bug fixes and enhanced features.

New features.

  • Complete pagination for Row view of explorer
  • Search rows by their names. (Filtered on the fly as you type.)
  • Filtering non displayable data and label them with warnings.

Bug Fixes

  • Remote connection problem
  • Connect to Remote Cassandra server without restarting the server.

Start the Server


Extract the downloaded product and lets refer extracted folder as CARBON_HOME.

go to CARBON_HOME/bin and run sh wso2server.sh (linux) or
wso2server.bat

Log in to the admin console using https://localhost:9443/
default user name and password : admin, admin

Following screen shots include a quick flow on how it works.


1) Click connect to cluster on right hand side panel. Give connection URL and credentials (if there is any) to connect.

eg: URL = localhost:9160,  or  10.100.3.234:

2) After a Successful connection you will be directed to keyspace listing page. Which will include Keyspaces and clickable column family names. Click on a Column Family to Explore data.




3) Row view Page.
After clicking the column family you have landed in the row view page. It includes rows of your column family and a slice of column data as a summary.

You can search, paginate or change no of items to filter your data. Click "view more" to explore a single row.



4) Column family view page will list all the columns in a single row. You can filter the data with column name,value or time stamp. full numbered pagination is available. 


10 comments:

  1. hello,
    I installed your tools,
    I have two remarks:

    1) I can not change data in my keyspaces from this tool, this tool is that just serves to display the data, and not edit or delete them?!

    2) in our project was that data in XML format, and aparament your program, he interprets the XML into HTML, so, I not show my data correctly, but they maquent lot of things.

    voila comment il affiche le XML :

    1X00066655542 PF AFFECTE
    http://trunk.localhost/UTE/enveloppe/v2/1X00066655542 2012-08-03T10:18:50Z 25
    1X00066655542
    01 A12345 118512
    25A123452012-08-03T10:18:50.830Z2012-08-03T10:18:50ZAAAOOO
    2012-08-03T10:18:51Z

    thank you answer me and tell me how to solve these problems.

    ReplyDelete
    Replies
    1. Hi,
      Please find the answers below.
      1) Yes. This tool is only to view /explore the data (As of the current version.)

      2) It was a bug and it has been fixed (Had to escape XML special characters to avoid swallowing xml tags). If you are in urgency to add that patch i can provide you with the steps. Or else will share the released version soon.

      Thanks

      Delete
  2. I get the following error while listing rows from a column family.

    DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.

    ReplyDelete
    Replies
    1. Have you kept the tool idle for a considerable time like 20 mints or more. Were there any error logs at the console. There is a bug that when session got timed out it does not give a proper warning. We will fix it soon. As a workaround you can login through the management console again and continue for the moment.

      Delete
    2. Hi!

      Thanks for the update.

      I've got the same error as muthu.v when I'm trying to browse a CF. I'm trying to open the CF just after loging in so it's not a timeout problem.

      We are using CompositeType in our CF, don't know if it could cause the problem ?

      Delete
  3. Hi, I'd like to use your GUI tool to access to the Cassandra. However, under Windows, when I run wso2server.bat, I got exception like this:

    java version "1.6.0_29"
    Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)
    java version "1.6.0_29"
    Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
    JAVA_HOME environment variable is set to C:\Program Files\Java\jdk1.6.0_29
    CARBON_HOME environment variable is set to C:\Program Files\wso2carbon-4.0.0-SNAPSHOT
    Exception in thread "main" java.lang.NoClassDefFoundError: Files\wso2carbon-4/0/0-SNAPSHOT\repository\conf\carbon/xml
    Caused by: java.lang.ClassNotFoundException: Files\wso2carbon-4.0.0-SNAPSHOT\repository\conf\carbon.xml
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: Files\wso2carbon-4.0.0-SNAPSHOT\repository\conf\carbon.xml. Program will exit.

    Did I miss something? Or can you fix this issue? thanks a lot!

    ReplyDelete
  4. Hi Shelan,

    I was looking for simple readonly tool for cassandra data access. Thanks for this information.
    However I was getting same error:

    DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.

    We are storing data in JSON format for cassandra 1.0.7. I am trying with Carbon 4.0.0.

    ReplyDelete
  5. Hi all,

    JSON format error popping due to a limitation in the UI framework used. Whenever there is an exception it is not possible to send it to UI in a proper format, thus resulting this. You can have more details at the backend server log normally. Now Cassandra Explorer is a part of WSO2 BAM server. Can you try it and see if that resolves the problem. You can download it from here. http://wso2.com/products/business-activity-monitor/ . If the error persist could you please share if there are any errors logged at the console.

    ReplyDelete
  6. Hi Shelan, i was also getting same JSON data from server could not parsed error.
    Here are the errors from console:
    [2013-05-23 14:41:47,227] ERROR {org.apache.axis2.rpc.receivers.RPCMessageReceiver} - Cassandra encountered an internal error processing this request: TApplicationError type: 6 message:Internal error processing get_range_slices
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    Caused by: me.prettyprint.hector.api.exceptions.HCassandraInternalException: Cassandra encountered an internal error processing this request: TApplicationError type: 6 message:Internal error processing get_range_slices
    at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:31)
    at me.prettyprint.cassandra.service.KeyspaceServiceImpl$3.execute(KeyspaceServiceImpl.java:163)
    at me.prettyprint.cassandra.service.KeyspaceServiceImpl$3.execute(KeyspaceServiceImpl.java:145)


    Thanks
    -Srinivas

    ReplyDelete
  7. org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet [bridgeservlet] in context with path [/] threw exception [Exception in JSP: /cassandraexplorer/row_datatable_ajaxprocessor.jsp:90

    87: JSONArray valueArray = new JSONArray();
    88: valueArray.add(rows[i].getRowId());
    89: Column[] columns = rows[i].getColumns();
    90: for (int j = 0; j < rows[i].getColumns().length; j++) {
    91: valueArray.add(columns[j].getValue());
    92: }
    93: if (rows[i].getColumns().length < 3) {


    Stacktrace:] with root cause
    java.lang.NullPointerException
    at org.apache.jsp.cassandraexplorer.row_005fdatatable_005fajaxprocessor_jsp._jspService(row_005fdatatable_005fajaxprocessor_jsp.java:129)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:161)

    ReplyDelete