//收集了一小部分,忘记的时候过来查一下

java--hadoop部分

/**
* 此类用来处理DNS原始日志:统计给定域名平均响应时延
* @param Input
* @param Output
* @param cacheUriListfilePath
* @param cacheIpNetTypefilePath
* <br>[文件cachefile需要上传HDFS,文件为K-V形式,多个V用;隔开]</br>
*
* <P><B>NOTE:</B>该类适合限定域名的时延统计,若统计所有域名的的平均时延此类不适用,因为reducer类使用集合进行汇聚,所有域名会导致内存溢出</p>
*/

<P>是单独起个段落 (注意和<br>换行、<pre>再起一个段落 比较)
<B>是加黑加粗
@param是参数
@author yanghl 作者

/**
* This is an example Aggregated Hadoop Map/Reduce application. Computes the
* histogram of the words in the input texts.
*
* To run: bin/hadoop jar hadoop-*-examples.jar aggregatewordhist <i>in-dir</i>
* <i>out-dir</i> <i>numOfReducers</i> textinputformat
*
*/

<i>是倾斜体,表示路径

/**
* Creates a <code>Statement</code> object for sending
* SQL statements to the database.
* SQL statements without parameters are normally
* executed using <code>Statement</code> objects. If the same SQL statement
* is executed many times, it may be more efficient to use a
* <code>PreparedStatement</code> object.
* <P>
* Result sets created using the returned <code>Statement</code>
* object will by default be type <code>TYPE_FORWARD_ONLY</code>
* and have a concurrency level of <code>CONCUR_READ_ONLY</code>.
* The holdability of the created result sets can be determined by
* calling {@link #getHoldability}.
*
* @return a new default <code>Statement</code> object
* @exception SQLException if a database access error occurs
* or this method is called on a closed connection
*/

@return
@exception
{@link #getHoldability}.加链接 getHoldability()本包的一个方法

/** Holds a &lt;url, referrer, time &gt; tuple */
static class AccessRecord implements Writable, DBWritable {.....}

========================
&lt; &gt;注释中的<>表示的另一种方法
========================

/**
* <P>The basic service for managing a set of JDBC drivers.<br>
* <B>NOTE:</B> The {@link <code>DataSource</code>} interface, new in the
* JDBC 2.0 API, provides another way to connect to a data source.
* The use of a <code>DataSource</code> object is the preferred means of
* connecting to a data source.
*
* <P>As part of its initialization, the <code>DriverManager</code> class will
* attempt to load the driver classes referenced in the "jdbc.drivers"
* system property. This allows a user to customize the JDBC Drivers
* used by their applications. For example in your
* ~/.hotjava/properties file you might specify:
* <pre>
* <CODE>jdbc.drivers=foo.bah.Driver:wombat.sql.Driver:bad.taste.ourDriver</CODE>
* </pre>
*/

===============================
【br、P、pre、code、B】标签
<br>换行
<pre>再起一个段落
===============================

/**
* A tool interface that supports handling of generic command-line options.
*
* <p><code>Tool</code>, is the standard for any Map-Reduce tool/application.
* The tool/application should delegate the handling of
* <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/CommandsManual.html#Generic_Options">
* standard command-line options</a> to {@link ToolRunner#run(Tool, String[])}
* and only handle its custom arguments.</p>
*
* <p>Here is how a typical <code>Tool</code> is implemented:</p>
* <p><blockquote><pre>
* public class MyApp extends Configured implements Tool {
*
* public int run(String[] args) throws Exception {
* // <code>Configuration</code> processed by <code>ToolRunner</code>
* Configuration conf = getConf();
*
* // Create a JobConf using the processed <code>conf</code>
* JobConf job = new JobConf(conf, MyApp.class);
*
* // Process custom command-line options
* Path in = new Path(args[1]);
* Path out = new Path(args[2]);
*
* // Specify various job-specific parameters
* job.setJobName("my-app");
* job.setInputPath(in);
* job.setOutputPath(out);
* job.setMapperClass(MyMapper.class);
* job.setReducerClass(MyReducer.class);
*
* // Submit the job, then poll for progress until the job is complete
* JobClient.runJob(job);
* return 0;
* }
*
* public static void main(String[] args) throws Exception {
* // Let <code>ToolRunner</code> handle generic command-line options
* int res = ToolRunner.run(new Configuration(), new MyApp(), args);
*
* System.exit(res);
* }
* }
* </pre></blockquote></p>
*
* @see GenericOptionsParser
* @see ToolRunner
*/

@InterfaceAudience.Public
@InterfaceStability.Stable
public interface Tool extends Configurable {
【<p><blockquote><pre>】

还可以在代码注释里画表格、列表

/**
* Rounding mode to round away from zero. Always increments the
* digit prior to a non-zero discarded fraction. Note that this
* rounding mode never decreases the magnitude of the calculated
* value.
*
*<p>Example:
*<table border>
*<tr valign=top><th>Input Number</th>
* <th>Input rounded to one digit<br> with {@code UP} rounding
*<tr align=right><td>5.5</td> <td>6</td>
*<tr align=right><td>2.5</td> <td>3</td>
*<tr align=right><td>1.6</td> <td>2</td>
*<tr align=right><td>1.1</td> <td>2</td>
*<tr align=right><td>1.0</td> <td>1</td>
*<tr align=right><td>-1.0</td> <td>-1</td>
*<tr align=right><td>-1.1</td> <td>-2</td>
*<tr align=right><td>-1.6</td> <td>-2</td>
*<tr align=right><td>-2.5</td> <td>-3</td>
*<tr align=right><td>-5.5</td> <td>-6</td>
*</table>
*/
<ul>
<li>a</li>
<li>a</li>
<li>a</li>
</ul>

还可以在代码注释里【写代码或配置文件内容】{@code xxxx....}

/**
* This program uses map/reduce to just run a distributed job where there is
* no interaction between the tasks and each task write a large unsorted
* random binary sequence file of BytesWritable.
* In order for this program to generate data for terasort with 10-byte keys
* and 90-byte values, have the following config:
* <pre>{@code
* <?xml version="1.0"?>
* <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
* <configuration>
* <property>
* <name>mapreduce.randomwriter.minkey</name>
* <value>10</value>
* </property>
* <property>
* <name>mapreduce.randomwriter.maxkey</name>
* <value>10</value>
* </property>
* <property>
* <name>mapreduce.randomwriter.minvalue</name>
* <value>90</value>
* </property>
* <property>
* <name>mapreduce.randomwriter.maxvalue</name>
* <value>90</value>
* </property>
* <property>
* <name>mapreduce.randomwriter.totalbytes</name>
* <value>1099511627776</value>
* </property>
* </configuration>}</pre>
* Equivalently, {@link RandomWriter} also supports all the above options
* and ones supported by {@link GenericOptionsParser} via the command-line.
*/

java注释代码规范的更多相关文章

  1. Java&Android代码规范

    项目中直接导入Square的代码风格文件.(不导入Google的原因是Square同时提供了Java和Android两套统一风格,Google只提供了一套) Square Code Styles Go ...

  2. JAVA总结--代码规范

    一.命名规范 1.标识符:统一.达意.简洁 统一:一个词有多种表达方式,不求最好,但求统一:例:供应商,既可以用supplier,也可以用provider,选择一种统一使用: 达意:明确表达其意义,正 ...

  3. 正则-Java注释代码

    今天写了个匹配java中常见的注释,记录一下,以备后用,使用条件将行两边的空格trim掉. (^\/\*.*)|(^\/\/.*)|(^\*.*)

  4. java web代码规范:

    每个类前要有注释,类前的注释格式是: /** *类是干什么的 *@author  编写该类的作者 */ 类中的每个方法前也要有注释: /** *该方法是干什么的 *@param 该方法中传入的参数 * ...

  5. java idea 代码规范插件

    推荐阿里的 p3c https://github.com/alibaba/p3c

  6. Java代码规范

    Java代码规范 本Java代码规范以SUN的标准Java代码规范为基础,为适应我们公司的实际需要,可能会做一些修改.本文档中没有说明的地方,请参看SUN Java标准代码规范.如果两边有冲突,以SU ...

  7. Java代码规范和一些常见问题

       本文中的代码规范,是Java标准代码规范中的一小部分,在我看来,是最重要的一部分.    理想目标:不需要写注释,不需要和别人介绍,别人就知道你的项目大致是做什么的,每个类大概实现了什么功能. ...

  8. Java 代码规范,你应该知道的一些工具和用法

    从事编程这个行业,你一定被别人说过或者说过别人这句话:代码要规范!求职面试时也能从 JD 上看到这个要求:要有良好的编程习惯.其实都是在讲代码规范(Code Style)这件事情. 每个人都有自己的编 ...

  9. Java 代码规范,你应该知道的一些工具和用法(转)

    转自:http://yifeng.studio/2017/06/30/coding-with-code-style/ Java 代码规范,你应该知道的一些工具和用法 2017-06-30 从事编程这个 ...

随机推荐

  1. python读写符号的含义

    r 打开只读文件,该文件必须存在. r+ 打开可读写的文件,该文件必须存在. w 打开只写文件,若文件存在则文件长度清为0,即该文件内容会消失.若文件不存在则建立该文件. w+ 打开可读写文件,若文件 ...

  2. 集合类源码(六)Map(HashMap, Hashtable, LinkedHashMap, WeakHashMap)

    HashMap 内部结构 内部是一个Node数组,每个Node都是链表的头,当链表的大小达到8之后链表转变成红黑树. put操作 final V putVal(int hash, K key, V v ...

  3. Reflector调试dll功能

    Reflector不仅仅是一个反编译工具,之前用Resharper,把这个给忽略了,这个Reflector还有一个调试dll功能, 在调试时反编译代码,会生成对应的pdb文件,就可以进行dll源码调试 ...

  4. parallels desktop 的新建虚拟机的步骤

    新建虚拟机的图   点击窗口-----控制中心--再点击控制中心的+号      

  5. JS 学习笔记

    在JS中两个对象不能用“==” 或者“===” 来比较,如果硬是要比较的话,始终返回的是false var x = new String("Bill"); var y = new ...

  6. 常见HTTP响应状态码

    分类 分类 分类描述 1** 信息,服务器收到请求,需要请求者继续执行操作 2** 成功,操作成功接收并处理 3** 重定向,需要进一步的操作以完成请求 4** 客户端错误,请求包含语法错误或无法完成 ...

  7. 【maven】idea的pom文件修改,引入新的jar包,无效,本地仓库始终没有下载新jar包的问题解决【idea pom Dependency not found】

    引入问题: idea的pom文件修改,引入新的jar包,无效,本地仓库始终没有下载新jar包的问题解决[idea  pom Dependency  not found] 如题,引入一个新的jar包,在 ...

  8. 2019-11-29-VisualStudio-使用三个方法启动最新-C#-功能

    原文:2019-11-29-VisualStudio-使用三个方法启动最新-C#-功能 title author date CreateTime categories VisualStudio 使用三 ...

  9. 简单理解ORM,实体类生成查询SQL语句

    目前有很多开源的ORM项目,大多情况下也不需要我们重复去造轮子,我们只需要了解轮子怎么造的,怎么用就可以,下面简单说一下怎么通过实体生成一个SQL语句: 先建立2个Attribute类,TableAt ...

  10. C#/.Net操作MongoDBHelper类

    先 NuGet两个程序集 1:MongoDB.Driver.   2:MongoDB.Bson namespace ConsoleApp1{ /// <summary> /// Mongo ...