zhuliuw 2014-04-30T01:57:22-07:00 kuangyex@gmail.com Class Loader 2014-04-30T00:00:00-07:00 zhuliuw http://zhuliuw.github.com/2014/04/30/class-loader 关于Jvm Class Loader的一些知识:

1. 什么是CLassLoader?

Java程序并不是一个原生的可执行文件,而是由许多独立的类文件组成,每一个文件对应一个Java类.此外,这些类文件并非立即全部装入内存的,而是根据程序需要装入内存。ClassLoader专门负责类文件装入到内存.

2. ClassLoader的体系架构

从上图我们就可以看出类加载器之间的父子关系(注意不是类的集继承关系)和管辖范围。

(1)BootStrap 是最顶层的类加载器,它是由C++编写而成,并且已经内嵌到JVM中了,主要用来读取Java的核心类库JRE/lib/rt.jar

(2)Extension ClassLoader是是用来读取Java的扩展类库,读取JRE/lib/ext/*.jar

(3)App ClassLoader是用来读取CLASSPATH指定的所有jar包或目录的类文件

(4)Custom ClassLoader是用户自定义编写的,它用来读取指定类文件

3.什么是双亲委派模型?

双亲委派的模型可以通过下面的过程体现出来: (1)"A类加载器"加载类时,先判断该类是否已经加载过了, (2)如果还未被加载,则首先委托其"A类加载器"的"父类加载器"去加载该类,这是一个向上不断搜索的过程,当A类所有的"祖宗类加载器"(包括了bootstrap classloader)都没有加载到类,则回到发起者"A类加载器"去加载,如果还加载不了,则抛出ClassNotFoundException.

]]>
Cloudera Manager Free Edition Installation Guide 2014-04-22T00:00:00-07:00 zhuliuw http://zhuliuw.github.com/2014/04/22/cloudera-manager-free-edition-installation-guide Install Ubuntu Server Operation System (64bit)

Download installation image Ubuntu-server 12.04 from Ubuntu Web Site.
• Perform installation as per below steps.

1.  Select “Install Ubuntu Server” to start installation

2. Select language, e.g. English

3.Select location, e.g. United States

   4.Configure the keyboard, press <NO> to skip keyboard layout detecting and select keyboard layout from a list

  5.Select a country for the keyboard, e.g. English (US)

 6. Select the matched keyboard layout for this machine, e.g. English (US)

 7.Then configure the network, enter the hostname for this system.

 8.Create a new user account, enter full name of this new user and his/her username and password.

 9.Select time zone, e.g. Shanghai

 10.Partition disks, select “Guided – use entire disk”

 11.Press <Yes> to complete current partitioning.

 12.Start installing the base system.

 13.HTTP proxy setup.

14.Then start configuring apt and preparing software installation.

15.Set up how to manage upgrades on this system, e.g. No automatic updates

16.Choose software to install, please note the OpenSSH server is required to be installed.

17.Start software installation.

18.Press <Yes> to install the GRUB boot loader to the master boot record.

 19.Press <Continue> to exit installation and boot into the new system

 20.You are now boot into the Ubuntu system.

- Set up Internet Access

Set up IP address

There are two ways to gain IP address, either dynamically allocated or manually specified.

a)  DHCP setting (IP address dynamically allocated) 

The network configuration file is located at /etc/network/interfaces.

 b) Specify a static IP address by modifying the network configuration, e.g. # sudo vi /etc/network/interfaces

 •    Restart network

a) Disable network connections by the command “ifconfig eth0 down” b) Enable network connections by the command “ifconfig eth0 up”

 •    Set up DNS

Add nameserver to the DNS configuration file /etc/resolvconf/resolv.conf.d/base.

sudo vi /etc/resolvconf/resolv.conf.d/base

Install Oracle JDK (64bit)

• Download installation package jdk-6u31-linux-x64.bin from the Oracle Web Site.

• Make this package executable by the command “chmod 744 jdk-6u31-linux-x64.bin”

• Run jdk-6u31-linux-x64.bin to complete JDK installation, e.g. # sudo ./ jdk-6u31-linux-x64.bin

• Configure JDK Environment variables

Note: the recommended JDK version is 1.6.0_31, and the minimum supported version is 1.6.0_8

Install Cloudera Manager Installer

• Download the installer cloudera-manager-installer.bin from the Cloudera Downloads page.

• Make the software executable by the command “chmod 744 cloudera-manager-installer.bin”

• Perform installation as per below steps.

a)  Run cloudera-manager-installer.bin to start installation, select <next> to next step.

 b) Select <Yes> to accept the license and then start installing.

The installation of Cloudera Manager Installer is in progress

c)  After the installation is completed, you can access to Cloudera Manager Admin Console, the default port number of admin console is 7180.

Install Cloudera Manager and Set up CDH Cluster

• Perform below steps to complete the installation and configuration.

a)  Login to Cloudera Manager admin console, the default user name and password are admin.

 b) Click the “just install the latest Free Edition” button to install Cloudera Manager Free Edition.

c)  Click the “Continue” button.

d)  Input the IP addresses and separated by comma, Click the “Search” button to find out the specified hosts for the CDH cluster installation.

e)  Then install the CDH on selected hosts. 

f)  Select the version of CDH, e.g. CDH4, then go to next step.

g)  Provide SSH login credentials and start installation.

The installation is in progress.

Note: If the installation is failed on some of the hosts, click the “Retry” to re-install CDH on a selected failed host, or click the “Retry Failed Hosts” to re-install CDH on all failed hosts.

h)  Installation completed successfully, click the “Continue” button to complete the rest of steps. 

the installation is now done.

]]>
hello world 2014-04-21T00:00:00-07:00 zhuliuw http://zhuliuw.github.com/2014/04/21/hello-world hello,world, I am coming! This is just a test, I just want to verify that if it can work normally!

]]>