zoukankan      html  css  js  c++  java
  • RecordWriter接口解析

    RecordWriter是将Map/Reduce结果(Key-Value)输出到文件系统中。

    /**
     * <code>RecordWriter</code> writes the output &lt;key, value&gt; pairs 
     * to an output file.
     
     * <p><code>RecordWriter</code> implementations write the job outputs to the
     * {@link FileSystem}.
     * 
     * @see OutputFormat
     */
    @InterfaceAudience.Public
    @InterfaceStability.Stable
    public abstract class RecordWriter<K, V> {
      /** 
       * Writes a key/value pair.
       * 将Map/Reduce结果的key/value写到文件系统中去。
       * @param key the key to write.
       * @param value the value to write.
       * @throws IOException
       */      
      public abstract void write(K key, V value) throws IOException, InterruptedException;
    
      /** 
       * Close this <code>RecordWriter</code> to future operations.
       * 关闭输出操作
       * @param context the context of the task
       * @throws IOException
       */ 
      public abstract void close(TaskAttemptContext context) 
              throws IOException, InterruptedException;
    }
  • 相关阅读:
    winform_webApiSelfHost
    手机访问网站自动跳转到手机版
    Linux常用命令
    css居中
    固定菜单
    BOM操作写法实例
    表格(合并单元格)
    倒计时
    分享到插件
    jquery获得下拉框的值
  • 原文地址:https://www.cnblogs.com/rolly-yan/p/3704159.html
Copyright © 2011-2022 走看看