Tuesday, July 21, 2015

Connencting Microsoft SQL Server with Apache Spark

I have been working on a project which involves using some data from SQL in a Spark program.
I found one blog post which mentioned it in good detail, but I still had to spend a an hour or so working out the details. I thought it might be useful to write down every step I had to take to get this working.
I am using the following:
Microsoft SQL Server 2008 R2. (this is in a data center and I connect to it remotely).
Apache Spark 1.4.0
Mac OS X 10.10.4
Java version 1.8
If you want to use a query to load specific data instead of loading the entire table, you will have to use the as "Alias" as part of the SQL query. I kept getting a SQL Exception about the "where" clause being incorrect.
PS. This blog was written in a hurry. If you need more details leave a comment and I will try to include that.

Wednesday, September 19, 2012

Java on Cent OS


I spent the better half of my morning trying to install java on a Cent OS installation on Vmware. Well more time spent trying to download the java installation (bin) file from Oracle website. if you try to download directly you might get a "302 temporarily moved" error.

I downloaded the file onto my host machine, uploaded it to public folder of Dropbox and used Wget from Cent Os using the public link given by dropbox. and this time it worked like a charm :) .

The rest of the installation was smooth, thanks to this article..

http://chrisschuld.com/2008/10/installing-sun-java-on-centos-5-2/



Cheers,
Shreejay

Thursday, October 20, 2011

Mac OS X 10.6.8 wireless issues

I had been having some trouble with wireless networks after updating to 10.6.8. There are numerous posts on the internet about this. I did install the combo update, but my system would still sometimes drop connections for no reason. Tried resetting the SMC, tried deleting all the networks and adding them back. But still the same. Today morning my macbook pro just refused to connect altogether. (Seemed like it finally gave up! :) ). Anyways, after a lot of search and figuring out that it was connected and able to ping servers (Ip) outside the network, I finally deleted the SystemConfiguration file under HD/Library/Preferences (I did take a backup of the folder just in case!). Mac is supposed to rebuild these preferences from scratch if you delete it. And it worked!! Well my mac connected instantly to the internet and has not dropped connection yet. Lets see how it goes. Will post the details in a day or two.

Disclaimer
Please do the above at your own risk. And always ALWAYS take a backup. What worked for my system might not work for yours. 

Wednesday, August 17, 2011

Google Annotated timeline - good example

Anyone interested in using the Google Annotated timeline should go through this code:

The examples provided by google are quite simple and does not provide much information about the methods and events of the timeline. The code provided above uses most of the methods and might come in handy while integrating this timeline in a bigger project.

Cheers!!!

Thursday, August 11, 2011

Error calling method on NPObject

Recently got this error while trying to a Motion Chart (Google Visualization).

Went through quite a few webpages to find the issue. It seems it was a flash security issue.

Solution:

The google api which is called using https://www.google.com/jsapi
should be changed to unsecure using HTTP.

Not sure about the security issues related to it, but for my application functionality is the primary concern now :).
More stuff related to JS and Google visualization on its way !!!