Skip to main content

Posts

Showing posts from March, 2013

BIG DATA for .NET Devs: HDInsight, Writing Hadoop Map Reduce Jobs In C# And Querying Results Back Using LINQ

Azure HD Insight Services is a 100% Apache Hadoop implementation on top of Microsoft Azure cloud ecosystem.  In this post, we’ll explore HDInsight/Hadoop on Azure in general and steps for starting with the sameWriting Map Reduce Jobs for Hadoop using C# in particular to store results in HDFS. Transferring the result data from HDFS to Hive Reading the data back from the hive using C# and LINQPreface If you are new to Hadoop and Big Data concepts, I suggest you to quickly check outA quick introduction to HadoopA quick introduction to Map ReduceAn introduction to Hadoop HDInsight Services on AzureThere are a couple of ways you can start with HDInsight.You may Go to Azure Preview features and opt in for HDInsight and/or install the same locally Step 1: Setting up your instance locally in your WindowsFor Development, I highly recommend you to install HDInsight developer version locally – You can find it straight inside the Web Platform installer. Once you install the HDInsight locally, ens…

Reflection API Changes in .NET 4.5 Applications and Fun with Custom Reflection Context

Before .NET 4.5, as you are aware, the Type class in System namespace was used for most of the reflection scenarios. Though you can use Type class to inspect meta data, this is really heavy weight. As most reflection scenarios are just read only (for example, using attributes for providing meta data etc),  Microsoft decided to introduce a light weight, alternate Type API as part of .NET Core profile. If you are wondering about different .NET profiles, here is a good list compiled together.Type and TypeInfoSo to keep the long story short - in .NET 4.5 onwards, Type class got ‘shrunk’ to provide a shallow, high speed read only view of an object’s structure (definition). And TypeInfo class got introduced that contains the actual type definitions with more detailed information. See Type and TypeInfo – and check out the platform specific support for it’s members. You can read more about the Reflection API changes hereThe TypeInfo class represents type definitions and the Type class represe…

Azure Hadoop HDInsight Tools – Wrote A VS Add In For LINQ To Hive Model Generation and Hive SQL Queries

This post is about the HD Insight Tools Visual Studio Add In -  for accessing Azure Hadoop Hive  from Visual Studio. I hacked together the same on my way back from the MVP summit, and a post is due. If you are new, last week I wrote about issuing LINQ queries against the Hive meta store – read that post for a general introduction about LINQ to Hive.You may use HDInsight Tools Visual Studio Add In forGenerating wrapper classes for Hive tables for easily executing LINQ to Hive queries.Running Hive SQL queries from Visual Studio and for viewing the resultsPlease note that you need to provision a Hadoop cluster in Azure, or need HDInsight installed locally (See these earlier posts related to Hadoop on Azure - Analyzing some ‘Big Data’ using C# and Extracting Top 500 MSDN Links from Stack Overflow ).Installing The Add InYou can install the Add In from Visual Studio Tools –> Extensions and Updates.Generating LINQ To Hive Model ClassesOnce you install the Add In, Goto View-> Other Wind…

About That ‘Feelings’ In Software Industry

When I read Built to Last few years back, I got stumbled upon this fact – it is all about building a cult. And a cult is not a bad thing. You can base it on some ethical values, and can sprinkle stories and sutras around the same to make it more exciting. Or, you may brand it as your corporate culture. But in the end of the day, it is all about building a cult which looks original and rallying your employees and customers around the same with out shaking their belief. In the last ten years, Steve Jobs did that much better than any one else. I think he learned about the art of creating a cult when he was wandering in India, may be from Neem Karoli Baba. Today, people worship Apple.I believe successful organizations are good in assembling together such a framework that can yield repeatable behavioral patterns from all stakeholders, most importantly, customers. Any successful organization need at least one iconic leader with charisma to grow beyond mediocrity. People buy a brand not just…

AutoCommand For MVVM – More tricks With Lambdas and CallerMemberName

Few days back I ranted about Lamdba Patterns in C# and Init Time branching.  I also had a generally insane example regarding Init Time branching using CallerMemberName attribute, and got few comments about the usefulness (or the lack of the same). While I generally agree with the comments, here is a may be useful, still crazy AutoCommand for your next basement MVVM application. First, here is how the AutoCommand will work. //Our simple View Model public class SimpleMathViewModel : BaseViewModel { public SimpleMathViewModel() { Commands = new Dictionary<string, Action> { {"Add", ()=>Result=A+B}, {"Substract", ()=>Result=A-B}, {"Multiply", ()=>Result=A*B}, {"Divide", ()=>Result=A/B} }; } //Your commands should get automatically wired up public ICommand Add { get …