<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Benjamin Guinebertière</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/benjguin/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/benjguin/feed.xml</link>
    <description>This blog is about Microsoft Azure. Older stuff include architecture, SOA, BizTalk, ...</description>
    <lastBuildDate>Tue, 16 Apr 2019 04:46:05 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>La suite sur https://blog.3-4.fr | Additional blog posts on https://blog.3-4.fr</title>
      <link>https://docs.microsoft.com/archive/blogs/benjguin/la-suite-sur-httpblog-3-4-fr-additional-blog-posts-on-httpblog-3-4-fr</link>
      <pubDate>Wed, 02 Dec 2015 05:04:37 GMT</pubDate>
      <dc:creator><![CDATA[Benjamin GUINEBERTIERE]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/benjguin/2015/12/02/la-suite-sur-httpblog-3-4-fr-additional-blog-posts-on-httpblog-3-4-fr/</guid>
      <description><![CDATA[Bonjour,
Les billets suivants de ce blog sont sur https://blog.3-4.fr.
Je tweete chaque nouveau...]]></description>
      <content:encoded><![CDATA[<p>Bonjour,</p>
<p>Les billets suivants de ce blog sont sur <a href="https://blog.3-4.fr">https://blog.3-4.fr</a>.</p>
<p>Je tweete chaque nouveau billet.</p>
<p>&nbsp;</p>
<p>Hi,</p>
<p>Next blog posts are at <a href="https://blog.3-4.fr">https://blog.3-4.fr</a>.</p>
<p>I tweet for any new blog post.</p>
<p>&nbsp;</p>
<p>:-)</p>
<p>Benjamin (@benjguin)</p>]]></content:encoded>
    </item>
    <item>
      <title>Hadoop : Comment réduire ses coûts HDInsight pour le développement</title>
      <link>https://docs.microsoft.com/archive/blogs/benjguin/hadoop-comment-rduire-ses-cots-hdinsight-pour-le-dveloppement</link>
      <pubDate>Mon, 16 Nov 2015 10:00:44 GMT</pubDate>
      <dc:creator><![CDATA[Benjamin GUINEBERTIERE]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/benjguin/2015/11/16/hadoop-comment-rduire-ses-cots-hdinsight-pour-le-dveloppement/</guid>
      <description><![CDATA[&#160;  Comme on le voit dans ce diagramme, HDInsight est au cœur de la plateforme Big Data de...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>Comme on le voit dans ce diagramme, HDInsight est au cœur de la plateforme Big Data de Microsoft.    <br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3857.image_18FB14E1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3857.image_5F00_18FB14E1.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5164.image_thumb_61B48DA5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5164.image_5F00_thumb_5F00_61B48DA5.png" width="644" height="330" /></a></p>  <p>L’offre Azure Data Lake Analytics et l’offre HDInsight ont un positionnement similaire. Suivant que vous préférez utiliser un code portable tout en bénéficiant d’un service géré, d’une part ou que vous voulez être dans un monde plus centré sur Microsoft d’autre part, vous choisirez plutôt HDInsight ou plutôt Azure Data Lake Analytics. </p>  <p>Dans le cas d’HDInsight, vous pouvez exécuter du code Hive, Pig, Java, Python, Scala, … sur Hadoop, Storm ou Spark… Cela n’est pas très coûteux puisque vous pouvez créer les ressources de calcul nécessaires uniquement pendant le temps d’exécution des batches, et ce de façon automatisée. Si on prend par exemple 2 heures de batch pendant 30 j par mois, cela donne un coût de moins de 500 € pour un cluster avec 2 nœuds principaux et 10 nœuds de calcul :</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7115.image_11723625.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7115.image_5F00_11723625.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4118.image_thumb_47E2E827.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4118.image_5F00_thumb_5F00_47E2E827.png" width="609" height="368" /></a></p>  <p>NB : cela inclut du support qui permet de poser des questions sur votre code. En effet, supposons que vous ayez un problème avec une requête HIVE par exemple; si c’est sur HDInsight, vous pouvez demander au support Microsoft.</p>  <p>&#160;</p>  <p>Cela dit, si vous devez développer sur cet environnement HDInsight, c’est moins optimal puisque l’environnement va tourner plus régulièrement (ex : 8 à 10 h / jour). De plus, on peut créer ou détruire un cluster HDInsight qui va retrouver ses données, mais il peut être plus confortable de travailler sur une machine virtuelle que l’on personnalise un peu avec ses outils, qu’on éteint ou allume en fonction des besoins. Il n’est pas nécessaire d’avoir un cluster complet en développement tant qu’on n’en n’est pas à la phase d’optimisation. </p>  <p>On peut aussi vouloir tester des fonctionnalités nouvelles d’Hadoop. </p>  <p>Pour tout cela, il y a le bac à sable (Sandbox) d’Hortonworks, disponible dans la marketplace d’Azure.</p>  <p>Ce modèle de machine virtuelle comprend des tutoriels, exemples, des outils pour découvrir Hadoop, Spark et aussi l’utiliser comme VM de développement.</p>  <p>Au niveau du prix, cela coûte le prix de la VM. Le modèle de licence est du Bring Your Own License. Voir <a href="https://azure.microsoft.com/en-us/marketplace/partners/hortonworks/hortonworks-sandbox/">https://azure.microsoft.com/en-us/marketplace/partners/hortonworks/hortonworks-sandbox</a><a href="https://azure.microsoft.com/en-us/marketplace/partners/hortonworks/hortonworks-sandbox/">/</a> pour plus d’informations.</p>  <p>Cette page contient un lien pour instancier une VM. </p>  <p>Il faut ensuite remplir un certain nombre de champs, comme pour la création d’une machine virtuelle standard. Dans les quelques copies d’écrans suivantes, on se place dans le cas de la création dans le mode « Resource Manager ». </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7506.image_29983131.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7506.image_5F00_29983131.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8182.image_thumb_5955D9B0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8182.image_5F00_thumb_5F00_5955D9B0.png" width="609" height="395" /></a></p>  <p>Ce mode permet ensuite, lorsque la VM est créée, de configurer des règles de pare-feu depuis le portail (dans le mode « classic », il peut être nécessaire de passer par quelques lignes de commande).</p>  <p>Voici donc comment configurer les accès à votre VM :</p>  <p>Depuis le panneau (« blade ») de la VM dans le portail portal.azure.com, cliquez sur le groupe de ressources qui vous donnera accès au NSG (Network Security Group) du vNet. Là, vous avez accès aux différentes règles entrantes vers le réseau…</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/2502.image_422A5F32.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/2502.image_5F00_422A5F32.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8510.image_thumb_1196E17A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8510.image_5F00_thumb_5F00_1196E17A.png" width="609" height="342" /></a></p>  <p>… </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4237.image_0F5CE96F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4237.image_5F00_0F5CE96F.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8664.image_thumb_237605F8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8664.image_5F00_thumb_5F00_237605F8.png" width="609" height="412" /></a></p>  <p>… auxquelles vous pouvez ajouter deux règles : </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8080.image_7E78457E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8080.image_5F00_7E78457E.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5460.image_thumb_4E50FABB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5460.image_5F00_thumb_5F00_4E50FABB.png" width="609" height="157" /></a></p>  <p>Une pour autoriser votre ou vos adresses IP à accéder à la VM et l’autre pour interdire toutes les autres adresses IP d’Internet. Remarquez le champ « Priority ».</p>  <p>Exemple : </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/6560.image_2BFBF5F3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/6560.image_5F00_2BFBF5F3.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0081.image_thumb_004B2BF7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0081.image_5F00_thumb_5F00_004B2BF7.png" width="167" height="484" /></a></p>  <p>et</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1732.image_347F553D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1732.image_5F00_347F553D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8015.image_thumb_21CA5B86.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8015.image_5F00_thumb_5F00_21CA5B86.png" width="174" height="484" /></a></p>  <p>&#160;</p>  <p>Optionnellement, vous pouvez également donner un nom à l’adresse IP publique de votre VM, comme suit : </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/6622.image_3D02B487.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/6622.image_5F00_3D02B487.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1803.image_thumb_7F0923C8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1803.image_5F00_thumb_5F00_7F0923C8.png" width="609" height="273" /></a></p>  <p>Par exemple, si vous avez déployé en North Europe et que vous avez donné comme nom hdp23sandbox, vous pouvez ensuite naviguer vers <a href="https://hdp23dansbox.northeurope.cloudapp.azure.com:8888">https://hdp23dansbox.northeurope.cloudapp.azure.com:8888</a> et voir une page d’accueil qui contient entre autres des tutoriels :</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7522.image_35E608C0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7522.image_5F00_35E608C0.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8078.image_thumb_7375F73A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8078.image_5F00_thumb_5F00_7375F73A.png" width="609" height="359" /></a></p>  <p>Il est bien sûr aussi possible de se connecter à votre VM en ssh. </p>  <p>Vous pouvez configurer l’accès aux comptes de stockage Azure en ajoutant des clefs valeurs dans le fichier /etc/hadoop/conf/hdfs-site.xml (sudo vi /etc/hadoop/conf/hdfs-site.xml)</p>  <p>- key: fs.azure.account.key.{storage account name}.blob.core.windows.net</p>  <p>- value: {{storage account name} account key (primary or secondary)}</p>  <p>Exemple: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8535.image_67E039FB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8535.image_5F00_67E039FB.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7853.image_thumb_4E0C03CC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7853.image_5F00_thumb_5F00_4E0C03CC.png" width="609" height="306" /></a></p>  <p>Ce qui permet ensuite de travailler sur les fichiers du compte de stockage comme on travaillerait avec HDFS. </p>  <p>Pour rappel, la syntaxe est : </p>  <p>wasb://{container}@{storage account name}.blob.core.windows.net/[{dossier1/dossier2(…)}[/{file name}]</p>  <p>exemple :</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/6177.image_2497C28C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/6177.image_5F00_2497C28C.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7823.image_thumb_11E55986.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7823.image_5F00_thumb_5F00_11E55986.png" width="609" height="287" /></a></p>  <p>qui correspond à </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3286.image_1CA5418C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3286.image_5F00_1CA5418C.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3580.image_thumb_1E759753.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3580.image_5F00_thumb_5F00_1E759753.png" width="609" height="295" /></a></p>  <p>Vous pouvez instancier votre propre « sandbox » depuis cette page : <a href="https://azure.microsoft.com/en-us/marketplace/partners/hortonworks/hortonworks-sandbox/">https://azure.microsoft.com/en-us/marketplace/partners/hortonworks/hortonworks-sandbox</a><a href="https://azure.microsoft.com/en-us/marketplace/partners/hortonworks/hortonworks-sandbox/">/</a>. Cliquez sur le bouton « Create Virtual Machine &gt; »     <br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0574.image_29A1B24E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0574.image_5F00_29A1B24E.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/6445.image_thumb_44DA0B4F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/6445.image_5F00_thumb_5F00_44DA0B4F.png" width="296" height="103" /></a></p>  <p><img class="wlEmoticon wlEmoticon-smile" style="border-top-style: none; border-bottom-style: none; border-right-style: none; border-left-style: none" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4431.wlEmoticon-smile_38D81B1B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4431.wlEmoticon_2D00_smile_5F00_38D81B1B.png" /></p>  <p><a href="https://twitter.com/@benjguin">@benjguin</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Camp 9 DEC 2014: quelques démos IoT + Big Data (vidéos)</title>
      <link>https://docs.microsoft.com/archive/blogs/benjguin/azure-camp-9-dec-2014-quelques-dmos-iot-big-data-vidos</link>
      <pubDate>Thu, 11 Dec 2014 10:28:00 GMT</pubDate>
      <dc:creator><![CDATA[Benjamin GUINEBERTIERE]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/benjguin/2014/12/11/azure-camp-9-dec-2014-quelques-dmos-iot-big-data-vidos/</guid>
      <description><![CDATA[Lors de l&rsquo;Azure Camp du 9 d&eacute;cembre dernier, j&rsquo;ai eu l&rsquo;occasion de montrer...]]></description>
      <content:encoded><![CDATA[<p>Lors de l&rsquo;Azure Camp du 9 d&eacute;cembre dernier, j&rsquo;ai eu l&rsquo;occasion de montrer quelques d&eacute;mos autour des objets connect&eacute;s et de Big Data.</p>
<p>Je publie ici les vid&eacute;os de secours que j&rsquo;avais pr&eacute;par&eacute;es. Ce sont des versions un peu plus longues que ce que j&rsquo;ai pu pr&eacute;senter.</p>
<p>&nbsp;</p>
<p>Vous trouverez la vid&eacute;o de la session compl&egrave;te sur le sujet &agrave; <a href="https://channel9.msdn.com/Blogs/Microsoft-Azure-France/Azure-Camp-9-DEC-2014-Lambda-Architecture">https://channel9.msdn.com/Blogs/Microsoft-Azure-France/Azure-Camp-9-DEC-2014-Lambda-Architecture</a></p>
<p>&nbsp;</p>
<p>Mais revenons aux d&eacute;mos qui tournent autour de l&rsquo;architecture suivante:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1055.image_460D1410.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1055.image_5F00_460D1410.png"><img style="display: inline; border-width: 0px;" title="architecture des d&eacute;mos" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5460.image_thumb_2A017687.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5460.image_5F00_thumb_5F00_2A017687.png" alt="architecture des d&eacute;mos" width="644" height="362" border="0" /></a></p>
<p>&nbsp;</p>
<p>La premi&egrave;re vid&eacute;o montre une vue d&rsquo;ensemble de l&rsquo;ingestion, du traitement en Storm et de la dataviz sans entrer dans le d&eacute;tail de la fa&ccedil;on dont c&rsquo;est fait.</p>
<p><iframe src="https://www.youtube.com/embed/rikFgCBUiSg" frameborder="0" width="640" height="390"></iframe></p>
<p>&nbsp;</p>
<p>Ensuite, on passe &agrave; Storm dans HDInsight:</p>
<p><iframe src="https://www.youtube.com/embed/pLMMJAvllmo" frameborder="0" width="640" height="390"></iframe></p>
<p>&nbsp;</p>
<p>puis &agrave; la DataViz en HTML5 et Excel avec d3js et SignalR:</p>
<p><iframe src="https://www.youtube.com/embed/U6FPaiIqCFY" frameborder="0" width="640" height="390"></iframe></p>
<p>&nbsp;</p>
<p>Dans la d&eacute;mo Hortonworks, je montre comment on peut d&eacute;ployer la m&ecirc;me topologie Storm sur un cluster Hadoop HDP fait de VMs linux install&eacute;es initialement avec l&rsquo;assistant de la markerplace Azure. On voit aussi comment on peut traiter les logs stock&eacute;s dans le blob storage.</p>
<p><iframe src="https://www.youtube.com/embed/8eRZVJdmqcg" frameborder="0" width="640" height="390"></iframe></p>
<p>&nbsp;</p>
<p>Ensuite, on montre qu&rsquo;on peut aussi cr&eacute;er un cluster Cloudera, &eacute;galement via l&rsquo;assistant de la marketplace Azure:</p>
<p><iframe src="https://www.youtube.com/embed/D6Qi-mAlZvk" frameborder="0" width="640" height="390"></iframe></p>
<p>&nbsp;</p>
<p>Arrivent ensuite les deux bases noSQL de la d&eacute;mo.</p>
<p>&nbsp;</p>
<p>HBase:</p>
<p><iframe src="https://www.youtube.com/embed/A-R1j9juiIA" frameborder="0" width="640" height="390"></iframe></p>
<p>&nbsp;</p>
<p>et Datastax Enterprise / Cassandra en multi datacenter:</p>
<p><iframe src="https://www.youtube.com/embed/FHQZj-cz4mE" frameborder="0" width="640" height="390"></iframe></p>
<p>&nbsp;</p>
<p>:-)</p>
<p>Benjamin (<a href="https://twitter.com/@benjguin" target="_blank">@benjguin</a>)</p>]]></content:encoded>
    </item>
    <item>
      <title>How to retrieve R data visualization from Azure Machine Learning</title>
      <link>https://docs.microsoft.com/archive/blogs/benjguin/how-to-retrieve-r-data-visualization-from-azure-machine-learning</link>
      <pubDate>Fri, 24 Oct 2014 03:24:48 GMT</pubDate>
      <dc:creator><![CDATA[Benjamin GUINEBERTIERE]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/benjguin/2014/10/24/how-to-retrieve-r-data-visualization-from-azure-machine-learning/</guid>
      <description><![CDATA[As you may know, Azure Machine Learning can execute R scripts. You can interactively see the output...]]></description>
      <content:encoded><![CDATA[<p>As you may know, Azure Machine Learning can execute R scripts. You can interactively see the output console. But what about retrieving the result as part of a production call to the API generated by Azure ML?</p>  <p>Let’s test with a word cloud example in R. Mollie Taylor has posted one here (<a title="https://gist.github.com/mollietaylor/3671518" href="https://gist.github.com/mollietaylor/3671518">https://gist.github.com/mollietaylor/3671518</a>) that we can reuse in Azure Machine Learning: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0844.image_0DA8EFCD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0844.image_5F00_0DA8EFCD.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1586.image_thumb_79B47E98.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1586.image_5F00_thumb_5F00_79B47E98.png" width="644" height="377" /></a></p>  <p>The details on how to create an Azure ML workspace, insert a dataset and an R script can be found here: </p>  <ul>   <li><a title="https://azure.microsoft.com/en-us/documentation/articles/machine-learning-walkthrough-develop-predictive-solution/" href="https://azure.microsoft.com/en-us/documentation/articles/machine-learning-walkthrough-develop-predictive-solution/">https://azure.microsoft.com/en-us/documentation/articles/machine-learning-walkthrough-develop-predictive-solution/</a></li> </ul>  <p>for R, just use that module: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1325.image_58C39CA2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1325.image_5F00_58C39CA2.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1727.image_thumb_3CB56E68.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1727.image_5F00_thumb_5F00_3CB56E68.png" width="638" height="484" /></a></p>  <p>&#160;</p>  <p>The input of the Web API is set to the input dataset of the R Script and the output is set to the R Device port. As a reminder, here is how the inputs and outputs are positioned in an R Script module: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3833.image_097BC5B0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3833.image_5F00_097BC5B0.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7827.image_thumb_748CD3ED.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7827.image_5F00_thumb_5F00_748CD3ED.png" width="389" height="484" /></a></p>  <p>the detail is available in the <a href="https://studio.azureml.net/Help/html/30806023-392b-42e0-94d6-6b775a6e0fd5.htm">help documentation</a>.</p>  <p>In our case the interesting ports to publish are the following: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5466.image_4635DEF1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5466.image_5F00_4635DEF1.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4657.image_thumb_480634B8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4657.image_5F00_thumb_5F00_480634B8.png" width="458" height="276" /></a></p>  <p>and</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0486.image_6ED6DBA9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0486.image_5F00_6ED6DBA9.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3022.image_thumb_44F66774.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3022.image_5F00_thumb_5F00_44F66774.png" width="354" height="396" /></a></p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5100.image_13F94778.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5100.image_5F00_13F94778.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1346.image_thumb_7CCDCCF9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1346.image_5F00_thumb_5F00_7CCDCCF9.png" width="337" height="245" /></a></p>  <p>After running the experiment, we can see the result in Azure ML Studio:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4426.image_4C3A4F41.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4426.image_5F00_4C3A4F41.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/6740.image_thumb_1BA6D189.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/6740.image_5F00_thumb_5F00_1BA6D189.png" width="410" height="421" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3122.image_746F1904.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3122.image_5F00_746F1904.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7776.image_thumb_6A400F48.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7776.image_5F00_thumb_5F00_6A400F48.png" width="644" height="378" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5123.image_02D23D4A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5123.image_5F00_02D23D4A.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7043.image_thumb_1615849A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7043.image_5F00_thumb_5F00_1615849A.png" width="644" height="378" /></a></p>  <p>So, how could we retrieve the pictures from an API that is published that way: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4747.image_6E719920.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4747.image_5F00_6E719920.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1651.image_thumb_379744DA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1651.image_5F00_thumb_5F00_379744DA.png" width="363" height="168" /></a></p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7382.image_6035B0E1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7382.image_5F00_6035B0E1.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0407.image_thumb_6D9E5498.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0407.image_5F00_thumb_5F00_6D9E5498.png" width="644" height="271" /></a></p>  <p>Here is some sample script in Python that shows how to do it. The script is a modified version of the sample given in the API Help page for Batch Execution. The idea is to get the base64 encoded pictures from the output file and decode them out to local disk.</p>  <pre class="code"><span style="background: white; color: green;"># -*- coding: utf-8 -*-

# How this works:
#
# 1. Assume the input is present in a local file
# 2. Upload the file to an Azure blob - you'd need an Azure storage account
# 3. Call BES to process the data in the blob. 
# 4. The results get written to another Azure blob.
# 5. Download the output blob to a local file
#
# Note: You may need to download/install the Azure SDK for Python.
# See: https://azure.microsoft.com/en-us/documentation/articles/python-how-to-install/

</span><span style="background: white; color: blue;">import </span><span style="background: white; color: rgb(111, 0, 138);">urllib2
</span><span style="background: white; color: blue;">import </span><span style="background: white; color: rgb(111, 0, 138);">json
</span><span style="background: white; color: blue;">import </span><span style="background: white; color: rgb(111, 0, 138);">time
</span><span style="background: white; color: blue;">from </span><span style="background: white; color: rgb(111, 0, 138);">azure</span><span style="background: white; color: black;">.</span><span style="background: white; color: rgb(111, 0, 138);">storage </span><span style="background: white; color: blue;">import </span><span style="background: white; color: black;">*
</span><span style="background: white; color: blue;">import </span><span style="background: white; color: rgb(111, 0, 138);">sys
</span><span style="background: white; color: blue;">import </span><span style="background: white; color: rgb(111, 0, 138);">base64
</span><span style="background: white; color: blue;">import </span><span style="background: white; color: rgb(111, 0, 138);">json

</span><span style="background: white; color: black;">storage_account_name = </span><span style="background: white; color: rgb(163, 21, 21);">'a****obfuscated***4'
</span><span style="background: white; color: black;">storage_account_key = </span><span style="background: white; color: rgb(163, 21, 21);">'/aV****obfuscated***vXA76w=='
</span><span style="background: white; color: black;">storage_container_name = </span><span style="background: white; color: rgb(163, 21, 21);">'benjguin'

</span><span style="background: white; color: black;">input_file = </span><span style="background: white; color: rgb(163, 21, 21);">ur&quot;C:\be****obfuscated***os\WordCloud\conventions.csv&quot;
</span><span style="background: white; color: black;">output_file = </span><span style="background: white; color: rgb(163, 21, 21);">ur'C:\be****obfuscated***os\WordCloud\myresults.csv'
</span><span style="background: white; color: black;">input_blob_name = </span><span style="background: white; color: rgb(163, 21, 21);">'conventions.csv'
</span><span style="background: white; color: black;">api_key = </span><span style="background: white; color: rgb(163, 21, 21);">r'Cczx****obfuscated***WemQ=='
</span><span style="background: white; color: black;">url = </span><span style="background: white; color: rgb(163, 21, 21);">'https://ussouthcentral.services.azureml.net/workspaces/a7c****obfuscated***756/services/d328e03****obfuscated***5c2/jobs'
</span><span style="background: white; color: black;">uploadfile=True
executeBES=True

blob_service = BlobService(account_name=storage_account_name, account_key=storage_account_key)

</span><span style="background: white; color: blue;">if </span><span style="background: white; color: black;">uploadfile:
    </span><span style="background: white; color: blue;">print</span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;Uploading the input to blob storage...&quot;</span><span style="background: white; color: black;">)
    data_to_upload = open(input_file, </span><span style="background: white; color: rgb(163, 21, 21);">'r'</span><span style="background: white; color: black;">).read()
    blob_service.put_blob(storage_container_name, input_blob_name, data_to_upload, x_ms_blob_type=</span><span style="background: white; color: rgb(163, 21, 21);">'BlockBlob'</span><span style="background: white; color: black;">)

input_blob_path = </span><span style="background: white; color: rgb(163, 21, 21);">'/' </span><span style="background: white; color: black;">+ storage_container_name + </span><span style="background: white; color: rgb(163, 21, 21);">'/' </span><span style="background: white; color: black;">+ input_blob_name
debug_blob = blob_service.get_blob(storage_container_name, input_blob_name)

</span><span style="background: white; color: blue;">if </span><span style="background: white; color: black;">executeBES:
    </span><span style="background: white; color: blue;">print</span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;Submitting the BES job...&quot;</span><span style="background: white; color: black;">)
    connection_string = </span><span style="background: white; color: rgb(163, 21, 21);">&quot;DefaultEndpointsProtocol=https;AccountName=&quot; </span><span style="background: white; color: black;">+ storage_account_name + </span><span style="background: white; color: rgb(163, 21, 21);">&quot;;AccountKey=&quot; </span><span style="background: white; color: black;">+ storage_account_key
    payload =  {
                </span><span style="background: white; color: rgb(163, 21, 21);">&quot;Input&quot;</span><span style="background: white; color: black;">: {
                    </span><span style="background: white; color: rgb(163, 21, 21);">&quot;ConnectionString&quot;</span><span style="background: white; color: black;">: connection_string,
                    </span><span style="background: white; color: rgb(163, 21, 21);">&quot;RelativeLocation&quot;</span><span style="background: white; color: black;">: input_blob_path
                    }
                }

    body = str.encode(</span><span style="background: white; color: rgb(111, 0, 138);">json</span><span style="background: white; color: black;">.dumps(payload))
    headers = { </span><span style="background: white; color: rgb(163, 21, 21);">'Content-Type'</span><span style="background: white; color: black;">:</span><span style="background: white; color: rgb(163, 21, 21);">'application/json'</span><span style="background: white; color: black;">, </span><span style="background: white; color: rgb(163, 21, 21);">'Authorization'</span><span style="background: white; color: black;">:(</span><span style="background: white; color: rgb(163, 21, 21);">'Bearer ' </span><span style="background: white; color: black;">+ api_key)}
    req = </span><span style="background: white; color: rgb(111, 0, 138);">urllib2</span><span style="background: white; color: black;">.</span><span style="background: white; color: rgb(43, 145, 175);">Request</span><span style="background: white; color: black;">(url, body, headers) 
    response = </span><span style="background: white; color: rgb(111, 0, 138);">urllib2</span><span style="background: white; color: black;">.urlopen(req)
    result = response.read()
    job_id = result[1:-1] </span><span style="background: white; color: green;"># remove the enclosing double-quotes

    </span><span style="background: white; color: black;">url2 = url + </span><span style="background: white; color: rgb(163, 21, 21);">'/' </span><span style="background: white; color: black;">+ job_id

    </span><span style="background: white; color: blue;">while </span><span style="background: white; color: black;">True:
        </span><span style="background: white; color: rgb(111, 0, 138);">time</span><span style="background: white; color: black;">.sleep(1) </span><span style="background: white; color: green;"># wait a second
        </span><span style="background: white; color: black;">authHeader = { </span><span style="background: white; color: rgb(163, 21, 21);">'Authorization'</span><span style="background: white; color: black;">:(</span><span style="background: white; color: rgb(163, 21, 21);">'Bearer ' </span><span style="background: white; color: black;">+ api_key)}
        request = </span><span style="background: white; color: rgb(111, 0, 138);">urllib2</span><span style="background: white; color: black;">.</span><span style="background: white; color: rgb(43, 145, 175);">Request</span><span style="background: white; color: black;">(url2, headers=authHeader)
        response = </span><span style="background: white; color: rgb(111, 0, 138);">urllib2</span><span style="background: white; color: black;">.urlopen(request)
        result = </span><span style="background: white; color: rgb(111, 0, 138);">json</span><span style="background: white; color: black;">.loads(response.read())
        status = result[</span><span style="background: white; color: rgb(163, 21, 21);">'StatusCode'</span><span style="background: white; color: black;">]
        </span><span style="background: white; color: blue;">if </span><span style="background: white; color: black;">(status == 0):
            </span><span style="background: white; color: blue;">print</span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;Not started...&quot;</span><span style="background: white; color: black;">)
        </span><span style="background: white; color: blue;">elif </span><span style="background: white; color: black;">(status == 1):
            </span><span style="background: white; color: blue;">print</span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;Running...&quot;</span><span style="background: white; color: black;">)
        </span><span style="background: white; color: blue;">elif </span><span style="background: white; color: black;">(status == 2):
            </span><span style="background: white; color: blue;">print</span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;Failed...&quot;</span><span style="background: white; color: black;">)
            </span><span style="background: white; color: blue;">break
        elif </span><span style="background: white; color: black;">(status == 3):
            </span><span style="background: white; color: blue;">print</span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;Cancelled...&quot;</span><span style="background: white; color: black;">)
            </span><span style="background: white; color: blue;">break
        elif </span><span style="background: white; color: black;">(status == 4):
            </span><span style="background: white; color: blue;">print</span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;Finished!&quot;</span><span style="background: white; color: black;">)
            result_blob_location = result[</span><span style="background: white; color: rgb(163, 21, 21);">'Result'</span><span style="background: white; color: black;">]
            sas_token = result_blob_location[</span><span style="background: white; color: rgb(163, 21, 21);">'SasBlobToken'</span><span style="background: white; color: black;">]
            base_url = result_blob_location[</span><span style="background: white; color: rgb(163, 21, 21);">'BaseLocation'</span><span style="background: white; color: black;">]
            relative_url = result_blob_location[</span><span style="background: white; color: rgb(163, 21, 21);">'RelativeLocation'</span><span style="background: white; color: black;">]
            url3 = base_url + relative_url + sas_token
            response = </span><span style="background: white; color: rgb(111, 0, 138);">urllib2</span><span style="background: white; color: black;">.urlopen(url3)
            </span><span style="background: white; color: blue;">with </span><span style="background: white; color: black;">open(output_file, </span><span style="background: white; color: rgb(163, 21, 21);">'w'</span><span style="background: white; color: black;">) </span><span style="background: white; color: blue;">as </span><span style="background: white; color: black;">f:
                f.write(response.read())
            </span><span style="background: white; color: blue;">break

</span><span style="background: white; color: black;">outputdata=open(output_file)
outputtxt=outputdata.read()
outputdata.close()

s=outputtxt.index(</span><span style="background: white; color: rgb(163, 21, 21);">'\&quot;{'</span><span style="background: white; color: black;">)
e=len(outputtxt)
o1=outputtxt[s+1:e-3]

jsonresult = </span><span style="background: white; color: rgb(111, 0, 138);">json</span><span style="background: white; color: black;">.loads(o1)
i=1
</span><span style="background: white; color: blue;">for </span><span style="background: white; color: black;">gd </span><span style="background: white; color: blue;">in </span><span style="background: white; color: black;">jsonresult[</span><span style="background: white; color: rgb(163, 21, 21);">'Graphics Device'</span><span style="background: white; color: black;">]:
    fname = output_file + </span><span style="background: white; color: rgb(163, 21, 21);">&quot;.&quot; </span><span style="background: white; color: black;">+ str(i) + </span><span style="background: white; color: rgb(163, 21, 21);">&quot;.png&quot;
    </span><span style="background: white; color: blue;">print </span><span style="background: white; color: rgb(163, 21, 21);">'writing png #' </span><span style="background: white; color: black;">+ str(i) + </span><span style="background: white; color: rgb(163, 21, 21);">' to ' </span><span style="background: white; color: black;">+ fname
    f = open(fname, </span><span style="background: white; color: rgb(163, 21, 21);">'wb'</span><span style="background: white; color: black;">)
    f.write(</span><span style="background: white; color: rgb(111, 0, 138);">base64</span><span style="background: white; color: black;">.b64decode(gd))
    f.close()
    i += 1

</span><span style="background: white; color: blue;">print</span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;Done!&quot;</span><span style="background: white; color: black;">)
</span></pre>


<p>Here is a sample execution output: </p>

<pre class="code"><span style="background: white; color: black;">Uploading the input to blob storage...
Submitting the BES job...
Running...
Running...
Running...
Running...
Running...
Running...
Running...
Finished!
writing png #1 to C:\be***obfuscated***os\WordCloud\myresults.csv.1.png
writing png #2 to C:\be***obfuscated***os\WordCloud\myresults.csv.2.png
Done!
</span></pre>


<p>The output sent back by Azure ML looks like this: </p>

<pre class="code"><span style="background: white; color: black;">R Output JSON

&quot;{&quot;Standard Output&quot;:&quot;RWorker pushed \&quot;port1\&quot; to R workspace.\r\nBeginning R Execute Script\n\n[1] 56000\r\nLoading objects:\r\n  port1\r\n[1] \&quot;Loading variable port1...\&quot;\r\npng \r\n  2 \r\nnull device \r\n          1 \r\n&quot;,&quot;Standard Error&quot;:&quot;R reported no errors.&quot;,&quot;visualizationType&quot;:&quot;rOutput&quot;,&quot;Graphics Device&quot;:[&quot;iVBORw0K***(...)***RvX/wFzB5s8eym6ZgAAAABJRU5ErkJggg==&quot;,&quot;iVBORw0KGgo***(...)***dVorBuiQAAAABJRU5ErkJggg==&quot;]}&quot;

</span></pre>


<p>You can see the pictures <img class="wlEmoticon wlEmoticon-winkingsmile" style="style" alt="Winking smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7750.wlEmoticon-winkingsmile_71AB331B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7750.wlEmoticon_2D00_winkingsmile_5F00_71AB331B.png" /></p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5545.image_77F209A9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5545.image_5F00_77F209A9.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0702.image_thumb_0794A56C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0702.image_5F00_thumb_5F00_0794A56C.png" width="644" height="126" /></a></p>

<p>&#160;</p>

<p>well, Python does: </p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8156.image_7958BD2C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8156.image_5F00_7958BD2C.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8688.image_thumb_101A9567.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8688.image_5F00_thumb_5F00_101A9567.png" width="404" height="217" /></a></p>

<p>The resulting files are: </p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1614.image_260407B7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1614.image_5F00_260407B7.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1122.image_thumb_75DCBCF3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1122.image_5F00_thumb_5F00_75DCBCF3.png" width="581" height="49" /></a></p>

<p>&#160;</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/6864.myresults.csv.1_733691F3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/6864.myresults.csv.1_5F00_733691F3.png"><img title="myresults.csv.1" style="display: inline; background-image: none;" border="0" alt="myresults.csv.1" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7382.myresults.csv.1_thumb_579496AE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7382.myresults.csv.1_5F00_thumb_5F00_579496AE.png" width="484" height="484" /></a></p>

<p>and</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/2022.myresults.csv.2_0E0548B1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/2022.myresults.csv.2_5F00_0E0548B1.png"><img title="myresults.csv.2" style="display: inline; background-image: none;" border="0" alt="myresults.csv.2" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1882.myresults.csv.2_thumb_76D9CE32.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1882.myresults.csv.2_5F00_thumb_5F00_76D9CE32.png" width="484" height="484" /></a></p>

<p>&#160;</p>

<p>R has tons of great data visualisation. Have a look at those blogs for instance:</p>

<ul>
  <li><a title="https://www.r-statistics.com/tag/visualization/" href="https://www.r-statistics.com/tag/visualization/">https://www.r-statistics.com/tag/visualization/</a></li>

  <li><a title="https://rdataviz.wordpress.com/" href="https://rdataviz.wordpress.com/">https://rdataviz.wordpress.com/</a></li>
</ul>

<p>&#160;</p>

<p><img class="wlEmoticon wlEmoticon-smile" style="style" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/2072.wlEmoticon-smile_5F4220BF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/2072.wlEmoticon_2D00_smile_5F00_5F4220BF.png" />&#160;</p>

<p>Benjamin (<a href="https://twitter.com/@benjguin">@benjguin</a>)</p>]]></content:encoded>
    </item>
    <item>
      <title>How to upload an R package to Azure Machine Learning</title>
      <link>https://docs.microsoft.com/archive/blogs/benjguin/how-to-upload-an-r-package-to-azure-machine-learning</link>
      <pubDate>Wed, 24 Sep 2014 00:39:31 GMT</pubDate>
      <dc:creator><![CDATA[Benjamin GUINEBERTIERE]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/benjguin/2014/09/24/how-to-upload-an-r-package-to-azure-machine-learning/</guid>
      <description><![CDATA[Azure Machine Learning (https://azure.com/ml) has a number of packages already installed by default....]]></description>
      <content:encoded><![CDATA[<p>Azure Machine Learning (<a href="https://azure.com/ml">https://azure.com/ml</a>) has a number of packages already installed by default. You can see them with this following sample experiment: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7587.image_1FA99614.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7587.image_5F00_1FA99614.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4010.image_thumb_220ACA25.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4010.image_5F00_thumb_5F00_220ACA25.png" width="644" height="411" /></a></p>  <p>R script is:</p>  <pre class="code"><span style="background: white; color: black;">data.set &lt;-data.frame(installed.packages());
# Select data.frame to be sent to the output Dataset port
maml.mapOutputPort(&quot;data.set&quot;);</span></pre>


<p>you’ll find a little more than 400 packages.</p>

<p>&#160;</p>

<p><strong>Still you may need to use a package which is not known by Azure ML. Here is how to upload it to the environment.</strong></p>

<p>NB: This post takes skmeans (k-means with a cosine distance) as an example, but this works for other packages as well.</p>

<p>&#160;</p>

<p>Let’s suppose you have this code in R Studio locally.</p>

<p>NB: you can find information on how to setup your environment in <a href="https://blogs.msdn.com/b/mlfrance/archive/2014/08/05/les-premiers-pas-en-machine-learning-avec-r-et-python.aspx">this post</a>. It’s in French, but <a href="https://www.bing.com/translator/">bing translator</a> is your friend. </p>

<pre class="code"><span style="background: white; color: black;">library(skmeans)

set.seed(1234)
sample_data &lt;- matrix(sample.int(1000, size = 20*500, replace = TRUE), nrow = 20, ncol = 500, 
                      dimnames=list(1:20, 1:500))

fit &lt;- skmeans(sample_data,5)

result &lt;- data.frame(list(rownames(sample_data), fit$cluster), row.names=NULL)
colnames(result) &lt;- c(&quot;sample data row&quot;, &quot;cluster&quot;)

print(result)
</span></pre>



<p>this will give this kind of result</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7776.image_75F05DE4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7776.image_5F00_75F05DE4.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5852.image_thumb_41773DAF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5852.image_5F00_thumb_5F00_41773DAF.png" width="644" height="468" /></a></p>

<p>If you try this in Azure ML, you’ll get the following result:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0005.image_693FD47D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0005.image_5F00_693FD47D.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/6648.image_thumb_413246C0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/6648.image_5F00_thumb_5F00_413246C0.png" width="644" height="395" /></a></p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0081.image_198E5B47.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0081.image_5F00_198E5B47.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8737.image_thumb_1E076CBF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8737.image_5F00_thumb_5F00_1E076CBF.png" width="593" height="214" /></a></p>

<p>Here is how to have the script loading all the necessary packages in the Azure ML environment.</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5661.image_018F9C41.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5661.image_5F00_018F9C41.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7612.image_thumb_27AC889D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7612.image_5F00_thumb_5F00_27AC889D.png" width="644" height="474" /></a></p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/2337.image_148DECA2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/2337.image_5F00_148DECA2.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7411.image_thumb_73336867.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7411.image_5F00_thumb_5F00_73336867.png" width="350" height="484" /></a></p>

<p>So let’s now see how you construct the skmeans_packages.zip and know which lines to write here: </p>

<p>&#160;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7345.image_3DBD36F3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7345.image_5F00_3DBD36F3.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1031.image_thumb_495584E3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1031.image_5F00_thumb_5F00_495584E3.png" width="439" height="139" /></a></p>

<p>&#160;</p>

<p>On the local environment (in my case Windows), I remove the R packages that are installed in My Documents\R</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1057.image_2D4756A9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1057.image_5F00_2D4756A9.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3404.image_thumb_2EAB797B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3404.image_5F00_thumb_5F00_2EAB797B.png" width="463" height="271" /></a></p>

<p>then in R, I install the skmeans package: </p>

<p>install.packages(&quot;skmeans&quot;)</p>

<p>this gives the following result:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/2514.image_0054847F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/2514.image_5F00_0054847F.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4527.image_thumb_4B058F10.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4527.image_5F00_thumb_5F00_4B058F10.png" width="413" height="484" /></a></p>

<p>So I know I have to install the following packages in order: </p>

<ul>
  <li>slam</li>

  <li>clue</li>

  <li>skmeans</li>
</ul>

<p>Then I go to the temp folder: </p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/2476.image_0C38B9CA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/2476.image_5F00_0C38B9CA.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8524.image_thumb_3BF66249.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8524.image_5F00_thumb_5F00_3BF66249.png" width="591" height="146" /></a></p>

<p>I Zip the zips:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0624.image_51DFD499.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0624.image_5F00_51DFD499.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4380.image_thumb_68A1ACD3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4380.image_5F00_thumb_5F00_68A1ACD3.png" width="404" height="327" /></a></p>

<p>and rename this new zip file as skmeans_packages.zip</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8865.image_6C425861.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8865.image_5F00_6C425861.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7824.image_thumb_5BC9E766.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7824.image_5F00_thumb_5F00_5BC9E766.png" width="628" height="170" /></a></p>

<p>I then can upload it Azure ML:</p>

<p>NEW, DATASET, FROM LOCAL FILE</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0841.image_22496820.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0841.image_5F00_22496820.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/6138.image_thumb_0B1DEDA2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/6138.image_5F00_thumb_5F00_0B1DEDA2.png" width="123" height="63" /></a>&#160;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5078.image_2D095026.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5078.image_5F00_2D095026.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/2772.image_thumb_7CE20562.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/2772.image_5F00_thumb_5F00_7CE20562.png" width="555" height="187" /></a></p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8015.image_3352B765.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8015.image_5F00_3352B765.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7077.image_thumb_74ECF3B1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7077.image_5F00_thumb_5F00_74ECF3B1.png" width="501" height="438" /></a></p>

<p>Then you’ll be able to find it as a saved dataset in your workspace: </p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0045.image_6DD047EA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0045.image_5F00_6DD047EA.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1588.image_thumb_6FA09DB1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1588.image_5F00_thumb_5F00_6FA09DB1.png" width="424" height="254" /></a></p>

<p>After it has been connected to the third dot of the Execute R Script module instance, you’ll be able to find the content in src/ folder:</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3146.image_3EA37DB5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3146.image_5F00_3EA37DB5.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5618.image_thumb_2E2B0CBA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5618.image_5F00_thumb_5F00_2E2B0CBA.png" width="381" height="214" /></a></p>

<p>so, in order&#160; to install skmeans and its two dependencies, then reference the skmeans library, you just have to enter the following lines: </p>

<pre class="code"><span style="background: white; color: black;">install.packages(&quot;src/slam_0.1-32.zip&quot;, lib = &quot;.&quot;, repos = NULL, verbose = TRUE)
install.packages(&quot;src/clue_0.3-48.zip&quot;, lib = &quot;.&quot;, repos = NULL, verbose = TRUE)
install.packages(&quot;src/skmeans_0.2-6.zip&quot;, lib = &quot;.&quot;, repos = NULL, verbose = TRUE)
library(skmeans, lib.loc=&quot;.&quot;, verbose=TRUE)
</span></pre>


<p>&#160;</p>

<p>Azure ML has a pool of VM with docker-like containers (true Windows containers, named drawbridge) where the experiments run. So each time the script runs, it starts from a blank standard Azure ML environment. By bringing a zip, you add the files to that environment.</p>

<p>&#160;</p>

<p>Hope this blog post will help you if you need R packages which are not in the 400+ preloaded ones in Azure Machine Learning!</p>

<p>&#160;</p>

<p><img class="wlEmoticon wlEmoticon-smile" style="style" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4064.wlEmoticon-smile_4B9FEE77.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4064.wlEmoticon_2D00_smile_5F00_4B9FEE77.png" /></p>

<p>Benjamin (<a href="https://twitter.com/@benjguin">@benjguin</a>)</p>]]></content:encoded>
    </item>
    <item>
      <title>Sample code: create an HDInsight cluster, run job, remove the cluster</title>
      <link>https://docs.microsoft.com/archive/blogs/benjguin/sample-code-create-an-hdinsight-cluster-run-job-remove-the-cluster</link>
      <pubDate>Thu, 24 Jul 2014 06:45:31 GMT</pubDate>
      <dc:creator><![CDATA[Benjamin GUINEBERTIERE]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/benjguin/2014/07/24/sample-code-create-an-hdinsight-cluster-run-job-remove-the-cluster/</guid>
      <description><![CDATA[In a previous post, I gave an example of a simple automation job. Here is a more interesting one....]]></description>
      <content:encoded><![CDATA[<p>In a previous post, I gave <a href="https://blogs.msdn.com/b/benjguin/archive/2014/07/24/azure-automation-what-is-running-on-my-subscriptions.aspx">an example of a simple automation job</a>. Here is a more interesting one. </p>  <p>Here is a sample Azure Automation code that creates an HDInsight cluster, runs a job, and removes the cluster.</p>  <p>I used it for a demonstration at the French Hadoop User Group. You can find the video (in French) where I explain what is does here (go to 01:40:00) : </p>  <div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:7428f7f2-cd79-4c5b-9a04-aa12bacfb09f" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;"><div><object width="448" height="252"><param name="movie" value="https://www.youtube.com/v/s1HDH96LMOM#t=6019?hl=en&amp;hd=1"></param><embed src="https://www.youtube.com/v/s1HDH96LMOM#t=6019?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"></embed></object></div></div>  <p>&#160;</p>  <p>&#160;</p>  <p>When you start it, you can specify the options you want to activate:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4024.image_1222677E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4024.image_5F00_1222677E.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3806.image_thumb_76143943.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3806.image_5F00_thumb_5F00_76143943.png" width="521" height="442" /></a></p>  <p>The code is the following: </p>  <pre class="code"><span style="background: white; color: blue;">workflow </span><span style="background: white; color: black;">HDInsightJob
{
    </span><span style="background: white; color: teal;">param</span><span style="background: white; color: black;">(
        [</span><span style="background: white; color: rgb(146, 202, 244);">Parameter</span><span style="background: white; color: black;">(Mandatory=</span><span style="background: white; color: rgb(189, 99, 197);">$false</span><span style="background: white; color: black;">)]
        [</span><span style="background: white; color: rgb(244, 167, 33);">bool</span><span style="background: white; color: black;">]</span><span style="background: white; color: rgb(189, 99, 197);">$createCluster</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(189, 99, 197);">$false</span><span style="background: white; color: black;">,
        [</span><span style="background: white; color: rgb(146, 202, 244);">Parameter</span><span style="background: white; color: black;">(Mandatory=</span><span style="background: white; color: rgb(189, 99, 197);">$false</span><span style="background: white; color: black;">)]
        [</span><span style="background: white; color: rgb(244, 167, 33);">bool</span><span style="background: white; color: black;">]</span><span style="background: white; color: rgb(189, 99, 197);">$runJob</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(189, 99, 197);">$true</span><span style="background: white; color: black;">,
        [</span><span style="background: white; color: rgb(146, 202, 244);">Parameter</span><span style="background: white; color: black;">(Mandatory=</span><span style="background: white; color: rgb(189, 99, 197);">$false</span><span style="background: white; color: black;">)]
        [</span><span style="background: white; color: rgb(244, 167, 33);">bool</span><span style="background: white; color: black;">]</span><span style="background: white; color: rgb(189, 99, 197);">$removeCluster</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(189, 99, 197);">$false
        </span><span style="background: white; color: black;">)
    
    </span><span style="background: white; color: rgb(189, 99, 197);">$subscription </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(163, 21, 21);">'Azdem169A44055X'
    </span><span style="background: white; color: rgb(189, 99, 197);">$azureConnection</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(255, 140, 0);">Get-AutomationConnection </span><span style="background: white; color: teal;">-Name </span><span style="background: white; color: rgb(189, 99, 197);">$subscription
    $subscriptionId</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(189, 99, 197);">$azureConnection</span><span style="background: white; color: black;">.SubscriptionId
    </span><span style="background: white; color: rgb(189, 99, 197);">$azureCertificate</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(255, 140, 0);">Get-AutomationCertificate </span><span style="background: white; color: teal;">-Name </span><span style="background: white; color: rgb(163, 21, 21);">'azure-admin.3-4.fr'
    </span><span style="background: white; color: rgb(189, 99, 197);">$clusterCredentials</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(255, 140, 0);">Get-AutomationPSCredential </span><span style="background: white; color: teal;">-Name </span><span style="background: white; color: rgb(163, 21, 21);">'HDInsightClusterCredentials'
    
    </span><span style="background: white; color: gray;">InlineScript
    </span><span style="background: white; color: black;">{
        </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;RunBook V140629c&quot;
        </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(189, 99, 197);">$PSVersionTable
        </span><span style="background: white; color: rgb(255, 140, 0);">import-module </span><span style="background: white; color: black;">azure
        </span><span style="background: white; color: rgb(255, 140, 0);">get-module </span><span style="background: white; color: black;">azure
        
        </span><span style="background: white; color: rgb(189, 99, 197);">$createCluster</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(189, 99, 197);">$using:createCluster
        $runJob</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(189, 99, 197);">$using:runJob
        $removeCluster</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(189, 99, 197);">$using:removeCluster

        $subscription</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(189, 99, 197);">$using:subscription  
        $subscriptionId</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(189, 99, 197);">$using:subscriptionId  
        $azureCertificate</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(189, 99, 197);">$using:azureCertificate
        $clusterCredentials</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(189, 99, 197);">$using:clusterCredentials

        $defaultStorageAccount</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(163, 21, 21);">'monstockageazure'
        </span><span style="background: white; color: rgb(189, 99, 197);">$clusterName </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(163, 21, 21);">'monclusterhadoop'
        </span><span style="background: white; color: rgb(189, 99, 197);">$clusterContainerName </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(163, 21, 21);">'monclusterhadoop'
        </span><span style="background: white; color: rgb(189, 99, 197);">$clusterVersion</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(163, 21, 21);">'3.0' </span><span style="background: white; color: green;">#3.1, 3.0, 2.1, 1.6

        </span><span style="background: white; color: rgb(255, 140, 0);">Set-AzureSubscription </span><span style="background: white; color: teal;">-SubscriptionName </span><span style="background: white; color: rgb(189, 99, 197);">$subscription </span><span style="background: white; color: teal;">-SubscriptionId </span><span style="background: white; color: rgb(189, 99, 197);">$subscriptionID </span><span style="background: white; color: teal;">-Certificate </span><span style="background: white; color: rgb(189, 99, 197);">$azureCertificate </span><span style="background: white; color: teal;">-CurrentStorageAccount </span><span style="background: white; color: rgb(189, 99, 197);">$defaultStorageAccount
        </span><span style="background: white; color: rgb(255, 140, 0);">Select-AzureSubscription </span><span style="background: white; color: teal;">-Current </span><span style="background: white; color: rgb(189, 99, 197);">$Subscription

        $storageAccount1 </span><span style="background: white; color: black;">= (</span><span style="background: white; color: rgb(255, 140, 0);">Get-AzureSubscription </span><span style="background: white; color: rgb(189, 99, 197);">$Subscription</span><span style="background: white; color: black;">).CurrentStorageAccountName
        </span><span style="background: white; color: rgb(189, 99, 197);">$key1 </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(255, 140, 0);">Get-AzureStorageKey </span><span style="background: white; color: teal;">-StorageAccountName </span><span style="background: white; color: rgb(189, 99, 197);">$storageAccount1 </span><span style="background: white; color: black;">| %{ </span><span style="background: white; color: rgb(189, 99, 197);">$_</span><span style="background: white; color: black;">.Primary }

        </span><span style="background: white; color: rgb(189, 99, 197);">$storageAccount2Name </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(163, 21, 21);">&quot;wasbshared&quot;
        </span><span style="background: white; color: rgb(189, 99, 197);">$storageAccount2Key </span><span style="background: white; color: black;">= (</span><span style="background: white; color: rgb(255, 140, 0);">Get-AzureStorageKey </span><span style="background: white; color: teal;">-StorageAccountName </span><span style="background: white; color: rgb(189, 99, 197);">$storageAccount2Name</span><span style="background: white; color: black;">).Secondary

        </span><span style="background: white; color: blue;">if </span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(189, 99, 197);">$createCluster</span><span style="background: white; color: black;">)
        {
            </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: black;">&quot;will create cluster </span><span style="background: white; color: rgb(189, 99, 197);">$clusterName</span><span style="background: white; color: black;">&quot;
            
            </span><span style="background: white; color: rgb(255, 140, 0);">New-AzureHDInsightClusterConfig </span><span style="background: white; color: teal;">-ClusterSizeInNodes </span><span style="background: white; color: black;">3 |
                </span><span style="background: white; color: rgb(255, 140, 0);">Set-AzureHDInsightDefaultStorage </span><span style="background: white; color: teal;">-StorageAccountName </span><span style="background: white; color: black;">&quot;</span><span style="background: white; color: rgb(189, 99, 197);">${storageAccount1}</span><span style="background: white; color: black;">.blob.core.windows.net&quot; </span><span style="background: white; color: teal;">-StorageAccountKey </span><span style="background: white; color: rgb(189, 99, 197);">$key1 </span><span style="background: white; color: teal;">-StorageContainerName </span><span style="background: white; color: rgb(189, 99, 197);">$clusterContainerName </span><span style="background: white; color: black;">|
                </span><span style="background: white; color: rgb(255, 140, 0);">Add-AzureHDInsightStorage </span><span style="background: white; color: teal;">-StorageAccountName </span><span style="background: white; color: rgb(189, 99, 197);">$storageAccount2Name </span><span style="background: white; color: teal;">-StorageAccountKey </span><span style="background: white; color: rgb(189, 99, 197);">$storageAccount2Key </span><span style="background: white; color: black;">|
                </span><span style="background: white; color: rgb(255, 140, 0);">New-AzureHDInsightCluster </span><span style="background: white; color: teal;">-Name </span><span style="background: white; color: rgb(189, 99, 197);">$clusterName </span><span style="background: white; color: teal;">-Version </span><span style="background: white; color: rgb(189, 99, 197);">$clusterVersion </span><span style="background: white; color: teal;">-Location </span><span style="background: white; color: rgb(163, 21, 21);">&quot;North Europe&quot; </span><span style="background: white; color: teal;">-Credential </span><span style="background: white; color: rgb(189, 99, 197);">$clusterCredentials
            
            </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;cluster created&quot;
        </span><span style="background: white; color: black;">}

        </span><span style="background: white; color: rgb(189, 99, 197);">$wasbdemo </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(163, 21, 21);">&quot;wasb://demo@monstockageazure.blob.core.windows.net&quot;
        
        </span><span style="background: white; color: rgb(255, 140, 0);">Use-AzureHDInsightCluster </span><span style="background: white; color: rgb(189, 99, 197);">$clusterName

        </span><span style="background: white; color: blue;">if </span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(189, 99, 197);">$runJob</span><span style="background: white; color: black;">)
        {
            </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;will start job&quot;
            
            </span><span style="background: white; color: rgb(189, 99, 197);">$pigJob </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(255, 140, 0);">New-AzureHDInsightPigJobDefinition </span><span style="background: white; color: teal;">-File </span><span style="background: white; color: black;">&quot;</span><span style="background: white; color: rgb(189, 99, 197);">$wasbdemo</span><span style="background: white; color: black;">/scripts/iislogs-pig-jython/iislogs-client-ip-time.pig&quot;
            </span><span style="background: white; color: rgb(189, 99, 197);">$pigJob</span><span style="background: white; color: black;">.Files.Add(&quot;</span><span style="background: white; color: rgb(189, 99, 197);">$wasbdemo</span><span style="background: white; color: black;">/scripts/iislogs-pig-jython/iislogs-client-ip-time-helper.py&quot;)
            </span><span style="background: white; color: rgb(189, 99, 197);">$pigJob</span><span style="background: white; color: black;">.Files.Add(&quot;</span><span style="background: white; color: rgb(189, 99, 197);">$wasbdemo</span><span style="background: white; color: black;">/scripts/iislogs-pig-jython/jython-2.5.3.jar&quot;)
            </span><span style="background: white; color: rgb(189, 99, 197);">$startedPigJob </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(189, 99, 197);">$pigJob </span><span style="background: white; color: black;">| </span><span style="background: white; color: rgb(255, 140, 0);">Start-AzureHDInsightJob </span><span style="background: white; color: teal;">-Credential </span><span style="background: white; color: rgb(189, 99, 197);">$clusterCredentials </span><span style="background: white; color: teal;">-Cluster </span><span style="background: white; color: rgb(189, 99, 197);">$clusterName
            
            </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;will wait for the end of the job&quot;

            </span><span style="background: white; color: rgb(189, 99, 197);">$startedPigJob </span><span style="background: white; color: black;">| </span><span style="background: white; color: rgb(255, 140, 0);">Wait-AzureHDInsightJob </span><span style="background: white; color: teal;">-Credential </span><span style="background: white; color: rgb(189, 99, 197);">$clusterCredentials
            </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;--- log ---&quot;
            </span><span style="background: white; color: rgb(255, 140, 0);">Get-AzureHDInsightJobOutput </span><span style="background: white; color: teal;">-JobId </span><span style="background: white; color: rgb(189, 99, 197);">$startedPigJob</span><span style="background: white; color: black;">.JobId </span><span style="background: white; color: teal;">-TaskSummary -StandardError -StandardOutput -Cluster </span><span style="background: white; color: rgb(189, 99, 197);">$clusterName
            </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;job done&quot;            
        </span><span style="background: white; color: black;">}
        
        
        </span><span style="background: white; color: blue;">if </span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(189, 99, 197);">$removeCluster</span><span style="background: white; color: black;">)
        {
            </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;will remove cluster&quot;
            </span><span style="background: white; color: rgb(255, 140, 0);">Remove-AzureHDInsightCluster </span><span style="background: white; color: teal;">-Name </span><span style="background: white; color: rgb(189, 99, 197);">$clusterName
            </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;removed cluster&quot;
        </span><span style="background: white; color: black;">}
        </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;done&quot;
    </span><span style="background: white; color: black;">}
}</span></pre>

<p>&#160;</p>

<p>Here is a sample log of that job: </p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8535.image_3E617F13.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8535.image_5F00_3E617F13.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5751.image_thumb_225350D9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5751.image_5F00_thumb_5F00_225350D9.png" width="358" height="484" /></a></p>

<pre class="code"><span style="background: white; color: black;">RunBook V140629c
Name                           Value                                                                                    
----                           -----                                                                                    
PSRemotingProtocolVersion      2.2                                                                                      
BuildVersion                   6.3.9600.16406                                                                           
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}                                                                     
PSVersion                      4.0                                                                                      
CLRVersion                     4.0.30319.19455                                                                          
WSManStackVersion              3.0                                                                                      
SerializationVersion           1.1.0.1                                                                                  
ModuleType Version    Name                                ExportedCommands                PSComputerName                
---------- -------    ----                                ----------------                --------------                
Binary     0.8.0      azure                               {Remove-AzureStorageAccount,... localhost                     
will create cluster monclusterhadoop
PSComputerName        : localhost
PSSourceJobInstanceId : b7a8dc2b-3e11-467f-8dad-2a1ac76da33f
ClusterSizeInNodes    : 3
ConnectionUrl         : https://monclusterhadoop.azurehdinsight.net
CreateDate            : 6/29/2014 7:57:56 AM
DefaultStorageAccount : monstockageazure.blob.core.windows.net
HttpUserName          : cornac
Location              : North Europe
Name                  : monclusterhadoop
State                 : Running
StorageAccounts       : {}
SubscriptionId        : 0fa85b4c-aa27-44ba-84e5-fa51aac32734
UserName              : cornac
Version               : 3.0.3.234.879810
VersionStatus         : Compatible
cluster created
Successfully connected to cluster monclusterhadoop
will start job
will wait for the end of the job
PSComputerName        : localhost
PSSourceJobInstanceId : b7a8dc2b-3e11-467f-8dad-2a1ac76da33f
Cluster               : monclusterhadoop
ExitCode              : 0
Name                  : 
PercentComplete       : 100% complete
Query                 : 
State                 : Completed
StatusDirectory       : 54d76c5f-a0a3-4df8-84d3-8b58d05f51fd
SubmissionTime        : 6/29/2014 8:12:17 AM
JobId                 : job_1404029421644_0001
--- log ---
2014-06-29 08:12:28,609 [main] INFO  org.apache.pig.Main - Apache Pig version 0.12.0.2.0.9.0-1686 (r: unknown) compiled Jun 10 2014, 17:27:26
2014-06-29 08:12:28,609 [main] INFO  org.apache.pig.Main - Logging error messages to: C:\apps\dist\hadoop-2.2.0.2.0.9.0-1686\logs\pig_1404029548609.log
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/apps/dist/hadoop-2.2.0.2.0.9.0-1686/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/apps/dist/pig-0.12.0.2.0.9.0-1686/pig-0.12.0.2.0.9.0-1686.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See https://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
2014-06-29 08:12:29,609 [main] INFO  org.apache.pig.impl.util.Utils - Default bootup file D:\Users\hdp/.pigbootup not found
2014-06-29 08:12:29,844 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
2014-06-29 08:12:29,844 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
2014-06-29 08:12:29,844 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: wasb://monclusterhadoop@monstockageazure.blob.core.windows.net
2014-06-29 08:12:30,515 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
2014-06-29 08:12:30,547 [main] INFO  org.apache.pig.scripting.jython.JythonScriptEngine - created tmp python.cachedir=D:\Users\hdp\AppData\Local\Temp\pig_jython_8612239229935485131
2014-06-29 08:12:32,781 [main] WARN  org.apache.pig.scripting.jython.JythonScriptEngine - pig.cmd.args.remainders is empty. This is not expected unless on testing.
2014-06-29 08:12:34,828 [main] INFO  org.apache.pig.scripting.jython.JythonScriptEngine - Register scripting UDF: helper.date_time_by_the_minute
2014-06-29 08:12:34,828 [main] INFO  org.apache.pig.scripting.jython.JythonScriptEngine - Register scripting UDF: helper.new_uuid
2014-06-29 08:12:35,594 [main] INFO  org.apache.pig.scripting.jython.JythonFunction - Schema 'hit_date_time:chararray' defined for func date_time_by_the_minute
2014-06-29 08:12:35,750 [main] INFO  org.apache.pig.tools.pigstats.ScriptState - Pig features used in the script: GROUP_BY,ORDER_BY,FILTER
2014-06-29 08:12:35,812 [main] INFO  org.apache.pig.newplan.logical.optimizer.LogicalPlanOptimizer - {RULES_ENABLED=[AddForEach, ColumnMapKeyPrune, DuplicateForEachColumnRewrite, GroupByConstParallelSetter, ImplicitSplitInserter, LimitOptimizer, LoadTypeCastInserter, MergeFilter, MergeForEach, NewPartitionFilterOptimizer, PartitionFilterOptimizer, PushDownForEachFlatten, PushUpFilter, SplitFilter, StreamTypeCastInserter], RULES_DISABLED=[FilterLogicExpressionSimplifier]}
2014-06-29 08:12:35,844 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.textoutputformat.separator is deprecated. Instead, use mapreduce.output.textoutputformat.separator
2014-06-29 08:12:36,078 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler - File concatenation threshold: 100 optimistic? false
2014-06-29 08:12:36,219 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.CombinerOptimizer - Choosing to move algebraic foreach to combiner
2014-06-29 08:12:36,297 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size before optimization: 3
2014-06-29 08:12:36,297 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size after optimization: 3
2014-06-29 08:12:36,594 [main] INFO  org.apache.hadoop.yarn.client.RMProxy - Connecting to ResourceManager at headnodehost/100.85.198.84:9010
2014-06-29 08:12:36,734 [main] INFO  org.apache.pig.tools.pigstats.ScriptState - Pig script settings are added to the job
2014-06-29 08:12:36,750 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.job.reduce.markreset.buffer.percent is deprecated. Instead, use mapreduce.reduce.markreset.buffer.percent
2014-06-29 08:12:36,750 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - mapred.job.reduce.markreset.buffer.percent is not set, set to default 0.3
2014-06-29 08:12:36,750 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.output.compress is deprecated. Instead, use mapreduce.output.fileoutputformat.compress
2014-06-29 08:12:36,750 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Reduce phase detected, estimating # of required reducers.
2014-06-29 08:12:36,750 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Using reducer estimator: org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator
2014-06-29 08:12:36,750 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator - BytesPerReducer=1000000000 maxReducers=999 totalInputFileSize=-1
2014-06-29 08:12:36,750 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Could not estimate number of reducers and no requested or default parallelism set. Defaulting to 1 reducer.
2014-06-29 08:12:36,750 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Setting Parallelism to 1
2014-06-29 08:12:36,750 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces
2014-06-29 08:12:37,347 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - creating jar file Job1668949293984769897.jar
2014-06-29 08:12:46,909 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - jar file Job1668949293984769897.jar created
2014-06-29 08:12:46,909 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.jar is deprecated. Instead, use mapreduce.job.jar
2014-06-29 08:12:46,940 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Setting up single store job
2014-06-29 08:12:46,987 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Key [pig.schematuple] is false, will not generate code.
2014-06-29 08:12:46,987 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Starting process to move generated code to distributed cache
2014-06-29 08:12:46,987 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Setting key [pig.schematuple.classes] with classes to deserialize []
2014-06-29 08:12:47,112 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 1 map-reduce job(s) waiting for submission.
2014-06-29 08:12:47,112 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.job.tracker.http.address is deprecated. Instead, use mapreduce.jobtracker.http.address
2014-06-29 08:12:47,112 [JobControl] INFO  org.apache.hadoop.yarn.client.RMProxy - Connecting to ResourceManager at headnodehost/100.85.198.84:9010
2014-06-29 08:12:47,206 [JobControl] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
2014-06-29 08:12:49,043 [JobControl] INFO  org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input paths to process : 71
2014-06-29 08:12:49,043 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths to process : 71
2014-06-29 08:12:49,090 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths (combined) to process : 12
2014-06-29 08:12:49,293 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - number of splits:12
2014-06-29 08:12:49,621 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Submitting tokens for job: job_1404029421644_0002
2014-06-29 08:12:49,621 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Kind: mapreduce.job, Service: job_1404029421644_0001, Ident: (org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier@5b531130)
2014-06-29 08:12:49,636 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Kind: RM_DELEGATION_TOKEN, Service: 100.85.198.84:9010, Ident: (owner=cornac, renewer=mr token, realUser=hdp, issueDate=1404029526385, maxDate=1404634326385, sequenceNumber=1, masterKeyId=2)
2014-06-29 08:12:50,058 [JobControl] INFO  org.apache.hadoop.yarn.client.api.impl.YarnClientImpl - Submitted application application_1404029421644_0002 to ResourceManager at headnodehost/100.85.198.84:9010
2014-06-29 08:12:50,121 [JobControl] INFO  org.apache.hadoop.mapreduce.Job - The url to track the job: https://headnodehost:9014/proxy/application_1404029421644_0002/
2014-06-29 08:12:50,121 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - HadoopJobId: job_1404029421644_0002
2014-06-29 08:12:50,121 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Processing aliases logs_date_cip,logs_date_cip_with_headers,logs_date_time_cip,logs_date_time_cip_count,logs_date_time_cip_group,logs_raw
2014-06-29 08:12:50,121 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - detailed locations: M: logs_raw[4,11],logs_date_cip_with_headers[5,29],logs_date_cip[6,16],logs_date_time_cip[7,21],logs_date_time_cip_count[9,27],logs_date_time_cip_group[8,27] C: logs_date_time_cip_count[9,27],logs_date_time_cip_group[8,27] R: logs_date_time_cip_count[9,27]
2014-06-29 08:12:50,168 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 0% complete
2014-06-29 08:13:33,534 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 4% complete
2014-06-29 08:13:36,784 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 11% complete
2014-06-29 08:13:39,034 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 16% complete
2014-06-29 08:13:39,566 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 20% complete
2014-06-29 08:13:41,258 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 33% complete
2014-06-29 08:13:46,533 [main] INFO  org.apache.pig.tools.pigstats.ScriptState - Pig script settings are added to the job
2014-06-29 08:13:46,533 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - mapred.job.reduce.markreset.buffer.percent is not set, set to default 0.3
2014-06-29 08:13:46,533 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Reduce phase detected, estimating # of required reducers.
2014-06-29 08:13:46,533 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Using reducer estimator: org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator
2014-06-29 08:13:46,533 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.InputSizeReducerEstimator - BytesPerReducer=1000000000 maxReducers=999 totalInputFileSize=-1
2014-06-29 08:13:46,533 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Could not estimate number of reducers and no requested or default parallelism set. Defaulting to 1 reducer.
2014-06-29 08:13:46,533 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Setting Parallelism to 1
2014-06-29 08:13:47,042 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - creating jar file Job8669508224269273799.jar
2014-06-29 08:13:56,229 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - jar file Job8669508224269273799.jar created
2014-06-29 08:13:56,261 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Setting up single store job
2014-06-29 08:13:56,276 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Key [pig.schematuple] is false, will not generate code.
2014-06-29 08:13:56,276 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Starting process to move generated code to distributed cache
2014-06-29 08:13:56,276 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Setting key [pig.schematuple.classes] with classes to deserialize []
2014-06-29 08:13:56,307 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 1 map-reduce job(s) waiting for submission.
2014-06-29 08:13:56,307 [JobControl] INFO  org.apache.hadoop.yarn.client.RMProxy - Connecting to ResourceManager at headnodehost/100.85.198.84:9010
2014-06-29 08:13:56,386 [JobControl] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
2014-06-29 08:13:57,318 [JobControl] INFO  org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input paths to process : 1
2014-06-29 08:13:57,318 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths to process : 1
2014-06-29 08:13:57,318 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths (combined) to process : 1
2014-06-29 08:13:57,505 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - number of splits:1
2014-06-29 08:13:57,630 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Submitting tokens for job: job_1404029421644_0003
2014-06-29 08:13:57,630 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Kind: mapreduce.job, Service: job_1404029421644_0001, Ident: (org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier@3c124a75)
2014-06-29 08:13:57,630 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Kind: RM_DELEGATION_TOKEN, Service: 100.85.198.84:9010, Ident: (owner=cornac, renewer=mr token, realUser=hdp, issueDate=1404029526385, maxDate=1404634326385, sequenceNumber=1, masterKeyId=2)
2014-06-29 08:13:57,755 [JobControl] INFO  org.apache.hadoop.yarn.client.api.impl.YarnClientImpl - Submitted application application_1404029421644_0003 to ResourceManager at headnodehost/100.85.198.84:9010
2014-06-29 08:13:57,771 [JobControl] INFO  org.apache.hadoop.mapreduce.Job - The url to track the job: https://headnodehost:9014/proxy/application_1404029421644_0003/
2014-06-29 08:13:57,771 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - HadoopJobId: job_1404029421644_0003
2014-06-29 08:13:57,771 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Processing aliases logs_date_time_cip_count_ordered
2014-06-29 08:13:57,771 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - detailed locations: M: logs_date_time_cip_count_ordered[10,35] C:  R: 
2014-06-29 08:14:16,338 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 50% complete
2014-06-29 08:14:24,487 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 66% complete
2014-06-29 08:14:28,544 [main] INFO  org.apache.pig.tools.pigstats.ScriptState - Pig script settings are added to the job
2014-06-29 08:14:28,544 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - mapred.job.reduce.markreset.buffer.percent is not set, set to default 0.3
2014-06-29 08:14:28,544 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Reduce phase detected, estimating # of required reducers.
2014-06-29 08:14:28,544 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Setting Parallelism to 1
2014-06-29 08:14:29,021 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - creating jar file Job3067576297837929164.jar
2014-06-29 08:14:38,100 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - jar file Job3067576297837929164.jar created
2014-06-29 08:14:38,115 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Setting up single store job
2014-06-29 08:14:38,115 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Key [pig.schematuple] is false, will not generate code.
2014-06-29 08:14:38,115 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Starting process to move generated code to distributed cache
2014-06-29 08:14:38,115 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Setting key [pig.schematuple.classes] with classes to deserialize []
2014-06-29 08:14:38,162 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 1 map-reduce job(s) waiting for submission.
2014-06-29 08:14:38,193 [JobControl] INFO  org.apache.hadoop.yarn.client.RMProxy - Connecting to ResourceManager at headnodehost/100.85.198.84:9010
2014-06-29 08:14:38,256 [JobControl] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
2014-06-29 08:14:39,129 [JobControl] INFO  org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input paths to process : 1
2014-06-29 08:14:39,129 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths to process : 1
2014-06-29 08:14:39,145 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths (combined) to process : 1
2014-06-29 08:14:39,333 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - number of splits:1
2014-06-29 08:14:39,442 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Submitting tokens for job: job_1404029421644_0004
2014-06-29 08:14:39,442 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Kind: mapreduce.job, Service: job_1404029421644_0001, Ident: (org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier@6791a1a0)
2014-06-29 08:14:39,442 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Kind: RM_DELEGATION_TOKEN, Service: 100.85.198.84:9010, Ident: (owner=cornac, renewer=mr token, realUser=hdp, issueDate=1404029526385, maxDate=1404634326385, sequenceNumber=1, masterKeyId=2)
2014-06-29 08:14:40,604 [JobControl] INFO  org.apache.hadoop.yarn.client.api.impl.YarnClientImpl - Submitted application application_1404029421644_0004 to ResourceManager at headnodehost/100.85.198.84:9010
2014-06-29 08:14:40,610 [JobControl] INFO  org.apache.hadoop.mapreduce.Job - The url to track the job: https://headnodehost:9014/proxy/application_1404029421644_0004/
2014-06-29 08:14:40,610 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - HadoopJobId: job_1404029421644_0004
2014-06-29 08:14:40,610 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Processing aliases logs_date_time_cip_count_ordered
2014-06-29 08:14:40,610 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - detailed locations: M: logs_date_time_cip_count_ordered[10,35] C:  R: 
2014-06-29 08:14:55,976 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 83% complete
2014-06-29 08:15:11,394 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 100% complete
2014-06-29 08:15:11,597 [main] INFO  org.apache.pig.tools.pigstats.SimplePigStats - Script Statistics: 
HadoopVersion    PigVersion    UserId    StartedAt    FinishedAt    Features
2.2.0.2.0.9.0-1686    0.12.0.2.0.9.0-1686    hdp    2014-06-29 08:12:36    2014-06-29 08:15:11    GROUP_BY,ORDER_BY,FILTER
Success!
Job Stats (time in seconds):
JobId    Maps    Reduces    MaxMapTime    MinMapTIme    AvgMapTime    MedianMapTime    MaxReduceTime    MinReduceTime    AvgReduceTime    MedianReducetime    Alias    Feature    Outputs
job_1404029421644_0002    12    1    33    16    29    31    20    20    20    20    logs_date_cip,logs_date_cip_with_headers,logs_date_time_cip,logs_date_time_cip_count,logs_date_time_cip_group,logs_raw    GROUP_BY,COMBINER    
job_1404029421644_0003    1    1    7    7    7    7    5    5    5    5    logs_date_time_cip_count_ordered    SAMPLER    
job_1404029421644_0004    1    1    5    5    5    5    7    7    7    7    logs_date_time_cip_count_ordered    ORDER_BY    /wasbwork/iislogs-client-ip,
Input(s):
Successfully read 592234 records from: &quot;wasb://demo@monstockageazure.blob.core.windows.net/data/iislogs&quot;
Output(s):
Successfully stored 712 records in: &quot;/wasbwork/iislogs-client-ip&quot;
Counters:
Total records written : 712
Total bytes written : 0
Spillable Memory Manager spill count : 0
Total bags proactively spilled: 0
Total records proactively spilled: 0
Job DAG:
job_1404029421644_0002    -&gt;    job_1404029421644_0003,
job_1404029421644_0003    -&gt;    job_1404029421644_0004,
job_1404029421644_0004
2014-06-29 08:15:31,611 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: workernode0/100.85.210.91:49416. Already tried 0 time(s); maxRetries=3
2014-06-29 08:15:51,619 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: workernode0/100.85.210.91:49416. Already tried 1 time(s); maxRetries=3
2014-06-29 08:16:11,631 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: workernode0/100.85.210.91:49416. Already tried 2 time(s); maxRetries=3
2014-06-29 08:16:31,768 [main] INFO  org.apache.hadoop.mapred.ClientServiceDelegate - Application state is completed. FinalApplicationStatus=SUCCEEDED. Redirecting to job history server
2014-06-29 08:16:54,015 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: workernode1/100.85.164.84:49580. Already tried 0 time(s); maxRetries=3
2014-06-29 08:17:14,021 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: workernode1/100.85.164.84:49580. Already tried 1 time(s); maxRetries=3
2014-06-29 08:17:34,027 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: workernode1/100.85.164.84:49580. Already tried 2 time(s); maxRetries=3
2014-06-29 08:17:54,161 [main] INFO  org.apache.hadoop.mapred.ClientServiceDelegate - Application state is completed. FinalApplicationStatus=SUCCEEDED. Redirecting to job history server
2014-06-29 08:17:56,525 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: workernode2/100.85.206.85:49658. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1 SECONDS)
2014-06-29 08:17:58,543 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: workernode2/100.85.206.85:49658. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1 SECONDS)
2014-06-29 08:18:00,583 [main] INFO  org.apache.hadoop.ipc.Client - Retrying connect to server: workernode2/100.85.206.85:49658. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=3, sleepTime=1 SECONDS)
2014-06-29 08:18:01,705 [main] INFO  org.apache.hadoop.mapred.ClientServiceDelegate - Application state is completed. FinalApplicationStatus=SUCCEEDED. Redirecting to job history server
2014-06-29 08:18:01,908 [main] WARN  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Encountered Warning ACCESSING_NON_EXISTENT_FIELD 330 time(s).
2014-06-29 08:18:01,908 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Success!
job done
will remove cluster
removed cluster
done</span></pre>

<p>&#160;</p>

<p><img class="wlEmoticon wlEmoticon-smile" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1172.wlEmoticon-smile_3B51B1CF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1172.wlEmoticon_2D00_smile_5F00_3B51B1CF.png" /></p>

<p>Benjamin (<a href="https://twitter.com/@benjguin">@benjguin</a>)</p>]]></content:encoded>
    </item>
    <item>
      <title>Azure Automation: What is running on my subscriptions</title>
      <link>https://docs.microsoft.com/archive/blogs/benjguin/azure-automation-what-is-running-on-my-subscriptions</link>
      <pubDate>Thu, 24 Jul 2014 06:01:10 GMT</pubDate>
      <dc:creator><![CDATA[Benjamin GUINEBERTIERE]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/benjguin/2014/07/24/azure-automation-what-is-running-on-my-subscriptions/</guid>
      <description><![CDATA[the result  I regulalry need to check if my Azure virtual machines are turned off before leaving....]]></description>
      <content:encoded><![CDATA[<h2>the result</h2>  <p>I regulalry need to check if my Azure virtual machines are turned off before leaving. Besides virtual machines, I also want to know in which pricing level my web sites, Azure SQL Databases, etc are running. I want to know if I have an HDInsight cluster running.</p>  <p>So I created an Azure automation job that checks the subscriptions at 6pm every day.</p>  <p>Here is how it looks: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8865.image_21C411B9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8865.image_5F00_21C411B9.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0728.image_thumb_7C5CAEFB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0728.image_5F00_thumb_5F00_7C5CAEFB.png" width="644" height="330" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4431.image_1246214C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4431.image_5F00_1246214C.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3480.image_thumb_5F0C7893.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3480.image_5F00_thumb_5F00_5F0C7893.png" width="569" height="484" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3660.image_258BF94D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3660.image_5F00_258BF94D.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7433.image_thumb_5E39340B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7433.image_5F00_thumb_5F00_5E39340B.png" width="322" height="484" /></a></p>  <h2>How to start</h2>  <p>You can start using Azure automation by following the instructions available here:</p>  <p><a title="https://azure.microsoft.com/en-us/documentation/articles/automation-create-runbook-from-samples/" href="https://azure.microsoft.com/en-us/documentation/articles/automation-create-runbook-from-samples/">https://azure.microsoft.com/en-us/documentation/articles/automation-create-runbook-from-samples/</a></p>  <h2>Credentials</h2>  <p>The script will need to get access to the subscriptions. </p>  <p>So I created a management certificate. One way to do so is explained in <a href="https://blogs.technet.com/b/keithmayer/archive/2014/04/04/step-by-step-getting-started-with-windows-azure-automation.aspx">this blog post by Keith Mayer</a>.</p>  <p>In my case, here is how my environment looks: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1680.image_4D54901B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1680.image_5F00_4D54901B.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/2548.image_thumb_0D210752.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/2548.image_5F00_thumb_5F00_0D210752.png" width="644" height="178" /></a></p>  <p>In Azure automation, the same certificate is declared in the assets: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/2480.image_1C57701F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/2480.image_5F00_1C57701F.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1263.image_thumb_32AD1564.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1263.image_5F00_thumb_5F00_32AD1564.png" width="644" height="210" /></a></p>  <h2>The script</h2>  <p>Here is how the script itself:</p>  <pre class="code"><span style="background: white; color: blue;">workflow </span><span style="background: white; color: black;">Inventory
{ 
    </span><span style="background: white; color: green;"># Get the Azure management certificate that is used to connect to this subscription
    </span><span style="background: white; color: rgb(189, 99, 197);">$Certificate </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(255, 140, 0);">Get-AutomationCertificate </span><span style="background: white; color: teal;">-Name </span><span style="background: white; color: rgb(163, 21, 21);">'azure-admin.3-4.fr'
    </span><span style="background: white; color: blue;">if </span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(189, 99, 197);">$Certificate </span><span style="background: white; color: black;">-eq </span><span style="background: white; color: rgb(189, 99, 197);">$null</span><span style="background: white; color: black;">)
    {
        </span><span style="background: white; color: blue;">throw </span><span style="background: white; color: black;">&quot;Could not retrieve '</span><span style="background: white; color: rgb(189, 99, 197);">$AzureConn</span><span style="background: white; color: black;">.AutomationCertificateName' certificate asset. Check that you created this first in the Automation service.&quot;
    }

    </span><span style="background: white; color: gray;">InlineScript
    </span><span style="background: white; color: black;">{
        </span><span style="background: white; color: rgb(189, 99, 197);">$Certificate </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(189, 99, 197);">$using:Certificate

        $subscriptions </span><span style="background: white; color: black;">= ((</span><span style="background: white; color: rgb(163, 21, 21);">'Azdem169A44055X'</span><span style="background: white; color: black;">,</span><span style="background: white; color: rgb(163, 21, 21);">'0fa8xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'</span><span style="background: white; color: black;">), 
        (</span><span style="background: white; color: rgb(163, 21, 21);">'Azure bengui'</span><span style="background: white; color: black;">,</span><span style="background: white; color: rgb(163, 21, 21);">'b4edxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'</span><span style="background: white; color: black;">), 
        (</span><span style="background: white; color: rgb(163, 21, 21);">'APVX'</span><span style="background: white; color: black;">,</span><span style="background: white; color: rgb(163, 21, 21);">'0ec1xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'</span><span style="background: white; color: black;">), 
        (</span><span style="background: white; color: rgb(163, 21, 21);">'demos-frazurete'</span><span style="background: white; color: black;">,</span><span style="background: white; color: rgb(163, 21, 21);">'4b57xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'</span><span style="background: white; color: black;">))
    
        </span><span style="background: white; color: blue;">foreach </span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(189, 99, 197);">$subscription </span><span style="background: white; color: blue;">in </span><span style="background: white; color: rgb(189, 99, 197);">$subscriptions</span><span style="background: white; color: black;">)
        {
            </span><span style="background: white; color: rgb(189, 99, 197);">$subscriptionName </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(189, 99, 197);">$subscription</span><span style="background: white; color: black;">[0]
            </span><span style="background: white; color: rgb(189, 99, 197);">$subscriptionId </span><span style="background: white; color: black;">= </span><span style="background: white; color: rgb(189, 99, 197);">$subscription</span><span style="background: white; color: black;">[1]
            
            </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: black;">&quot;------- Subscription </span><span style="background: white; color: rgb(189, 99, 197);">$subscriptionName </span><span style="background: white; color: black;">----------&quot;

            </span><span style="background: white; color: green;"># Set the Azure subscription configuration
            </span><span style="background: white; color: rgb(255, 140, 0);">Set-AzureSubscription </span><span style="background: white; color: teal;">-SubscriptionName </span><span style="background: white; color: rgb(189, 99, 197);">$subscriptionName </span><span style="background: white; color: teal;">-SubscriptionId </span><span style="background: white; color: rgb(189, 99, 197);">$subscriptionId </span><span style="background: white; color: teal;">-Certificate </span><span style="background: white; color: rgb(189, 99, 197);">$Certificate
            </span><span style="background: white; color: rgb(255, 140, 0);">Select-AzureSubscription </span><span style="background: white; color: teal;">-Current </span><span style="background: white; color: rgb(189, 99, 197);">$subscriptionName 

            $vms </span><span style="background: white; color: black;">= @()
            </span><span style="background: white; color: blue;">foreach </span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(189, 99, 197);">$s </span><span style="background: white; color: blue;">in </span><span style="background: white; color: rgb(255, 140, 0);">Get-AzureService</span><span style="background: white; color: black;">)
            {
                </span><span style="background: white; color: rgb(189, 99, 197);">$vms </span><span style="background: white; color: black;">+= </span><span style="background: white; color: rgb(255, 140, 0);">Get-AzureVm </span><span style="background: white; color: teal;">-ServiceName </span><span style="background: white; color: rgb(189, 99, 197);">$s</span><span style="background: white; color: black;">.ServiceName
            }
            </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;--- Virtual Machines ---&quot;
            </span><span style="background: white; color: rgb(189, 99, 197);">$vms </span><span style="background: white; color: black;">| </span><span style="background: white; color: rgb(255, 140, 0);">select </span><span style="background: white; color: black;">servicename, Name, PowerState | </span><span style="background: white; color: rgb(255, 140, 0);">format-table
            
            </span><span style="background: white; color: rgb(189, 99, 197);">$hclusters</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(255, 140, 0);">Get-AzureHDInsightCluster
            echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;--- HDInsight clusters ---&quot;
            </span><span style="background: white; color: rgb(189, 99, 197);">$hclusters </span><span style="background: white; color: black;">| </span><span style="background: white; color: rgb(255, 140, 0);">format-table
        
            </span><span style="background: white; color: rgb(189, 99, 197);">$webs</span><span style="background: white; color: black;">=</span><span style="background: white; color: rgb(255, 140, 0);">Get-AzureWebSite
            echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;--- Web Sites ---&quot;
            </span><span style="background: white; color: rgb(189, 99, 197);">$webs </span><span style="background: white; color: black;">| </span><span style="background: white; color: rgb(255, 140, 0);">select </span><span style="background: white; color: black;">Name, SiteMode |  </span><span style="background: white; color: rgb(255, 140, 0);">sort </span><span style="background: white; color: black;">Name | </span><span style="background: white; color: rgb(255, 140, 0);">format-table
            
            </span><span style="background: white; color: rgb(189, 99, 197);">$dbs </span><span style="background: white; color: black;">= @()
            </span><span style="background: white; color: blue;">foreach </span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(189, 99, 197);">$s </span><span style="background: white; color: blue;">in </span><span style="background: white; color: rgb(255, 140, 0);">Get-AzureSqlDatabaseServer</span><span style="background: white; color: black;">)
            {
                </span><span style="background: white; color: rgb(189, 99, 197);">$dbs </span><span style="background: white; color: black;">+= </span><span style="background: white; color: rgb(255, 140, 0);">Get-AzureSqlDatabase </span><span style="background: white; color: teal;">-ServerName </span><span style="background: white; color: rgb(189, 99, 197);">$s</span><span style="background: white; color: black;">.ServerName
            }
            </span><span style="background: white; color: rgb(255, 140, 0);">echo </span><span style="background: white; color: rgb(163, 21, 21);">&quot;--- SQL Databases ---&quot;
            </span><span style="background: white; color: rgb(189, 99, 197);">$dbs </span><span style="background: white; color: black;">| </span><span style="background: white; color: rgb(255, 140, 0);">select </span><span style="background: white; color: black;">Name, Edition, MaxSizeinGb | </span><span style="background: white; color: rgb(255, 140, 0);">format-table    
        </span><span style="background: white; color: black;">}
    }
}
</span></pre>


<p>NB: I have obfuscated the subscription ids.</p>

<h2>Make it your own</h2>

<p>You can change the script for your own usage. You would need to change the certificate name (mine is azure-admin.3-4.fr), the names and ids of your subscriptions).</p>

<p>&#160;</p>

<p><img class="wlEmoticon wlEmoticon-smile" style="style" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4118.wlEmoticon-smile_6BC68317.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4118.wlEmoticon_2D00_smile_5F00_6BC68317.png" /></p>

<p>Benjamin (<a href="https://twitter.com/@benjguin">@benjguin</a>)</p>]]></content:encoded>
    </item>
    <item>
      <title>start a Pig + Jython job in HDInsight thru WebHCat</title>
      <link>https://docs.microsoft.com/archive/blogs/benjguin/start-a-pig-jython-job-in-hdinsight-thru-webhcat</link>
      <pubDate>Fri, 21 Mar 2014 14:12:53 GMT</pubDate>
      <dc:creator><![CDATA[Benjamin GUINEBERTIERE]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/benjguin/2014/03/21/start-a-pig-jython-job-in-hdinsight-thru-webhcat/</guid>
      <description><![CDATA[You can also use HDInsight with Hive + Python.   The drawback of the latter is that you use...]]></description>
      <content:encoded><![CDATA[<p>You can also use <a href="https://blogs.msdn.com/b/benjguin/archive/2014/03/03/a-simple-example-how-to-call-python-from-hive-in-hdinsight.aspx">HDInsight with Hive + Python</a>. </p>  <p>The drawback of the latter is that you use streaming between Hive and Python. In Hadoop streaming is just a way to call stdin/stdout inter process communication. So if you just do simple operations like string concatenations between two fields in Python it may be slow. the good things is that hive has user defined functions and also standard ones that help do all the simple things (like string concatenation).</p>  <p>There’s a way to use Python language without using streaming: just run Python in the JVM (remember Hadoop is written in Java). Python in the JVM is Jython. And Pig (an equivalent to Hive that has its own scripting language, instead of using SQL) can call Jython scripts. </p>  <p>With <a href="https://3-4.fr/1g75eEl">HDInsight 3.0 which became generally available recently</a>, you can use that kind of feature. Here’s how. In order to launch the job here, I use <a href="https://blogs.msdn.com/b/benjguin/archive/2014/02/18/how-to-use-hdinsight-from-linux.aspx">a script from Linux that leverages WebHCat / Templeton REST API from a Linux machine.</a> Here is how.</p>  <p>The Python script that launches the job is the following: </p>  <pre class="code"><span style="background: white; color: blue;">import </span><span style="background: white; color: black;">requests </span><span style="background: white; color: green;">#https://pypi.python.org/pypi/requests

</span><span style="background: white; color: black;">clusterName=</span><span style="background: white; color: rgb(163, 21, 21);">'monclusterhadoop'
</span><span style="background: white; color: black;">clusterAdmin=</span><span style="background: white; color: rgb(163, 21, 21);">'cornac'
</span><span style="background: white; color: black;">clusterPassword=</span><span style="background: white; color: rgb(163, 21, 21);">'ChangeWithY0urs!'

</span><span style="background: white; color: green;">#get WebHCat status
</span><span style="background: white; color: black;">webHCatUrl=</span><span style="background: white; color: rgb(163, 21, 21);">'https://' </span><span style="background: white; color: black;">+ clusterName + </span><span style="background: white; color: rgb(163, 21, 21);">'.azurehdinsight.net/templeton/v1/status'

</span><span style="background: white; color: black;">r = requests.get(webHCatUrl, auth=(clusterAdmin, clusterPassword))

</span><span style="background: white; color: blue;">print </span><span style="background: white; color: black;">r.status_code
</span><span style="background: white; color: blue;">print </span><span style="background: white; color: black;">r.json()

</span><span style="background: white; color: green;">#submit a pig job:
# https://docs.hortonworks.com/HDPDocuments/HDP1/HDP-Win-1.3.0/ds_HCatalog/pig.html

</span><span style="background: white; color: black;">webHCatUrl=</span><span style="background: white; color: rgb(163, 21, 21);">'https://' </span><span style="background: white; color: black;">+ clusterName + </span><span style="background: white; color: rgb(163, 21, 21);">'.azurehdinsight.net/templeton/v1/pig'

</span><span style="background: white; color: black;">hive_params={</span><span style="background: white; color: rgb(163, 21, 21);">'user.name'</span><span style="background: white; color: black;">:clusterAdmin,
             </span><span style="background: white; color: rgb(163, 21, 21);">'file'</span><span style="background: white; color: black;">:</span><span style="background: white; color: rgb(163, 21, 21);">'wasb://demo@monstockageazure.blob.core.windows.net/scripts/pig_python/pig_python.pig'</span><span style="background: white; color: black;">,
             </span><span style="background: white; color: rgb(163, 21, 21);">'statusdir'</span><span style="background: white; color: black;">: </span><span style="background: white; color: rgb(163, 21, 21);">'/wasbwork/pig_from_python'</span><span style="background: white; color: black;">}

r = requests.post(webHCatUrl, auth=(clusterAdmin, clusterPassword), data=hive_params)
</span><span style="background: white; color: blue;">print </span><span style="background: white; color: black;">r.status_code
</span><span style="background: white; color: blue;">print </span><span style="background: white; color: black;">r.json()
</span></pre>




<p>the pig job looks like this:</p>

<p>Register 'wasb://demo@monstockageazure.blob.core.windows.net/scripts/pig_python/pig_python.py' using jython as myfuncs; </p>

<p>a = load 'wasb://demo@monstockageazure.blob.core.windows.net/data/ref_villes' using PigStorage(' ') as (ville:chararray);
  <br /> b = foreach a generate ville, myfuncs.helloworld(), myfuncs.square(3);

  <br /> store b into '/wasbwork/pigresult';

  <br /></p>

<p>the Python script called by Pig and defines a few sample basic functions is the following: </p>

<pre class="code"><span style="background: white; color: green;">#!/usr/bin/python

</span><span style="background: white; color: black;">@outputSchema(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;word:chararray&quot;</span><span style="background: white; color: black;">)
</span><span style="background: white; color: blue;">def </span><span style="background: white; color: black;">helloworld():
    </span><span style="background: white; color: blue;">return </span><span style="background: white; color: black;">(</span><span style="background: white; color: rgb(163, 21, 21);">'Hello, World'</span><span style="background: white; color: black;">)
 
@outputSchema(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;t:(word:chararray,num:long)&quot;</span><span style="background: white; color: black;">)
</span><span style="background: white; color: blue;">def </span><span style="background: white; color: black;">complex(word):
    </span><span style="background: white; color: blue;">return </span><span style="background: white; color: black;">(str(word),long(word)*long(word))

@outputSchemaFunction(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;squareSchema&quot;</span><span style="background: white; color: black;">)
</span><span style="background: white; color: blue;">def </span><span style="background: white; color: black;">square(num):   
    </span><span style="background: white; color: blue;">return </span><span style="background: white; color: black;">((num)*(num))   

@schemaFunction(</span><span style="background: white; color: rgb(163, 21, 21);">&quot;squareSchema&quot;</span><span style="background: white; color: black;">) 
</span><span style="background: white; color: blue;">def </span><span style="background: white; color: black;">squareSchema(input):   
    </span><span style="background: white; color: blue;">return </span><span style="background: white; color: black;">input   

</span><span style="background: white; color: green;"># No decorator - bytearray 
</span><span style="background: white; color: blue;">def </span><span style="background: white; color: black;">concat(str):   
    </span><span style="background: white; color: blue;">return </span><span style="background: white; color: black;">str+str
</span></pre>




<p>Source data (ref_villes) looks like this (first lines) :</p>

<pre class="code"><span style="background: white; color: black;">paris
marseille
lyon
toulouse
nice
nantes
strasbourg
montpellier
bordeaux
lille
rennes
reims
le havre
saint-etienne
toulon
grenoble
</span></pre>




<p>the output (part-m-00000) looks like this</p>

<pre class="code"><span style="background: white; color: black;">paris    Hello, World    9
marseille    Hello, World    9
lyon    Hello, World    9
toulouse    Hello, World    9
nice    Hello, World    9
nantes    Hello, World    9
strasbourg    Hello, World    9
montpellier    Hello, World    9
bordeaux    Hello, World    9
lille    Hello, World    9
rennes    Hello, World    9
reims    Hello, World    9
le    Hello, World    9
saint-etienne    Hello, World    9
toulon    Hello, World    9
grenoble    Hello, World    9
</span></pre>




<p>the execution report looks like this (stderr):</p>

<pre class="code" style="width: 876px; height: 221px;"><span style="background: white; color: black;">2014-03-21 11:50:59,951 [main] INFO  org.apache.pig.Main - Apache Pig version 0.12.0.2.0.7.0-1551 (r: unknown) compiled Feb 19 2014, 11:47:04
2014-03-21 11:50:59,951 [main] INFO  org.apache.pig.Main - Logging error messages to: C:\apps\dist\hadoop-2.2.0.2.0.7.0-1551\logs\pig_1395402659935.log
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/apps/dist/hadoop-2.2.0.2.0.7.0-1551/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/apps/dist/pig-0.12.0.2.0.7.0-1551/pig-0.12.0.2.0.7.0-1551.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See https://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
2014-03-21 11:51:00,810 [main] INFO  org.apache.pig.impl.util.Utils - Default bootup file D:\Users\hdp/.pigbootup not found
2014-03-21 11:51:00,997 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
2014-03-21 11:51:00,997 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
2014-03-21 11:51:00,997 [main] INFO  org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: wasb://monclusterhadoop@monstockageazure.blob.core.windows.net
2014-03-21 11:51:01,451 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
2014-03-21 11:51:01,841 [main] INFO  org.apache.pig.scripting.jython.JythonScriptEngine - created tmp python.cachedir=D:\Users\hdp\AppData\Local\Temp\pig_jython_5196260548692206718
2014-03-21 11:51:03,951 [main] WARN  org.apache.pig.scripting.jython.JythonScriptEngine - pig.cmd.args.remainders is empty. This is not expected unless on testing.
2014-03-21 11:51:04,560 [main] INFO  org.apache.pig.scripting.jython.JythonScriptEngine - Register scripting UDF: myfuncs.complex
2014-03-21 11:51:04,560 [main] INFO  org.apache.pig.scripting.jython.JythonScriptEngine - Register scripting UDF: myfuncs.square
2014-03-21 11:51:04,576 [main] INFO  org.apache.pig.scripting.jython.JythonScriptEngine - Register scripting UDF: myfuncs.helloworld
2014-03-21 11:51:04,576 [main] INFO  org.apache.pig.scripting.jython.JythonScriptEngine - Register scripting UDF: myfuncs.concat
2014-03-21 11:51:04,701 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
2014-03-21 11:51:04,951 [main] INFO  org.apache.pig.scripting.jython.JythonFunction - Schema 'word:chararray' defined for func helloworld
2014-03-21 11:51:05,232 [main] INFO  org.apache.pig.tools.pigstats.ScriptState - Pig features used in the script: UNKNOWN
2014-03-21 11:51:05,326 [main] INFO  org.apache.pig.newplan.logical.optimizer.LogicalPlanOptimizer - {RULES_ENABLED=[AddForEach, ColumnMapKeyPrune, DuplicateForEachColumnRewrite, GroupByConstParallelSetter, ImplicitSplitInserter, LimitOptimizer, LoadTypeCastInserter, MergeFilter, MergeForEach, NewPartitionFilterOptimizer, PartitionFilterOptimizer, PushDownForEachFlatten, PushUpFilter, SplitFilter, StreamTypeCastInserter], RULES_DISABLED=[FilterLogicExpressionSimplifier]}
2014-03-21 11:51:05,482 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.textoutputformat.separator is deprecated. Instead, use mapreduce.output.textoutputformat.separator
2014-03-21 11:51:05,763 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler - File concatenation threshold: 100 optimistic? false
2014-03-21 11:51:05,810 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size before optimization: 1
2014-03-21 11:51:05,810 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size after optimization: 1
2014-03-21 11:51:06,091 [main] INFO  org.apache.hadoop.yarn.client.RMProxy - Connecting to ResourceManager at headnode0/100.86.204.54:9010
2014-03-21 11:51:06,263 [main] INFO  org.apache.pig.tools.pigstats.ScriptState - Pig script settings are added to the job
2014-03-21 11:51:06,263 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.job.reduce.markreset.buffer.percent is deprecated. Instead, use mapreduce.reduce.markreset.buffer.percent
2014-03-21 11:51:06,263 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - mapred.job.reduce.markreset.buffer.percent is not set, set to default 0.3
2014-03-21 11:51:06,263 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.output.compress is deprecated. Instead, use mapreduce.output.fileoutputformat.compress
2014-03-21 11:51:06,279 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - creating jar file Job608857099241848139.jar
2014-03-21 11:51:14,294 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - jar file Job608857099241848139.jar created
2014-03-21 11:51:14,294 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.jar is deprecated. Instead, use mapreduce.job.jar
2014-03-21 11:51:14,341 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler - Setting up single store job
2014-03-21 11:51:14,341 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Key [pig.schematuple] is false, will not generate code.
2014-03-21 11:51:14,341 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Starting process to move generated code to distributed cache
2014-03-21 11:51:14,341 [main] INFO  org.apache.pig.data.SchemaTupleFrontend - Setting key [pig.schematuple.classes] with classes to deserialize []
2014-03-21 11:51:14,404 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 1 map-reduce job(s) waiting for submission.
2014-03-21 11:51:14,404 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.job.tracker.http.address is deprecated. Instead, use mapreduce.jobtracker.http.address
2014-03-21 11:51:14,404 [JobControl] INFO  org.apache.hadoop.yarn.client.RMProxy - Connecting to ResourceManager at headnode0/100.86.204.54:9010
2014-03-21 11:51:14,513 [JobControl] INFO  org.apache.hadoop.conf.Configuration.deprecation - fs.default.name is deprecated. Instead, use fs.defaultFS
2014-03-21 11:51:16,154 [JobControl] INFO  org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input paths to process : 2
2014-03-21 11:51:16,154 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths to process : 2
2014-03-21 11:51:16,185 [JobControl] INFO  org.apache.pig.backend.hadoop.executionengine.util.MapRedUtil - Total input paths (combined) to process : 1
2014-03-21 11:51:16,435 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - number of splits:1
2014-03-21 11:51:16,732 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Submitting tokens for job: job_1395391185318_0006
2014-03-21 11:51:16,732 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Kind: mapreduce.job, Service: job_1395391185318_0005, Ident: (org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier@45d45314)
2014-03-21 11:51:16,763 [JobControl] INFO  org.apache.hadoop.mapreduce.JobSubmitter - Kind: RM_DELEGATION_TOKEN, Service: 100.86.204.54:9010, Ident: (owner=cornac, renewer=mr token, realUser=hdp, issueDate=1395402643673, maxDate=1396007443673, sequenceNumber=5, masterKeyId=2)
2014-03-21 11:51:17,154 [JobControl] INFO  org.apache.hadoop.yarn.client.api.impl.YarnClientImpl - Submitted application application_1395391185318_0006 to ResourceManager at headnode0/100.86.204.54:9010
2014-03-21 11:51:17,232 [JobControl] INFO  org.apache.hadoop.mapreduce.Job - The url to track the job: https://headnode0:9014/proxy/application_1395391185318_0006/
2014-03-21 11:51:17,232 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - HadoopJobId: job_1395391185318_0006
2014-03-21 11:51:17,232 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Processing aliases a,b
2014-03-21 11:51:17,232 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - detailed locations: M: a[3,4],b[-1,-1] C:  R: 
2014-03-21 11:51:17,279 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 0% complete
2014-03-21 11:51:34,575 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 50% complete
2014-03-21 11:51:37,981 [main] INFO  org.apache.hadoop.conf.Configuration.deprecation - mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces
2014-03-21 11:51:38,028 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - 100% complete
2014-03-21 11:51:38,028 [main] INFO  org.apache.pig.tools.pigstats.SimplePigStats - Script Statistics: 

HadoopVersion    PigVersion    UserId    StartedAt    FinishedAt    Features
2.2.0.2.0.7.0-1551    0.12.0.2.0.7.0-1551    hdp    2014-03-21 11:51:06    2014-03-21 11:51:38    UNKNOWN

Success!

Job Stats (time in seconds):
JobId    Maps    Reduces    MaxMapTime    MinMapTIme    AvgMapTime    MedianMapTime    MaxReduceTime    MinReduceTime    AvgReduceTime    MedianReducetime    Alias    Feature    Outputs
job_1395391185318_0006    1    0    6    6    6    6    n/a    n/a    n/a    n/a    a,b    MAP_ONLY    /wasbwork/pigresult,

Input(s):
Successfully read 260 records from: &quot;wasb://demo@monstockageazure.blob.core.windows.net/data/ref_villes&quot;

Output(s):
Successfully stored 260 records in: &quot;/wasbwork/pigresult&quot;

Counters:
Total records written : 260
Total bytes written : 0
Spillable Memory Manager spill count : 0
Total bags proactively spilled: 0
Total records proactively spilled: 0

Job DAG:
job_1395391185318_0006


2014-03-21 11:51:38,278 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Success!
</span></pre>


<p><img class="wlEmoticon wlEmoticon-smile" style="style" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0552.wlEmoticon-smile_1686E80E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0552.wlEmoticon_2D00_smile_5F00_1686E80E.png" /></p>

<p>Benjamin (<a href="https://twitter.com/@benjguin">@benjguin</a>) </p>]]></content:encoded>
    </item>
    <item>
      <title>HDInsight + PowerBI: un exemple simple</title>
      <link>https://docs.microsoft.com/archive/blogs/benjguin/hdinsight-powerbi-un-exemple-simple</link>
      <pubDate>Tue, 18 Mar 2014 13:46:41 GMT</pubDate>
      <dc:creator><![CDATA[Benjamin GUINEBERTIERE]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/benjguin/2014/03/18/hdinsight-powerbi-un-exemple-simple/</guid>
      <description><![CDATA[En octobre dernier, j’ai eu l’occasion de montrer comment analyser des données venant de logs Web et...]]></description>
      <content:encoded><![CDATA[<p>En octobre dernier, j’ai eu l’occasion de montrer comment analyser des données venant de logs Web et Twitter avec PIG et HIVE dans Hadoop, puis de croiser les résultats dans Excel, ce qui permet de décliner le résultat dans Power BI. </p>  <p>Je mets ici les diapos et les vidéos (les vidéos sont les vidéos de secours que j’avais, et non la présentation live qui a été faite, mais c’est évidemment très proche).</p>  <p>Cela permet d’avoir une première vision rapide de ce qu’on peut faire avec un cluster HDInsight. C’est un moyen très abordable (autant en termes financiers que technique) de démarrer avec Hadoop. </p>  <p>Les diapos complètes sont disponibles sur <a href="https://1drv.ms/1fFIdlW" target="_blank">OneDrive</a>. </p>  <p>La problématique:    <br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8037.image_659FC940.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8037.image_5F00_659FC940.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4118.image_thumb_7834775D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4118.image_5F00_thumb_5F00_7834775D.png" width="644" height="318" /></a></p>  <p>Si vous voulez tester par vous-même, vous pouvez aller à <a href="https://aka.ms/tester-mon-azure">https://aka.ms/tester-mon-azure</a> où vous aurez 150 € de ressources Windows Azure pour tester pendant 1 mois. </p>  <p>Voici les vidéos: </p>    <div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:c14eaf6b-cb06-44a8-9e2e-a65237b39221" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;"><div><object width="448" height="252"><param name="movie" value="https://www.youtube.com/v/6-6B-mRmN1Q?hl=en&amp;hd=1"></param><embed src="https://www.youtube.com/v/6-6B-mRmN1Q?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"></embed></object></div><div style="width:448px;clear:both;font-size:.8em">Présentation des données</div></div>  <br />  <div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:66997a11-1ee7-4b72-b716-47c982102f72" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;"><div><object width="448" height="252"><param name="movie" value="https://www.youtube.com/v/JSoNEm3aOiA?hl=en&amp;hd=1"></param><embed src="https://www.youtube.com/v/JSoNEm3aOiA?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"></embed></object></div><div style="width:448px;clear:both;font-size:.8em">Création du cluster</div></div>    <div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:950cbd09-7926-471d-ba8c-5edc472b73e1" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;"><div><object width="448" height="252"><param name="movie" value="https://www.youtube.com/v/o2PGDHHwFtQ?hl=en&amp;hd=1"></param><embed src="https://www.youtube.com/v/o2PGDHHwFtQ?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"></embed></object></div><div style="width:448px;clear:both;font-size:.8em">Jobs PIG et Hive</div></div>    <div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:cf4f0822-0525-41e3-86ee-2f35cfe369ca" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;"><div><object width="448" height="252"><param name="movie" value="https://www.youtube.com/v/OiyP_ZplDIA?hl=en&amp;hd=1"></param><embed src="https://www.youtube.com/v/OiyP_ZplDIA?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"></embed></object></div><div style="width:448px;clear:both;font-size:.8em">Excel et suite de l’exécution des jobs</div></div>    <div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:0c210631-ec8d-443a-a473-a79bb8a621e4" class="wlWriterEditableSmartContent" style="margin: 0px; padding: 0px; float: none; display: inline;"><div><object width="448" height="252"><param name="movie" value="https://www.youtube.com/v/1tEHMLN8-uU?hl=en&amp;hd=1"></param><embed src="https://www.youtube.com/v/1tEHMLN8-uU?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"></embed></object></div><div style="width:448px;clear:both;font-size:.8em">Suppression du cluster</div></div>    <p><img class="wlEmoticon wlEmoticon-smile" style="style" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8662.wlEmoticon-smile_15454582.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8662.wlEmoticon_2D00_smile_5F00_15454582.png" /></p>  <p>Benjamin (<a href="https://twitter.com/@benjguin">@benjguin</a>)</p>]]></content:encoded>
    </item>
    <item>
      <title>Why can’t I remove my storage account ?</title>
      <link>https://docs.microsoft.com/archive/blogs/benjguin/why-cant-i-remove-my-storage-account</link>
      <pubDate>Mon, 17 Mar 2014 10:48:18 GMT</pubDate>
      <dc:creator><![CDATA[Benjamin GUINEBERTIERE]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/benjguin/2014/03/17/why-cant-i-remove-my-storage-account/</guid>
      <description><![CDATA[You may want to remove a storage account you’ve created and get a message like this one:   Storage...]]></description>
      <content:encoded><![CDATA[<p>You may want to remove a storage account you’ve created and get a message like this one: </p>  <p><strong>Storage account &lt;mystorage&gt; has container(s) which have an active image and/or disk artifacts. Ensure those artifacts are removed from the image repository before deleting this storage account.</strong></p>    <p>Here is what you may want to check. In the management portal <a href="https://manage.windowsazure.com">https://manage.windowsazure.com</a>, Storage, &lt;mystorage&gt;, Containers, check the content of your containers, especially the “vhds” one which contains virtual hard disks by default. Here is an example of the portal with stockageazure3 instead of &lt;mystorage&gt;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/6332.image_675B29A7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/6332.image_5F00_675B29A7.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5722.image_thumb_721B11AD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5722.image_5F00_thumb_5F00_721B11AD.png" width="644" height="404" /></a></p>  <p>By clicking on the <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0451.image_786478EC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0451.image_5F00_786478EC.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1055.image_thumb_288E5461.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1055.image_5F00_thumb_5F00_288E5461.png" width="195" height="40" /></a>arrow near vhds (or each any other container), you’ll find a list of the blobs inside the container. VHD are good candidates for lock, and we’ll see why in a minute. </p>  <p>Select a .vhd blob and click EDIT at the bottom of the screen   <br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4135.image_7CDD8A64.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4135.image_5F00_7CDD8A64.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4064.image_thumb_1E5CB9F4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4064.image_5F00_thumb_5F00_1E5CB9F4.png" width="344" height="484" /></a></p>  <p>this will show you the lock:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3365.image_17400E2D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3365.image_5F00_17400E2D.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/2742.image_thumb_02511C6B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/2742.image_5F00_thumb_5F00_02511C6B.png" width="481" height="484" /></a></p>    <p>So where do I unlock? </p>    <p>This is related to the way Virtual Machines Work in Windows Azure. The OS disk and data disks live in Windows Azure blob storage. Here is an image of that (here with Windows VMs, but this is very similar with Linux VMs):</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4331.image_2D2C112E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4331.image_5F00_2D2C112E.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/2664.image_thumb_17D0EC77.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/2664.image_5F00_thumb_5F00_17D0EC77.png" width="644" height="388" /></a></p>    <p>So VHD blobs are virtual hard disks that may be used by virtual machines; Windows Azure doesn’t want you to remove a virtual machine disk without knwoing about it! The locks are handled by images, and disks, that you can find here:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1512.image_70-FD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1512.image_5F00_702D00FD.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/7750.image_thumb_5FB49002.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/7750.image_5F00_thumb_5F00_5FB49002.png" width="644" height="240" /></a></p>  <p>for an image or a disk, you can see the referenced blob in the LOCATION column. Here is an example: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1460.image_238B550B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1460.image_5F00_238B550B.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4454.image_thumb_10D8EC05.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4454.image_5F00_thumb_5F00_10D8EC05.png" width="644" height="173" /></a></p>  <p>in this example, myCentoOSImage references the bueearwy.zbn201304031550350920.vhd blob in the vhds container of the northeurope2affstorage storage account. Thus the URI of https://northeurope2affstorage.blob.core.windows.net/vhds/bueearwy.zbn201304031550350920.vhd.</p>  <p>At the bottom of the screen, you can remove the image and optionally also remove the associated VHD:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/8512.image_3494A450.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/8512.image_5F00_3494A450.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3757.image_thumb_5D331057.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3757.image_5F00_thumb_5F00_5D331057.png" width="644" height="417" /></a></p>  <p>Same for DISKS</p>    <p>A disk or an image may itself be locked by a virtual machine instance. In such a case, you may have to stop and remove the virtual machiane first.</p>  <p>For example, in the following screen shot, the benjguinu1 virtual machine holds the benjguinmisc-benjguinu1-0-201310042100440782 disk which locks itself the https://stockageazure2.blob.core.windows.net/vhds/benjguinmisc-benjguinu1-2013-10-04.vhd blob.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/3704.image_5A8CE557.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/3704.image_5F00_5A8CE557.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/4251.image_thumb_133A2016.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/4251.image_5F00_thumb_5F00_133A2016.png" width="644" height="468" /></a></p>    <p>So we have</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/1727.image_72493E1F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/1727.image_5F00_72493E1F.png"><img title="image" style="margin: 0px; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/0871.image_thumb_2E2D8228.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/0871.image_5F00_thumb_5F00_2E2D8228.png" width="617" height="377" /></a></p>  <p>and you cannot remove the referenced blobs without removing the disks, images and VM involved in that chain. </p>    <p><img class="wlEmoticon wlEmoticon-smile" style="style" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/46/20/metablogapi/5280.wlEmoticon-smile_403151FB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-46-20-metablogapi/5280.wlEmoticon_2D00_smile_5F00_403151FB.png" /></p>  <p>Benjamin (<a href="https://twitter.com/@benjguin">@benjguin</a>)</p>]]></content:encoded>
    </item>
  </channel>
</rss>