一、简介

为了开发调试方便,本文介绍在Eclipse下搭建开发环境,连接和提交任务到Hadoop集群。

二、安装前准备:

1)Eclipse:Luna 4.4.1

2)eclipse插件:hadoop-eclipse-plugin-2.5.2.jar

3)hadoop版本:hadoop-2.5.2.tar.gz

三、环境搭建

1.安装eclipse

2.安装插件

将插件hadoop-eclipse-plugin-2.5.2.jar,下载后放到eclipse/plugins目录即可

3.配置hadoop主目录

解压缩hadoop-2.5.2.tar.gz到D:\Tools\hadoop\hadoop-2.6.0,在eclipse的Windows->Preferences的Hadoop Map/Reduce中设置安装目录。

4.配置插件

打开Windows->Open Perspective中的Map/Reduce,在此perspective下进行hadoop程序开发。

   

打开Windows->Show View中的Map/Reduce Locations,如下图右键选择New Hadoop location…新建hadoop连接。

确认完成以后如下,eclipse会连接hadoop集群。

如果连接成功,在project explorer的DFS Locations下会展现hdfs集群中的文件。

如果连接失败,先去将linux下的hadoop集群启动起来,再重新连接即可!

四、开发调试

1 程序开发

开发一个Sort示例,对输入整数进行排序。输入文件格式是每行一个整数。

 
 1 package com.ccb;
2
3 /**
4 * Created by hp on 2015-7-20.
5 */
6
7 import java.io.IOException;
8
9 import org.apache.hadoop.conf.Configuration;
10 import org.apache.hadoop.fs.FileSystem;
11 import org.apache.hadoop.fs.Path;
12 import org.apache.hadoop.io.IntWritable;
13 import org.apache.hadoop.io.Text;
14 import org.apache.hadoop.mapreduce.Job;
15 import org.apache.hadoop.mapreduce.Mapper;
16 import org.apache.hadoop.mapreduce.Reducer;
17 import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
18 import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
19
20 public class Sort {
21
22 // 每行记录是一个整数。将Text文本转换为IntWritable类型,作为map的key
23 public static class Map extends Mapper<Object, Text, IntWritable, IntWritable> {
24 private static IntWritable data = new IntWritable();
25
26 // 实现map函数
27 public void map(Object key, Text value, Context context) throws IOException, InterruptedException {
28 String line = value.toString();
29 data.set(Integer.parseInt(line));
30 context.write(data, new IntWritable(1));
31 }
32 }
33
34 // reduce之前hadoop框架会进行shuffle和排序,因此直接输出key即可。
35 public static class Reduce extends Reducer<IntWritable, IntWritable, IntWritable, Text> {
36
37 //实现reduce函数
38 public void reduce(IntWritable key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
39 for (IntWritable v : values) {
40 context.write(key, new Text(""));
41 }
42 }
43 }
44
45 public static void main(String[] args) throws Exception {
46 Configuration conf = new Configuration();
47
48 // 指定JobTracker地址
49 conf.set("mapred.job.tracker", "192.168.62.129:9001");
50 if (args.length != 2) {
51 System.err.println("Usage: Data Sort <in> <out>");
52 System.exit(2);
53 }
54 System.out.println(args[0]);
55 System.out.println(args[1]);
56
57 Job job = Job.getInstance(conf, "Data Sort");
58 job.setJarByClass(Sort.class);
59
60 //设置Map和Reduce处理类
61 job.setMapperClass(Map.class);
62 job.setReducerClass(Reduce.class);
63
64 //设置输出类型
65 job.setOutputKeyClass(IntWritable.class);
66 job.setOutputValueClass(IntWritable.class);
67
68 //设置输入和输出目录
69 FileInputFormat.addInputPath(job, new Path(args[0]));
70 FileOutputFormat.setOutputPath(job, new Path(args[1]));
71 System.exit(job.waitForCompletion(true) ? 0 : 1);
72 }
73 }

2 配置文件

把log4j.properties和hadoop集群中的core-site.xml加入到classpath中。我的示例工程是maven组织,因此放到src/main/resources目录。

程序执行时会从core-site.xml中获取hdfs地址。

3 程序执行

右键选择Run As -> Run Configurations…,在参数中填好输入输出目录,执行Run即可。

执行日志:

  1 hdfs://192.168.62.129:9000/user/vm/sort_in
2 hdfs://192.168.62.129:9000/user/vm/sort_out
3 15/07/27 16:21:36 INFO Configuration.deprecation: session.id is deprecated. Instead, use dfs.metrics.session-id
4 15/07/27 16:21:36 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
5 15/07/27 16:21:36 WARN mapreduce.JobSubmitter: Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.
6 15/07/27 16:21:36 WARN mapreduce.JobSubmitter: No job jar file set. User classes may not be found. See Job or Job#setJar(String).
7 15/07/27 16:21:36 INFO input.FileInputFormat: Total input paths to process : 3
8 15/07/27 16:21:36 INFO mapreduce.JobSubmitter: number of splits:3
9 15/07/27 16:21:36 INFO Configuration.deprecation: mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
10 15/07/27 16:21:37 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_local1592166400_0001
11 15/07/27 16:21:37 INFO mapreduce.Job: The url to track the job: http://localhost:8080/
12 15/07/27 16:21:37 INFO mapreduce.Job: Running job: job_local1592166400_0001
13 15/07/27 16:21:37 INFO mapred.LocalJobRunner: OutputCommitter set in config null
14 15/07/27 16:21:37 INFO mapred.LocalJobRunner: OutputCommitter is org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter
15 15/07/27 16:21:37 INFO mapred.LocalJobRunner: Waiting for map tasks
16 15/07/27 16:21:37 INFO mapred.LocalJobRunner: Starting task: attempt_local1592166400_0001_m_000000_0
17 15/07/27 16:21:37 INFO util.ProcfsBasedProcessTree: ProcfsBasedProcessTree currently is supported only on Linux.
18 15/07/27 16:21:37 INFO mapred.Task: Using ResourceCalculatorProcessTree : org.apache.hadoop.yarn.util.WindowsBasedProcessTree@4c90dbc4
19 15/07/27 16:21:37 INFO mapred.MapTask: Processing split: hdfs://192.168.62.129:9000/user/vm/sort_in/file1:0+25
20 15/07/27 16:21:37 INFO mapred.MapTask: (EQUATOR) 0 kvi 26214396(104857584)
21 15/07/27 16:21:37 INFO mapred.MapTask: mapreduce.task.io.sort.mb: 100
22 15/07/27 16:21:37 INFO mapred.MapTask: soft limit at 83886080
23 15/07/27 16:21:37 INFO mapred.MapTask: bufstart = 0; bufvoid = 104857600
24 15/07/27 16:21:37 INFO mapred.MapTask: kvstart = 26214396; length = 6553600
25 15/07/27 16:21:37 INFO mapred.MapTask: Map output collector class = org.apache.hadoop.mapred.MapTask$MapOutputBuffer
26 15/07/27 16:21:38 INFO mapred.LocalJobRunner:
27 15/07/27 16:21:38 INFO mapred.MapTask: Starting flush of map output
28 15/07/27 16:21:38 INFO mapred.MapTask: Spilling map output
29 15/07/27 16:21:38 INFO mapred.MapTask: bufstart = 0; bufend = 56; bufvoid = 104857600
30 15/07/27 16:21:38 INFO mapred.MapTask: kvstart = 26214396(104857584); kvend = 26214372(104857488); length = 25/6553600
31 15/07/27 16:21:38 INFO mapred.MapTask: Finished spill 0
32 15/07/27 16:21:38 INFO mapred.Task: Task:attempt_local1592166400_0001_m_000000_0 is done. And is in the process of committing
33 15/07/27 16:21:38 INFO mapred.LocalJobRunner: map
34 15/07/27 16:21:38 INFO mapred.Task: Task 'attempt_local1592166400_0001_m_000000_0' done.
35 15/07/27 16:21:38 INFO mapred.LocalJobRunner: Finishing task: attempt_local1592166400_0001_m_000000_0
36 15/07/27 16:21:38 INFO mapred.LocalJobRunner: Starting task: attempt_local1592166400_0001_m_000001_0
37 15/07/27 16:21:38 INFO util.ProcfsBasedProcessTree: ProcfsBasedProcessTree currently is supported only on Linux.
38 15/07/27 16:21:38 INFO mapred.Task: Using ResourceCalculatorProcessTree : org.apache.hadoop.yarn.util.WindowsBasedProcessTree@69e4d7d
39 15/07/27 16:21:38 INFO mapred.MapTask: Processing split: hdfs://192.168.62.129:9000/user/vm/sort_in/file2:0+15
40 15/07/27 16:21:38 INFO mapred.MapTask: (EQUATOR) 0 kvi 26214396(104857584)
41 15/07/27 16:21:38 INFO mapred.MapTask: mapreduce.task.io.sort.mb: 100
42 15/07/27 16:21:38 INFO mapred.MapTask: soft limit at 83886080
43 15/07/27 16:21:38 INFO mapred.MapTask: bufstart = 0; bufvoid = 104857600
44 15/07/27 16:21:38 INFO mapred.MapTask: kvstart = 26214396; length = 6553600
45 15/07/27 16:21:38 INFO mapred.MapTask: Map output collector class = org.apache.hadoop.mapred.MapTask$MapOutputBuffer
46 15/07/27 16:21:38 INFO mapred.LocalJobRunner:
47 15/07/27 16:21:38 INFO mapred.MapTask: Starting flush of map output
48 15/07/27 16:21:38 INFO mapred.MapTask: Spilling map output
49 15/07/27 16:21:38 INFO mapred.MapTask: bufstart = 0; bufend = 32; bufvoid = 104857600
50 15/07/27 16:21:38 INFO mapred.MapTask: kvstart = 26214396(104857584); kvend = 26214384(104857536); length = 13/6553600
51 15/07/27 16:21:38 INFO mapred.MapTask: Finished spill 0
52 15/07/27 16:21:38 INFO mapred.Task: Task:attempt_local1592166400_0001_m_000001_0 is done. And is in the process of committing
53 15/07/27 16:21:38 INFO mapred.LocalJobRunner: map
54 15/07/27 16:21:38 INFO mapred.Task: Task 'attempt_local1592166400_0001_m_000001_0' done.
55 15/07/27 16:21:38 INFO mapred.LocalJobRunner: Finishing task: attempt_local1592166400_0001_m_000001_0
56 15/07/27 16:21:38 INFO mapred.LocalJobRunner: Starting task: attempt_local1592166400_0001_m_000002_0
57 15/07/27 16:21:38 INFO mapreduce.Job: Job job_local1592166400_0001 running in uber mode : false
58 15/07/27 16:21:38 INFO util.ProcfsBasedProcessTree: ProcfsBasedProcessTree currently is supported only on Linux.
59 15/07/27 16:21:38 INFO mapreduce.Job: map 100% reduce 0%
60 15/07/27 16:21:38 INFO mapred.Task: Using ResourceCalculatorProcessTree : org.apache.hadoop.yarn.util.WindowsBasedProcessTree@4e931efa
61 15/07/27 16:21:38 INFO mapred.MapTask: Processing split: hdfs://192.168.62.129:9000/user/vm/sort_in/file3:0+8
62 15/07/27 16:21:39 INFO mapred.MapTask: (EQUATOR) 0 kvi 26214396(104857584)
63 15/07/27 16:21:39 INFO mapred.MapTask: mapreduce.task.io.sort.mb: 100
64 15/07/27 16:21:39 INFO mapred.MapTask: soft limit at 83886080
65 15/07/27 16:21:39 INFO mapred.MapTask: bufstart = 0; bufvoid = 104857600
66 15/07/27 16:21:39 INFO mapred.MapTask: kvstart = 26214396; length = 6553600
67 15/07/27 16:21:39 INFO mapred.MapTask: Map output collector class = org.apache.hadoop.mapred.MapTask$MapOutputBuffer
68 15/07/27 16:21:39 INFO mapred.LocalJobRunner:
69 15/07/27 16:21:39 INFO mapred.MapTask: Starting flush of map output
70 15/07/27 16:21:39 INFO mapred.MapTask: Spilling map output
71 15/07/27 16:21:39 INFO mapred.MapTask: bufstart = 0; bufend = 24; bufvoid = 104857600
72 15/07/27 16:21:39 INFO mapred.MapTask: kvstart = 26214396(104857584); kvend = 26214388(104857552); length = 9/6553600
73 15/07/27 16:21:39 INFO mapred.MapTask: Finished spill 0
74 15/07/27 16:21:39 INFO mapred.Task: Task:attempt_local1592166400_0001_m_000002_0 is done. And is in the process of committing
75 15/07/27 16:21:39 INFO mapred.LocalJobRunner: map
76 15/07/27 16:21:39 INFO mapred.Task: Task 'attempt_local1592166400_0001_m_000002_0' done.
77 15/07/27 16:21:39 INFO mapred.LocalJobRunner: Finishing task: attempt_local1592166400_0001_m_000002_0
78 15/07/27 16:21:39 INFO mapred.LocalJobRunner: map task executor complete.
79 15/07/27 16:21:39 INFO mapred.LocalJobRunner: Waiting for reduce tasks
80 15/07/27 16:21:39 INFO mapred.LocalJobRunner: Starting task: attempt_local1592166400_0001_r_000000_0
81 15/07/27 16:21:39 INFO util.ProcfsBasedProcessTree: ProcfsBasedProcessTree currently is supported only on Linux.
82 15/07/27 16:21:39 INFO mapred.Task: Using ResourceCalculatorProcessTree : org.apache.hadoop.yarn.util.WindowsBasedProcessTree@49250068
83 15/07/27 16:21:39 INFO mapred.ReduceTask: Using ShuffleConsumerPlugin: org.apache.hadoop.mapreduce.task.reduce.Shuffle@2129404b
84 15/07/27 16:21:39 INFO reduce.MergeManagerImpl: MergerManager: memoryLimit=652528832, maxSingleShuffleLimit=163132208, mergeThreshold=430669056, ioSortFactor=10, memToMemMergeOutputsThreshold=10
85 15/07/27 16:21:39 INFO reduce.EventFetcher: attempt_local1592166400_0001_r_000000_0 Thread started: EventFetcher for fetching Map Completion Events
86 15/07/27 16:21:40 INFO reduce.LocalFetcher: localfetcher#1 about to shuffle output of map attempt_local1592166400_0001_m_000002_0 decomp: 32 len: 36 to MEMORY
87 15/07/27 16:21:40 INFO reduce.InMemoryMapOutput: Read 32 bytes from map-output for attempt_local1592166400_0001_m_000002_0
88 15/07/27 16:21:40 INFO reduce.MergeManagerImpl: closeInMemoryFile -> map-output of size: 32, inMemoryMapOutputs.size() -> 1, commitMemory -> 0, usedMemory ->32
89 15/07/27 16:21:40 INFO reduce.LocalFetcher: localfetcher#1 about to shuffle output of map attempt_local1592166400_0001_m_000000_0 decomp: 72 len: 76 to MEMORY
90 15/07/27 16:21:40 INFO reduce.InMemoryMapOutput: Read 72 bytes from map-output for attempt_local1592166400_0001_m_000000_0
91 15/07/27 16:21:40 INFO reduce.MergeManagerImpl: closeInMemoryFile -> map-output of size: 72, inMemoryMapOutputs.size() -> 2, commitMemory -> 32, usedMemory ->104
92 15/07/27 16:21:40 INFO reduce.LocalFetcher: localfetcher#1 about to shuffle output of map attempt_local1592166400_0001_m_000001_0 decomp: 42 len: 46 to MEMORY
93 15/07/27 16:21:40 INFO reduce.InMemoryMapOutput: Read 42 bytes from map-output for attempt_local1592166400_0001_m_000001_0
94 15/07/27 16:21:40 INFO reduce.MergeManagerImpl: closeInMemoryFile -> map-output of size: 42, inMemoryMapOutputs.size() -> 3, commitMemory -> 104, usedMemory ->146
95 15/07/27 16:21:40 INFO reduce.EventFetcher: EventFetcher is interrupted.. Returning
96 15/07/27 16:21:40 INFO mapred.LocalJobRunner: 3 / 3 copied.
97 15/07/27 16:21:40 INFO reduce.MergeManagerImpl: finalMerge called with 3 in-memory map-outputs and 0 on-disk map-outputs
98 15/07/27 16:21:40 INFO mapred.Merger: Merging 3 sorted segments
99 15/07/27 16:21:40 INFO mapred.Merger: Down to the last merge-pass, with 3 segments left of total size: 128 bytes
100 15/07/27 16:21:40 INFO reduce.MergeManagerImpl: Merged 3 segments, 146 bytes to disk to satisfy reduce memory limit
101 15/07/27 16:21:40 INFO reduce.MergeManagerImpl: Merging 1 files, 146 bytes from disk
102 15/07/27 16:21:40 INFO reduce.MergeManagerImpl: Merging 0 segments, 0 bytes from memory into reduce
103 15/07/27 16:21:40 INFO mapred.Merger: Merging 1 sorted segments
104 15/07/27 16:21:40 INFO mapred.Merger: Down to the last merge-pass, with 1 segments left of total size: 136 bytes
105 15/07/27 16:21:40 INFO mapred.LocalJobRunner: 3 / 3 copied.
106 15/07/27 16:21:40 INFO Configuration.deprecation: mapred.skip.on is deprecated. Instead, use mapreduce.job.skiprecords
107 15/07/27 16:21:40 INFO mapred.Task: Task:attempt_local1592166400_0001_r_000000_0 is done. And is in the process of committing
108 15/07/27 16:21:40 INFO mapred.LocalJobRunner: 3 / 3 copied.
109 15/07/27 16:21:40 INFO mapred.Task: Task attempt_local1592166400_0001_r_000000_0 is allowed to commit now
110 15/07/27 16:21:40 INFO output.FileOutputCommitter: Saved output of task 'attempt_local1592166400_0001_r_000000_0' to hdfs://192.168.62.129:9000/user/vm/sort_out/_temporary/0/task_local1592166400_0001_r_000000
111 15/07/27 16:21:40 INFO mapred.LocalJobRunner: reduce > reduce
112 15/07/27 16:21:40 INFO mapred.Task: Task 'attempt_local1592166400_0001_r_000000_0' done.
113 15/07/27 16:21:40 INFO mapred.LocalJobRunner: Finishing task: attempt_local1592166400_0001_r_000000_0
114 15/07/27 16:21:40 INFO mapred.LocalJobRunner: reduce task executor complete.
115 15/07/27 16:21:40 INFO mapreduce.Job: map 100% reduce 100%
116 15/07/27 16:21:41 INFO mapreduce.Job: Job job_local1592166400_0001 completed successfully
117 15/07/27 16:21:41 INFO mapreduce.Job: Counters: 38
118 File System Counters
119 FILE: Number of bytes read=3834
120 FILE: Number of bytes written=1017600
121 FILE: Number of read operations=0
122 FILE: Number of large read operations=0
123 FILE: Number of write operations=0
124 HDFS: Number of bytes read=161
125 HDFS: Number of bytes written=62
126 HDFS: Number of read operations=41
127 HDFS: Number of large read operations=0
128 HDFS: Number of write operations=10
129 Map-Reduce Framework
130 Map input records=14
131 Map output records=14
132 Map output bytes=112
133 Map output materialized bytes=158
134 Input split bytes=339
135 Combine input records=0
136 Combine output records=0
137 Reduce input groups=13
138 Reduce shuffle bytes=158
139 Reduce input records=14
140 Reduce output records=14
141 Spilled Records=28
142 Shuffled Maps =3
143 Failed Shuffles=0
144 Merged Map outputs=3
145 GC time elapsed (ms)=10
146 CPU time spent (ms)=0
147 Physical memory (bytes) snapshot=0
148 Virtual memory (bytes) snapshot=0
149 Total committed heap usage (bytes)=1420296192
150 Shuffle Errors
151 BAD_ID=0
152 CONNECTION=0
153 IO_ERROR=0
154 WRONG_LENGTH=0
155 WRONG_MAP=0
156 WRONG_REDUCE=0
157 File Input Format Counters
158 Bytes Read=48
159 File Output Format Counters
160 Bytes Written=62

4. 可能出现的问题

4.1 权限问题,无法访问HDFS

修改集群hdfs-site.xml配置,关闭hadoop集群的权限校验。

<property>

<name>dfs.permissions</name>

<value>false</value>

</property>

4.2 出现NullPointerException异常

在环境变量中配置%HADOOP_HOME%为C:\Download\hadoop-2.6.0\

下载winutils.exe和hadoop.dll到C:\Download\hadoop-2.6.0\bin

注意:网上很多资料说的是下载hadoop-common-2.2.0-bin-master.zip,但很多不支持hadoop2.6.0版本。需要下载支持hadoop2.6.0版本的程序。

4.3 程序执行失败

需要执行Run on Hadoop,而不是Java Application。

搭建Hadoop2.5.2+Eclipse开发调试环境的更多相关文章

  1. 搭建Hadoop2.6.0+Eclipse开发调试环境(以及log4j.properties的配置)

    上一篇在win7虚拟机下搭建了hadoop2.6.0伪分布式环境.为了开发调试方便,本文介绍在eclipse下搭建开发环境,连接和提交任务到hadoop集群. 1. 环境 Eclipse版本Luna ...

  2. 搭建Hadoop2.6.0+Eclipse开发调试环境

    上一篇在win7虚拟机下搭建了hadoop2.6.0伪分布式环境.为了开发调试方便,本文介绍在eclipse下搭建开发环境,连接和提交任务到hadoop集群. 1. 环境 Eclipse版本Luna ...

  3. windows下用eclipse+goclipse插件+gdb搭建go语言开发调试环境

    windows下用eclipse+goclipse插件+gdb搭建go语言开发调试环境   http://rongmayisheng.com/post/windows%E4%B8%8B%E7%94%A ...

  4. PHP开发调试环境配置(基于wampserver+Eclipse for PHP Developers )

    1 软件准 WampServer 下载地址:http://www.wampserver.com/en/#download-wrapper    我下的是 里面包含了搭建PHP必须的4个软件:   1. ...

  5. Solr4.8.0源码分析(4)之Eclipse Solr调试环境搭建

    Solr4.8.0源码分析(4)之Eclipse Solr调试环境搭建 由于公司里的Solr调试都是用远程jpda进行的,但是家里只有一台电脑所以不能jpda进行调试,这是因为jpda的端口冲突.所以 ...

  6. envoy开发调试环境搭建

    image 前段时间研究envoy的filter开发,在windows机器环境上面折腾了会,这里记录一下,希望能够帮助到大家少走一些坑 主要是使用vscode devContainer的方式来搭建开发 ...

  7. PHP开发调试环境配置

    ——基于wamp和Eclipse for PHP Developers 引言 为了搭建PHP开发调试环境,我曾经在网上查阅了无数的资料,但没有一种真正能够行的通的.因为PHP开发环境需要很多种软件相互 ...

  8. golang在Windows下Sublime Text开发调试环境的配置

    一.前言 近期本人有工作调动,进入了一个全新的领域[golang]服务端开发.在此写下本文,希望给那些没接触过golang开发调试环境及还在犹豫选择那家golang IDE而纠结的朋友们一点点帮助,如 ...

  9. 配置Windows 2008 R2 64位 Odoo 8.0 源码PyCharm开发调试环境

    安装过程中,需要互联网连接下载python依赖库: 1.安装: Windows Server 2008 R2 x64标准版 2.安装: Python 2.7.10 amd64 到C:\Python27 ...

随机推荐

  1. 利用反射+AOP,封装Basehandler

    AOP为Aspect Oriented Programming的缩写,意为:面向切面编程,通过预编译方式和运行期动态代理实现程序功能的统一维护的一种技术.AOP是OOP的延续,是软件开发中的一个热点, ...

  2. android ViewPager使用遇到的问题

    项目需求是需要实现一个有两页可滑动的界面,就想到了使用ViewPager,在实现是没有深入考虑,就直接使用了PagerAdapter,页面是正常实现了,可是发现无法流畅的刷新页面(直接使用notify ...

  3. No row with the given identifier exists:错误另解

    这是一个hibernate常见的问题.搜索出来最多的答案都是如下面这篇文章所述: http://blog.csdn.net/eyejava/article/details/1896492 但我觉得我问 ...

  4. 洛谷 P1007 独木桥

    #include<set> #include<map> #include<cmath> #include<queue> #include<cstd ...

  5. GOAndroid的安装和配置

    android环境的配置还是比较复杂的,特别对于我这样一直使用mfc的程序员来说,有很多观念上需要转变.好在配置成功后就能够不断复用,那么这样的问题值得整理出来 一.安装jdk 二.解压adt-bun ...

  6. oracle应用启动时常会报未知服务名

    修改/etc/hosts文件 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4#::1 loca ...

  7. 【Python】使用Supervisor来管理Python的进程

    来源 : http://blog.csdn.net/xiaoguaihai/article/details/44750073     1.问题描述 需要一个python的服务程序在后台一直运行,不能让 ...

  8. Xcode7 *** does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE)

    *** does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE ...

  9. JAVA 1.9 面向对象之封装

    1. 面向对象程序设计的三大基本特征:继承(Inheritence).封装(Encapsulation).多态(Polymorphism)2. 封装:类包含了数据与方法,将数据与方法放在一个类中就构成 ...

  10. Makefile中头文件在依赖关系中作用

    摘于:http://bbs.csdn.net/topics/120024677 (1)在makefile的依赖关系中用不用体现.h头文件?(2)如果在依赖关系中要体现.h头文件,应该体现到什么层次?= ...