Resize HortonWorks Sandbox Disk Size

Hortonworks

I’ve created a HortonWorks HDP Sandbox on Azure for testing.

The initial OS disk size is about 48GB, which is too small to hold my files in HDFS for testing.

I find out a way to extend the OS disk to simply increase the HDFS capacity.

References:

1: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006371

2: https://community.hortonworks.com/content/kbentry/1620/how-to-increase-sandbox-disk-space-virtualbox.html

Steps:

Basically it’s create a new LVM partition then add this partition to existing LVM  OS logic volume group.

  1. Attache a disk in Azure portal to the HDP virtual machine.
  2. Create new partition (/dev/sdc1) on that disk (/dev/sdc) and assign partition id ‘8e’, which is LVM partition.
  3. Use ‘vgdisplay’ to find volume group name, it’s ;vg_sandbox’ on HortonWorks sandbox.
  4. Use ‘vgextend’ to extend ‘vg_sandbox’ with the newly created ‘/dev/sda3’.
  5. Use ‘lvdisplay’ to find logical volume name, it’s “lv_root”, path is ‘/dev/vg_sandbox/lv_root’.
  6. Use ‘lvextend –L +xxxG /dev/vg_sandbox/lv_root’ to extend size of the logical volume. xxxG is the free space in volumn group ‘vg_sandbox’, which can be find using vgdisplay.
  7. Use ‘resize2fs /dev/vg_sandbox/lv_root’ to resize the partition online, this step takes some time.

 

Syncing Calendar from Corporate Exchange to Outlook.com Account on Windows Phone

The requirement is simple, to sync my calendar from my company email account, which runs on Exchange Server and client is Outlook, to the Microsoft account on my Windows Phone.

This KB article stated that on Outlook 2010 or 2007, one can use the Outlook Connector software to do this, which is not my case as I am using Outlook 2013. The article also gives a silly solution for Outlook 2013, which simply need I copy meetings manually from the two calendar.

May I  create a little application to do this automatically?

Change Google Font CDN URL to Speed Up Semantic UI Page Loading

Semantic UI is a great web UI framework that ease UI related works.

The default font used in Semantic UI is google font and it is loaded from Google’s CDN, which had been blocked in China for a long time. This can cause a very long-time of first page loading.

To fix this, one can follow Semantic UI customization guide and make change there. An know issue has been submitted on Github site of Semantic UI.

For those who don’t want to customize it, there is a simple solution: change the semantic.sss in dist folder, change the first line from

@import ‘https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin’;

to

@import ‘http://fonts.useso.com/css?family=Lato:400,700,400italic,700italic&subset=latin’;

 

The fonts.useso.com is a China local CDN which replicated from the Google one, makes access from China faster.

Ionic Framework with Visual Studio Cordova Tools

Playing IonicFramework with Microsoft Visual Studio Cordova Tools CTP3, I found a series of articles on setup demo IonicFramework app with MS Cordova Tools.

Here is the links:

  1. http://skylore.wordpress.com/2014/06/03/ionic-framework-inside-a-visual-studio-cordova-application-using-typescript-part-1/
  2. http://skylore.wordpress.com/2014/06/05/ionic-framework-inside-a-visual-studio-cordova-application-using-typescript-part-2/
  3. http://skylore.wordpress.com/2014/06/08/ionic-framework-inside-a-visual-studio-cordova-application-using-typescript-part-3/

And this is a brief:

  1. Create a TypeScript Blank Cordova App in VS 2013
  2. Get the Ionic package from NuGet, drag ‘script/ionic-bundles.js’ and ‘content/ionic.css’ to index.html to create script references
  3. Use command ‘ionic start myApp sidemenu’ to create a project scaffold
  4. Copy ‘www/templates’ folder from scaffold project to VS project, let it be the same level of existing ‘scripts’ folder
  5. Create a ‘app’ folder inside ‘scripts’ folder, move index.ts from /scripts into /scripts/app, update reference of index.js in index.html. Copy app.js and controller.js from www/js of that scaffold project to /scripts/app folder.
  6. Add or adjust references of js/ts files to index.html, create a ng-app directive.
  7. Install angularjs.TypeScript.DefinitelyTyped by right click on angular.js in scripts folder and select “Search for Typescript Typings”.
  8. Create a services.ts file in scripts/app folder, create service and inject to Angular
  9. Create a controller.ts file, register service to controller.
  10. Modify template data binding to fetch data from the service

 

For building failure of “The certificate specified has expired” on Windows platform, it’s a bug of Cordova tools. See: http://www.spritehand.com/2014/11/visual-studio-cordova-certificate.html

Install RavenDB with Nuget

在用nuget安装ravendb的时候会发生如下的错误:

Install-Package : Updating ‘System.Spatial 5.2.0’ to ‘System.Spatial 5.0.2’ failed. Unable to find a version of ‘RavenDB.Database’ that is compatible with ‘System.Spatial 5.0.2’.

 

解决的方法是用下面的命令来安装:

Install-Package RavenDB.Database -DependencyVersion Highest

Install-Package RavenDB.Embedded -DependencyVersion Highest

HTC 8X 电信版Windows Phone开启无线热点后,3G网络消失的问题

最近买了个¥1099的HTC 8X电信版Windows Phone,代替了使用了2年的Nokia 800C,准备尝试即将到来的Windows 8.1。

由于Windows Phone 8.1还没有官方推送下来,目前还是在Windows Phone 8.0系统,使用下来发现一个3g网络的bug。

症状是第一次开启wlan移动热点功能后,3G连接消失,可以打电话,但是无法上网。切换飞行模式、开关数据链接和重启手机都无法解决这个问题。

症状和这里描述的一样,使用了wlan热点功能后,3g无法连接。暂时的解决方法在这个帖子里也提到了,就是重新打开wlan移动热点,这是3G链接会恢复,说明这个bug是和wlan移动热点功能相关的。

一劳永逸的结局方法也在这个帖子里,第九楼:“使用HTC自己应用-连接设置,其中运营商选择“中国电信互联网设置CTNET”。

特地记录一下,一定有其他人也会遇到。