Posts

Simple log analysis with Apache Spark Java API

In this post we will try to redo the sample that we did in my previous post Simple log analysis with Apache Spark , using the Spark JAVA api and since i am more accustomed to maven we will create a simple maven project to accomplish this task. For this post i will not use a separate Spark cluster, we will just use an embedded Spark that will automatically startup a server when running the code. First lets create a new maven project. I am using Intellij Idea. I will name my project LogAnalizer. The first thing you would need to do is add the maven dependencies to your pom file. To do this add the following lines into the pom.xml file in your newly created Maven project. You will also need to add the repository. <repositories> <repository> <id>Akka repository</id> <url>http://repo.akka.io/releases</url> </repository> </repositories> <dependencies> <dependency...

WSO2 ESB - The Fastest ESB

Image
In any middleware stack the ESB plays an very important role. And WSO2 ESB Again has proven to be the Fastest ESB available out there . The latest performance round ( 7.5 ) that compared the WSO2 ESB with other known ESB's have proven that WSO2 ESB outperforms all the other ESB in all the areas. Take a look at the diagrams below to check the comparisons. You can take a look at the complete report here -  ESB Performance Round 7.5 . If you are new to WSO2 ESB take look at the product here -  WSO2 Enterprise Service Bus

Setting up a local 3 node Cassandra cluster on single machine

When trying to create a Cassandra cluster for a small test scenario i came across the fact that it is not possible to create a cluster in a single machine by changing ports. Since i didn't want to set it up on several machines did some digging and with some help found a workaround for this. The workaround is to add virtual Ethernet devices to our machine and use these to configure the cluster. So first we need to create 3 ip aliases for our machine, you can use the following command to get this done. This is for a Linux machine check out the stack overflow thread to check how its done on windows here ifconfig eth0:1 192.168.0.2 ifconfig eth0:2 192.168.0.3 ifconfig eth0:3 192.168.0.4 you can check if the aliases are created by executing 'ifconfig'. once you have this setup all you have to do is configure the Cassandra configurations. You need to change the values of the following entries cassandra.yaml file as follows Node 1: - seeds: "192.168.0.2" ...

Simple log analysis with Apache Spark

Image
In this post we will try to learn to run some simple commands with Spark, some simple transformations and actions. We will do some simple log analysis using Spark. I will be using the local Spark cluster that i setup on my laptop. if you haven't read my first post on how to setup an Spark cluster on your local machine i recommend you read the post  How to set up a Apache Spark cluster in your local machine . First we will connect the the cluster with the following command. MASTER= spark://pulasthi-laptop:7077 ./spark-shell "spark://pulasthi-laptop:7077" is the URL of the master that can be found in the Spark web ui. After connecting successfully you should be able to see an Scala console where you can execute commands. Also you should be able to see your application listed in the web-ui under running applications. To run this scenarios i am using a set of log files generated from various WSO2 products as sample data. Any set of log files or even just a set of ...

How to set up a Apache Spark cluster in your local machine

Image
The past few days i grew some interest in Apache Spark and thought of playing around with it a little bit. If you haven't heard about it go an take a look its a pretty cool project it claims to be around 40x faster than Hadoop in some situation. The incredible increase in performance is gained by leveraging in-memory computing technologies. I want go into details about Apache Spark here if you want to get a better look at Spark just check out there web site -  Apache Spark . In this post we will be going through the steps to setup an Apache Spark cluster on your local machine. we will setup one master node and two worker nodes. If you are completely new to Spark i recommend you to go through  First Steps with Spark - Screencast #1  it will get you started with spark and tell you how to install Scala and other stuff you need. We will be using the  launch scripts that are provided by Spark to make our lives more easier. First of all there are a couple of conf...

WSO2 Governance Registry - Lifecycle Management Part 2 - Transition Validators

This is the second post of "WSO2 Governance Registry - Lifecycle Management" post series. In the first post -  Part 1 - Check Items  we gave a small introduction to lifecycle management in WSO2 Governance Registry  and looked at how check items can be used and did a small sample on that.  In this post we will look at Transition Validators as mentioned in the previous post. As mentioned in part 1 transition validations can be used within check items and it can also be used separately ( All the validators will be called only during a state transition, checking a check item will not call the validator ). we will take a look at the same config this time with two transition validation elements. <aspect name="SimpleLifeCycle" class="org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle"> <configuration type="literal"> <lifecycle> <scxml xmlns="http://www.w3.org...

How to revert all the local changes in SVN

When working with SVN now and then you will need to revert changes that was done by you or by applying a patch. Recently i wanted to revert all the changes done locally and found a nice command that can get this done :). Thanks goes to the original poster here . svn st -q | awk '{print $2;}' | xargs svn revert Hope this helps someone who is looking for the same functionality.