Running Hadoop on Windows

Windows下配置Hadoop环境 1、首先到官方下载官网的hadoop2.7.7,链接如下 https://mirrors.tuna.tsinghua.edu.cn/apache/hadoop/common/ 2、下载对应版本都是hadooponwindows-master.zip 下载网址:https://github.com/4ttty/winutils 或者找网盘的hadooponwindows-master.zip 链接如下:https://pan.baidu.com/s/1vxtBxJyu7HNmOhsdjLZkYw 提取码:y9 阅读详情

What is Hadoop?

Hadoop is a an open source Apache project written in Java and designed to provide users with two things: a distributed file system (HDFS) and a method for distributed computation. It’s based on Google’s publishedGoogle File System and MapReduce concept which discuss how to build a framework capable of executing intensive computations across tons of computers. Something that might, you know, be helpful in building a giant search index. Read theHadoop project description andwiki for more information and background on Hadoop.

What’s the big deal about running it on Windows?

Looking for Linux? If you’re looking for a comprehensive guide to getting Hadoop running on Linux, please check out Michael Noll’s excellent guides: Running Hadoop on Ubuntu Linux (Single Node Cluster) and Running Hadoop on Ubuntu Linux (Multi-Node Cluster). This post was inspired by these very informative articles.

Hadoop’s key design goal is to provide storage and computation on lots of homogenous “commodity” machines; usually a fairly beefy machine running Linux. With that goal in mind, the Hadoop team has logically focused on Linux platforms in their development and documentation. Their Quickstart even includes the caveat that “Win32 is supported as a development platform. Distributed operation has not been well tested on Win32, so this is not aproduction platform.” If you want to use Windows to run Hadoop in pseudo-distributed or distributed mode (more on these modes in a moment), you’re pretty much left on your own. Now, most people will still probably not run Hadoop in production on Windows machines, but the ability to deploy on the most widely used platform in the world is still probably a good idea for allowing Hadoop to be used by many of the developers out there that use Windows on a daily basis.

Caveat Emptor

I’m one of the few that has invested the time to setup an actual distributed Hadoop installation on Windows. I’ve used it for some successful development tests. I have not used this in production. Also, although I can get around in a Linux/Unix environment, I’m no expert so some of the advice below may not be the correct way to configure things. I’m also no security expert. If any of you out there have corrections or advice for me, please let me know in a comment and I’ll get it fixed.

This guide uses Hadoop v0.17 and assumes that you don’t have any previous Hadoop installation. I’ve also done my primary work with Hadoop on Windows XP. Where I’m aware of differences between XP and Vista, I’ve tried to note them. Please comment if something I’ve written is not appropriate for Vista.

Bottom line: your mileage may vary, but this guide should get you started running Hadoop on Windows.

A quick note on distributed Hadoop

Hadoop runs in one of three modes:

  • Standalone: All Hadoop functionality runs in one Java process. This works “out of the box” and is trivial to use on any platform, Windows included.
  • Pseudo-Distributed: Hadoop functionality all runs on the local machine but the various components will run as separate processes. This is much more like “real” Hadoop and does require some configuration as well as SSH. It does not, however, permit distributed storage or processing across multiple machines.
  • Fully Distributed: Hadoop functionality is distributed across a “cluster” of machines. Each machine participates in somewhat different (and occasionally overlapping) roles. This allows multiple machines to contribute processing power and storage to the cluster.

The Hadoop Quickstart can get you started on Standalone mode and Psuedo-Distributed (to some degree). Take a look at that if you’re not ready for Fully Distributed. This guide focuses on the Fully Distributed mode of Hadoop. After all, it’s the most interesting where you’re actually doing real distributed computing.

Pre-Requisites

Java

I’m assuming if you’re interested in running Hadoop that you’re familiar with Java programming and have Java installed on all the machines on which you want to run Hadoop. The Hadoop docs recommend Java 6 and require at least Java 5. Whichever you choose, you need to make sure that you have the same major Java version (5 or 6) installed on each machine. Also, any code you write for running using Hadoop’s MapReduce must be compiled with the version you choose. If you don’t have Java installed, go get it from Sun and install it. I will assume you’re using Java 6 in the rest of this guide.

Cygwin

As I said in the introduction, Hadoop assumes Linux (or a Unix flavor OS) is being used to run Hadoop. This assumption is buried pretty deeply. Various parts of Hadoop are executed using shell scripts that will only work on a Linux shell. It also uses passwordless secure shell (SSH) to communicate between computers in the Hadoop cluster. The best way to do these things on Windows is to make Windows act more like Linux. You can do this usingCygwin, which provides a “Linux-like environment for Windows” that allows you to use Linux-style command line utilities as well as run really useful Linux-centric software like OpenSSH. Godownload the latest version of Cygwin. Don’t install it yet. I’ll describe how you need to install it below.

Hadoop

Go download Hadoop core. I’m writing this guide for version 0.17 and I will assume that’s what you’re using.

More than one Windows PC on a LAN

It should probably go without saying that to follow this guide, you’ll need to have more than one PC. I’m going to assume you have two computers and that they’re both on your LAN. Go ahead and designate one to be the Master and one to be the Slave. These machines together will be your “cluster”. The Master will be responsible for ensuring the Slaves have work to do (such as storing data or running MapReduce jobs). The Master can also do its share of this work as well. If you have more than two PCs, you can always setup Slave2, Slave3 and so on. Some of the steps below will need to be performed on all your cluster machines, some on just Master or Slaves. I’ll note which apply for each step.

Step 1: Configure your hosts file (All machines)

This step isn’t strictly necessary but it will make your life easier down the road if your computers change IPs. It’ll also help you keep things straight in your head as you edit configuration files. Open your Windows hosts file located atc:\windows\system32\drivers\etc\hosts (the file is named “hosts” with no extension) in a text editor and add the following lines (replacing the NNNs with the IP addresses of both master and slave):

master NNN.NNN.NNN.NNN
slave NNN.NNN.NNN.NNN

Save the file.

Step 2: Install Cygwin and Configure OpenSSH sshd (All machines)

Cygwin has a bit of an odd installation process because it lets you pick and choose which libraries of useful Linux-y programs and utilities you want to install. In this case, we’re really installing Cygwin to be able to run shell scripts andOpenSSH. OpenSSH is an implementation of a secure shell (SSH) server (sshd) and client (ssh). If you’re not familiar with SSH, you can think of it as a secure version of telnet. With the ssh command, you can login to another computer running sshd and work with it from the command line. Instead of reinventing the wheel, I’m going to tell you to go here for step-by-step instructions on how to install Cygwin on Windows and get OpenSSH’s sshd server running.You can stop after instruction 6. Like the linked instructions, I’ll assume you’ve installed Cygwin to c:\cygwin though you can install it elsewhere.

If you’re running a firewall on your machine, you’ll need to make sure port 22 is open for incoming SSH connections. As always with firewalls, open your machine up as little as possible. If you’re using Windows firewall, make sure the open port is scoped to your LAN. Microsoft has documentation for how to do all this with Windows Firewall (scroll down to the section titled “Configure Exceptions for Ports”).

Step 3: Configure SSH (All Machines)

Hadoop uses SSH to allow the master computer(s) in a cluster to start and stop processes on the slave computers. One of the nice things about SSH is it supports several modes of secure authentication: you can use passwords or you can use public/private keys to connect without passwords (“passwordless”). Hadoop requires that you setup SSH to do the latter. I’m not going to go into great detail on how this all works, but suffice it to say that you’re going to do the following:

  1. Generate a public-private key pair for your user on each cluster machine.
  2. Exchange each machine user’s public key with each other machine user in the cluster.
Generate public/private key pairs

To generate a key pair, open Cygwin and issue the following commands ($> is the command prompt):
$> ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
$> cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

Now, you should be able to SSH into your local machine using the following command:
$> ssh localhost

When prompted for your password, enter it. You’ll see something like the following in your Cygwin terminal.

hayes@localhost's password:
Last login: Sun Jun 8 19:47:14 2008 from localhost

hayes@calculon ~
$>

To quit the SSH session and go back to your regular terminal, use:
$> exit

Make sure to do this on all computers in your cluster.

Exchange public keys

Now that you have public and private key pairs on each machine in your cluster, you need to share your public keys around to permit passwordless login from one machine to the other. Once a machine has a public key, it can safely authenticate a request from a remote machine that is encrypted using the private key that matches that public key.

On the master issue the following command in cygwin (where “<slaveusername>” is the username you use to login to Windows on the slave computer):

$> scp ~/.ssh/id_dsa.pub <slaveusername>@slave:~/.ssh/master-key.pub

Enter your password when prompted. This will copy your public key file in use on the master to the slave.

On the slave, issue the following command in cygwin:

$> cat ~/.ssh/master-key.pub >> ~/.ssh/authorized_keys

This will append your public key to the set of authorized keys the slave accepts for authentication purposes.

Back on the master, test this out by issuing the following command in cygwin:

$> ssh <slaveusername>@slave

If all is well, you should be logged into the slave computer with no password required.

Repeat this process in reverse, copying the slave’s public key to the master. Also, make sure to exchange public keys between the master and any other slaves that may be in your cluster.

Configure SSH to use default usernames (optional)

If all of your cluster machines are using the same username, you can safely skip this step. If not, read on.

Most Hadoop tutorials suggest that you setup a user specific to Hadoop. If you want to do that, you certainly can. Why setup a specific user for Hadoop? Well, in addition to being more secure from a file permissions and security perspective, when Hadoop uses SSH to issue commands from one machine to another it will automatically try to login to the remote machine using the same user as the current machine. If you have different users on different machines, the SSH login performed by Hadoop will fail. However, most of us on Windows typically use our machines with a single user and would probably prefer not to have to setup a new user on each machine just for Hadoop.

The way to allow Hadoop to work with multiple users is by configuring SSH to automatically select the appropriate user when Hadoop issues its SSH command. (You’ll also need to edit the hadoop-env.sh config file, but that comes later in this guide.) You can do this by editing the file named “config” (no extension) located in the same “.ssh” directory where you stored your public and private keys for authentication. Cygwin stores this directory under “c:\cygwin\home\<windowsusername>\.ssh”.

On the master, create a file called config and add the following lines (replacing “<slaveusername>” with the username you’re using on the Slave machine:

Host slave
User <slaveusername>

If you have more slaves in your cluster, add Host and User lines for those as well.

On each slave, create a file called config and add the following lines (replacing “<masterusername>” with the username you’re using on the Master machine:

Host master
User <masterusername>

Now test this out. On the master, go to cygwin and issue the following command:

$> ssh slave

You should be automatically logged into the slave machine with no username and no password required. Make sure to exit out of your ssh session.

For more information on this configuration file’s format and what it does, go here or run man ssh_config in cygwin.

Step 4: Extract Hadoop (All Machines)

If you haven’t downloaded Hadoop 0.17, go do that now. The file will have a “.tar.gz” extension which is not natively understood by Windows. You’ll need something like WinRAR to extract it. (If anyone knows something easier than WinRAR for extracting tarred-gzipped files on Windows, please leave a comment.)

Once you’ve got an extraction utility, extract it directly into c:\cygwin\usr\local. (Assuming you installed Cygwin to c:\cygwin as described above.)

The extracted folder will be named hadoop-0.17.0. Rename it to hadoop. All further steps assume you’re in this hadoop directory and will use relative paths for configuration files and shell scripts.

Step 5: Configure hadoop-env.sh (All Machines)

The conf/hadoop-env.sh file is a shell script that sets up various environment variables that Hadoop needs to run. Open conf/hadoop-env.sh in a text editor. Look for the line that starts with “#export JAVA_HOME”. Change that line to something like the following:

export JAVA_HOME=c:\\Program\ Files\\Java\\jdk1.6.0_06

This should be the home directory of your Java installation. Note that you need to remove the leading “#” (comment) symbol and that you need to escape both backslashes and spaces with a backslash.

Next, locate the line that starts with “#export HADOOP_IDENT_STRING”. Change it to something like the following:

export HADOOP_IDENT_STRING=MYHADOOP

Where MYHADOOP can be anything you want to identify your Hadoop cluster with. Just make sure each machine in your cluster uses the same value.

To test these changes issue the following commands in cygwin:

$> cd /usr/local/hadoop
$> bin/hadoop version

You should see output similar to this:

Hadoop 0.17.0
Subversion http://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.17 -r 656523
Compiled by hadoopqa on Thu May 15 07:22:55 UTC 2008

If you see output like this:

bin/hadoop: line 166: c:\Program Files\Java\jdk1.6.0_05/bin/java: No such file or directory
bin/hadoop: line 251: c:\Program Files\Java\jdk1.6.0_05/bin/java: No such file or directory
bin/hadoop: line 251: exec: c:\Program Files\Java\jdk1.6.0_05/bin/java: cannot execute: No such file or directory

This means that your Java home directory is wrong. Go back and make sure you specified the correct directory and used the appropriate escaping.

Step 6: Configure hadoop-site.xml (All Machines)

The conf/hadoop-site.xml file is basically a properties file that lets you configure all sorts of HDFS and MapReduce parameters on a per-machine basis. I’m not going to go into detail here about what each property does, but there are 3 that you need to configure on all machines: fs.default.name, mapred.job.tracker anddfs.replication. You can just copy the XML below into your conf/hadoop-site.xml file.

<?xml version=”1.0″?>
<?xml-stylesheet type=”text/xsl” href=”configuration.xsl”?>
<!– Put site-specific property overrides in this file. –>
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://master:47110</value>
</property>
<property>
<name>mapred.job.tracker</name>
<value>master:47111</value>
</property>
<property>
<name>dfs.replication</name>
<value>2</value>
</property>
</configuration>

For more information about what these configuration properties (and others) do, see theHadoop cluster setup docs and thehadoop-default.xml documentation.

Step 7: Configure slaves file (Master only)

The conf/slaves file tells the master where it can find slaves to do work. Open yours in a text editor. It will probably have one line which says “localhost”. Replace that with the following:

master
slave

Step 8: Firewall Configuration (All Machines)

If you’re using Windows Firewall, you will need to ensure that the appropriate ports are open so that the slaves can make HTTP requests for information from the master. (This is different from the port 22 needed for SSH.) The list of ports for which you should make exceptions are as follows: 47110, 47111, 50010, 50030, 50060, 50070, 50075, 50090. These should all be openon the master for request coming from your local network. For more information about these ports, see theHadoop default configuration file documentation.

You should also make sure that Java applications are allowed by the firewall to connect to the network on all your machines including the slaves.

Step 9: Starting your cluster (Master Only)

To start your cluster, make sure you’re in cygwin on the master and have changed to your hadoop installation directory. To fully start your cluster, you’ll need to start DFS first and then MapReduce.

Starting DFS

Issue the following command:

$> bin/start-dfs.sh

You should see output somewhat like the following (note that I have 2 slaves in my cluster which has a cluster ID of Appozite, your mileage will vary somewhat):

starting namenode, logging to /usr/local/hadoop/bin/../logs/hadoop-Appozite-namenode-calculon.out
master: starting datanode, logging to /usr/local/hadoop/bin/../logs/hadoop-Appozite-datanode-calculon.out
slave: starting datanode, logging to /usr/local/hadoop/bin/../logs/hadoop-Appozite-datanode-hayes-daviss-macbo
ok-pro.local.out
slave2: starting datanode, logging to /usr/local/hadoop/bin/../logs/hadoop-Appozite-datanode-XTRAPUFFYJR.out
master: starting secondarynamenode, logging to /usr/local/hadoop/bin/../logs/hadoop-Appozite-secondarynamenode
-calculon.out

To see if your distributed file system is actually running across multiple machines, you can open the Hadoop DFS web interface which will be running on your master on port 50070. You can probably open it by clicking this link:http://localhost:50070. Below is a screenshot of my cluster. As you can see, there are 3 nodes with a total of 712.27 GB of space. (Click the image to see the larger version.)

Starting MapReduce

To start the MapReduce part of Hadoop, issue the following command:

$> bin/start-mapred.sh

You should see output similar to the following (again noting that I’ve got 3 nodes in my cluster):

starting jobtracker, logging to /usr/local/hadoop/bin/../logs/hadoop-Appozite-jobtracker-calculon.out
master: starting tasktracker, logging to /usr/local/hadoop/bin/../logs/hadoop-Appozite-tasktracker-calculon.ou
t
slave: starting tasktracker, logging to /usr/local/hadoop/bin/../logs/hadoop-Appozite-tasktracker-hayes-daviss
-macbook-pro.local.out
slave2: starting tasktracker, logging to /usr/local/hadoop/bin/../logs/hadoop-Appozite-tasktracker-XTRAPUFFYJR
.out

You can view your MapReduce setup using the MapReduce monitoring web app that comes with Hadoop which runs on port 50030 of your master node. You can probably open it by clicking this like:http://localhost:50030. Below is a screenshot from my browser. There’s not much exciting to see here until you have an actual MapReduce job running.

Testing it out

Now that you’ve got your Hadoop cluster up and running, executing MapReduce jobs or writing to and reading from DFS are no different on Windows than any other platform so long as you use cygwin to execute commands. At this point, I’ll refer you to Michael Noll’s Hadoop on Ubuntu Linux tutorial for an explanation on how to run a large enough MapReduce job to take advantage of your cluster. (Note that he’s using Hadoop 0.16.0 instead of 0.17.0, so you’ll replace “0.16.0″ with “0.17.0″ where applicable.) Follow his instructions and you should be good to go. The Hadoop site also offers a MapReduce tutorial to you can get started writing your own jobs in Java. If you’re interested in writing MapReduce jobs in other languages that take advantage of Hadoop, check out theHadoop Streaming documentation.

How to stop your cluster

When you’re ready to stop your cluster, it’s simple. Just top MapReduce and then DFS.

To stop MapReduce, issue the following command on the master:

$>bin/stop-mapred.sh

You should see output similar to the following:

stopping jobtracker
slave: stopping tasktracker
master: stopping tasktracker
slave2: stopping tasktracker

To stop DFS, issue the following command on the master:

$> bin/stop-dfs.sh

You should see output similar to the following:

stopping namenode
master: stopping datanode
slave: stopping datanode
slave2: stopping datanode
master: stopping secondarynamenode

And that’s it

I hope this helps anyone out there trying to run Hadoop on Windows. If any of you have corrections, questions or suggestions please comment and let me know. Happy Hadooping!

原文链接:http://hayesdavis.net/2008/06/14/running-hadoop-on-windows/

                 (上链接由此链接引出:https://cwiki.apache.org/confluence/display/MAHOUT/BuildingMahout)

Windows平台Hadoop安装指南 Hadoop是一个由Apache基金会开发的开源分布式存储和计算框架,它被广泛地应用于大数据的存储和处理中。Hadoop的主要特点包括可扩展性强、成本低廉、容错性好、易于扩展。它使得开发者能够轻松地处理大量的非结构化数据,这对于大数据处理具有重要意义。Hadoop命令行工具的使用首先需要掌握其基本命令。这里列举了一些常用的基本命令及其简单示例。hadoop fs:这是一个非常重要的命令集,用于操作Hadoop分布式文件系统(HDFS)。示例:列出HDFS根目录下的所有文件和目录。 阅读详情

相关推荐

hadooponwindows.zip

将压缩文件bin目录下的所有文件复制到你的windows中的%HADOOP_HOME%\bin目录,不要移动%HADOOP_HOME%\bin原有文件

在Windows下安装Hadoop遇到的几个问题

Hdoop的荐部署环境是linux,但是我们想要在windows体验一下还是可以的,尤其是对我这样不是经常使用Linux系统的人。Windows下安装配置Hadoop的教程还是挺多的,这里可以下载。    下面我说说安装配置过程中遇到的一些问题吧,给自己以后提供借鉴。    我的操作系统是Windows 7,使用的Cygwin版本是1.7.7-1,hadoop版本是0.20.2。 

RukeyLee's Tech Blog 3027

Unity游戏Google Play闪退?可能是这个隐藏设置惹的祸(附完整解决方案)

本文深度解析Unity游戏在Google Play上出现闪退的疑难问题,指出其根源可能在于Google Play后台的“应用完整性”设置与游戏原生库的冲突。文章提供了从崩溃日志分析、本地与线上版本对比测试,到调整Unity构建设置、审查第三方插件以及优化分发包配置的系统性排查与根治方案,帮助开发者彻底解决这一隐蔽问题。

weixin_29213827的博客 235

【Hadoop】Windows下安装Hadoop(手把手包成功安装)

【实操】Windows下安装Hadoop(手把手包成功安装)

tttzzzqqq2018的博客 5万+

USB通讯速度翻倍秘诀:手把手教你用WinUsb替代HID协议(附Zadig驱动配置图解)

本文详细介绍了如何通过WinUsb技术替代传统HID协议,实现USB通讯速度的显著提升。从技术对比、实现原理到Zadig驱动配置图解,手把手教你完成免驱高速通讯方案,适用于数据采集、固件升级等场景,实测速度可达HID协议的2倍以上。

weixin_29168675的博客 135

直流耦合系统介绍

参考《SMA如何使用直流耦合技术实现更高效的光伏电站-白皮书》

圆桌骑士的博客 732

windows平台下安装配置Hadoop

安装配置流程 1.下载Hadoop软件:http://archive.apache.org/dist/hadoop/core/ 此处下载版本hadoop-2.7.7,解压至目录(D:jobhadoophadoop-2.7.7) 注:如果后续要安装Spark,那么最好安装和Spark版本对应的Hadoop版本 查看hadoop/spark对应版本:http://spark.apache.org/downloads.html 2.下载其他相关文件(编译后的二进制文件):https://github.com/

m0_67401746的博客 2176

MIMO技术入门

MIMO:多天线技术,发射端和接收端有多个天线(注意:并不是指多个天线板,而是多套振子,每一套是一个独立的天线。) 4G:2、8天线 5G:4、64天线(64T64R) 手机也是多天线 MIMO实现效果的分类: 1)空间分集 。2)空间复用。3)波束赋形。 空间分集(space diversity) 作用:提升接收质量 利用多个天线发射或者接收一个数据流,避免单个信道衰落对整个链路的影响。(比如你的耳机坏了一只并不影响另一只) 空间复用(space multiplexing) 作用:提升速率 利

About1129的博客 2876

Windows下hadoop环境搭建之NameNode启动报错

前言: 因为平时工作和日常接触到的大都是的中型项目,所以少有个性化推荐等涉及大数据的功能。但是后期应该也会在自己项目中添加信息推荐模块,所以就开始关注spark,hadoop,Thrift等工具,以下就以hadoop先开始,包括环境搭建和配置过程中踩坑过程。 关于hadoop的环境搭建,网上也有各种各样的教程。拿来直接按着他们的方法来,前期当前问题不大,但是呢,可能在安装过程中由于每个工具的版本不一致。又或者配置中文件路径不一样等等都很可能导致踩坑无数。不管是开发调测bu...

北桥苏的博客 6861

实战游戏项目管理1-规划篇

1、前言 做研发管理10多年,进游戏行业8年,经验下来项目管理就是一门技术,结合不同行业不同项目加以不同管理方法,但原理基本一样,这里总结下游戏项目的管理一些实操方法 一般游戏确定立项前都需要做,项目预研产出一个游戏Demo,通过公司的立项评审,这个过程的项目管理相对简单一般由制作人或其他项目经理兼任,只有控制好总体时间与成本就好,这里按立项后开始讲。 2、游戏项目规划 ...

pengdali的专栏 2万+

微博scheme

微博scheme

qq_42278595的博客 319

hadoop本地化windows部署

· hadoop on windows · hive on windows · spark on windows(提交方式是spark on yarn)

super_chenzhou 3011

rk3399开发环境的介绍

由于Bluez的介绍文档有限,以及对Linux 系统/驱动概念、D-Bus 通信和蓝牙协议都有要求,加上网络上其实没有一个完整的介绍Bluez系列的文档,所以不管是蓝牙初学者还是蓝牙从业人员,都有不小的难度,学习曲线也相对较陡,所以我有了这个想法,专门对Bluez做一个系统性的介绍,尽可能的涵盖所有内容。

朝气蓬勃 711

白手起家:一步一步安装 hadoop on windows

本文的内容仅仅是在windows 的单机环境下安装hadoop,目的自然是对hadoop可以有一个感性的接触和了解。所以正是因为需要阅读此文的肯定是hadoop门外汉,而且一步一步越细致的越好,不要让复杂和挫败感一下子就把你当在门外。真正把hadoop 在多机器的环境下配置起来需要更多的学习,就不是本文的职责了。一:先准备需要下载的东东:1:Java Runtime (JRE)1.6 以上,下载最

每天吃早饭 863

一套适合 ABAP 初级和中级开发人员,从入门到提高的 ABAP 学习教程

曾几何时,ABAP 就是 SAP 的代名词。ABAP 这门编程语言造就了 SAP 名噪一时的 R/3 产品,同时也是如今 SAP 旗舰级产品,SAP S/4HANA 底层的实现语言。 ABAP 不仅代表着 SAP 这家公司在企业级管理软件市场辉煌的过去,ABAP 自身也在不断地进化着。SAP 不仅在本地部署(On-Premise)领域继续保持着自己绝对的统治地位,而且在云应用领域(Software-as-a-Service, 简称 SaaS), 也推出了自己的解决方案,比如 SAP S/4HANA Clo

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 5927

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Hadoop on Windows

Softwares: Windows 8 Pro 64-bit Cygwin 1.7.17-1 (1.7.18, using "cygcheck -c cygwin") JDK 1.7.0_15 64-bit Hadoop 1.1.1 (1.0.4, bin/hadoop version) 0. Prerequisites A. Installing C

MADNESS 1410

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

hadoop集群搭建-Windows (hadoop cluster on Windows)

Hortonwork公司推出了能在 windows平台上运行的大数据处理平台:HDP for Windows ,可以使得hadoop集群运行在 windows(windows server 2008 R2, windows server 2012)上。 本文使用HDP 1.1 for Windows和Windows server 2008R2来搭建hadoop集群。 所需软硬件环境:  1

tonyhuang_google_com的专栏 7844

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

Development hadoop program on Windows

This post is about the development of hadoop program on windows. The detail configuration describes as follows: Step 1: copy the hadoop plugin to the eclipse's plugin directory. Step 2:restart the e

hero_hegang的专栏 1432

How to Install Hadoop on Windows

Introduction There are multiple ways you can install Hadoop on Windows but most of them require installing a virtual machine or using docker cont...

chuzhenjia9849的博客 507

hadoop on windows with eclipse

hadoop on windows with eclipse

warhorse668的专栏 3650

Hadoop以及spark安装on windows

厦大Hadoop安装(Linux):http://dblab.xmu.edu.cn/blog/install-hadoop/ Java安装路径不能包含空格!!! JAVA配置环境变量 使用Windows的软连接: 在Windows的命令终端(cmd)中,使用命令: 创建软连接: mklink /J C:\myJava “C:\Program Files\Java\jdk1.8.0_221” ...

arlison的博客 266

在windows环境下安装hadoop

Hadoop是一个分布式系统基础架构。用户可以在不了解分布式底层细节的情况下,开发分布式程序。但这个架构是基于java语言开发的,所以要先进行jdk的安装,如果电脑已经配置过jdk或者是曾经运行成功过java文件,那就可以跳过第一步。

m0_51547272的博客 2405

在Windows下安装Hadoop

在Windows下安装Hadoop IT, 技术与技巧 http://blog.openlg.net/index.php/archives/776

Nazarite_wen的专栏 4万+

Windows本地部署Hadoop

本文主要详细介绍到如何在Windows环境下部署Hadoop(不涉及具体Hadoop配置文件修改)以便为了后续本地开发以及测试运行HDFS-API代码和MR-API代码准备

qq_41072814的博客 1485

Hadoop on Windows With Eclipse(伪分布式)

1介绍 Hadoop是一个强大的架构,用于自动并行化的计算任务。不幸的是某些编程对于它是个挑战。Hadoop程序让人难以理解和调试。有一种方法可以在开发人员的机器上本地运行一个简化版的Hadoop集群使之更容易一些。本教程描述如何设置这样一个集群运Windows平台上。它还描述了如何使用Eclipse集成这个集群,一个主要的Java开发环境。 2.安装前的准备 在我们开始之前,要确保以下组件

小e笔记 4128
上一篇: 基于Apache Mahout构建社会化推荐引擎
下一篇: HTTP协议详解
weilanxing
博客等级 码龄18年 1粉丝 8原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值