org.apache.hadoop.fs-PositionedReadable
package org.apache.hadoop.fs; import java.io.*;
import org.apache.hadoop.fs.*; /** Stream that permits positional reading. */
//定位流式读取
public interface PositionedReadable {
/**
* Read upto the specified number of bytes, from a given
* position within a file, and return the number of bytes read. This does not
* change the current offset of a file, and is thread-safe.
*/
public int read(long position, byte[] buffer, int offset, int length)
throws IOException;
//读取文件流中最多到length大小的字节,到字节缓冲区buffer中,它是从给定的position位置开始读取的。
//该读取方式不改变文件的当前偏移位置offset,并且该方法是线程安全的
/**
* Read the specified number of bytes, from a given
* position within a file. This does not
* change the current offset of a file, and is thread-safe.
*/
public void readFully(long position, byte[] buffer, int offset, int length)
throws IOException;
/**
* 读取文件流中length大小的字节,到字节缓冲区buffer中,它是从给定的position位置开始读取的。
* 该读取方式不改变文件的当前偏移位置offset,并且该方法是线程安全的。
*/
/**
* Read number of bytes equalt to the length of the buffer, from a given
* position within a file. This does not
* change the current offset of a file, and is thread-safe.
*/
public void readFully(long position, byte[] buffer) throws IOException;
/**
* 读取文件流中buffer长度的字节,到字节缓冲区buffer中,它是从给定的position位置开始读取的
* 该读取方式不改变文件的当前偏移位置offset,并且该方法是线程安全的。
*/ }
org.apache.hadoop.fs-PositionedReadable的更多相关文章
- 用java运行Hadoop程序报错:org.apache.hadoop.fs.LocalFileSystem cannot be cast to org.apache.
用java运行Hadoop例程报错:org.apache.hadoop.fs.LocalFileSystem cannot be cast to org.apache.所写代码如下: package ...
- spark-shell报错:Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInputStream
环境: openSUSE42.2 hadoop2.6.0-cdh5.10.0 spark1.6.0-cdh5.10.0 按照网上的spark安装教程安装完之后,启动spark-shell,出现如下报错 ...
- 报错:Exception in thread "main" java.lang.NoClassDefFoundError: Lorg/apache/hadoop/fs/FileSystem
报错现象: Exception in thread "main" java.lang.NoClassDefFoundError: Lorg/apache/hadoop/fs/Fil ...
- Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/CanUnbuffer
在执行spark on hive 的时候在 sql.show()处报错 : Exception in thread "main" java.lang.NoClassDefFoun ...
- hive启动时报错 java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D at org.apache.hadoop.fs.Path.initialize
错误提示信息如下 错误信息如下 [root@node1 bin]# ./hive Logging initialized -bin/lib/hive-common-.jar!/hive-log4j.p ...
- org.apache.hadoop.fs.FsUrlStreamHandlerFactory 在哪个jar包
org.apache.hadoop.fs.FsUrlStreamHandlerFactory在org.apache.hadoop类中,org.apache.hadoop在hadoop安装目录下.
- sparkOnYarn报错org.apache.hadoop.fs.FSDataInputStream
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInpu ...
- Hadoop 3.1.2报错:xception in thread "main" org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "hdfs"
报错内容如下: Exception in thread "main" org.apache.hadoop.fs.UnsupportedFileSystemException: No ...
- 你遇到了吗?Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.fs.FileAlreadyExistsException)
我在使用 Structured Streaming 的 ForeachWriter,写 HDFS 文件时,出现了这个异常 这个异常出现的原因是HDFS作为一个分布式文件系统,支持多线程读,但是不支持多 ...
- 错误Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInputStream排查思路
spark1(默认CDH自带版本)不存在这个问题,主要是升级了spark2(CDHparcel升级)版本安装后需要依赖到spark1的旧配置去读取hadoop集群的依赖包. 1./etc/spark2 ...
随机推荐
- Top 5 Free Screen Recording Softwares For Windows
[转]Top 5 Free Screen Recording Softwares For Windows 该文章是转过来的,因为这里介绍了好几款免费的录制视频的软件.我自己需要使用,也许大家也有需求. ...
- 机器学习中的数学(5)-强大的矩阵奇异值分解(SVD)及其应用
版权声明: 本文由LeftNotEasy发布于http://leftnoteasy.cnblogs.com, 本文可以被全部的转载或者部分使用,但请注明出处,如果有问题,请联系wheeleast@gm ...
- lucene学习笔记:二,Lucene的框架
Lucene总的来说是: 一个高效的,可扩展的,全文检索库. 全部用Java实现,无须配置. 仅支持纯文本文件的索引(Indexing)和搜索(Search). 不负责由其他格式的文件抽取纯文本文件, ...
- Spring Framework 中启动 Redis 事务操作
背景: 项目中遇到有一系列对Redis的操作,并需要保持事务处理. 环境: Spring version 4.1.8.RELEASE Redis Server 2.6.12 (64位) spring- ...
- 使用matplotlib绘制带图例的图表
#coding=utf8 from pylab import * plt.figure(figsize=(8,10), dpi=50) plt.plot(do_tow2[28:508],do_prn2 ...
- Jquery类级别与对象级别插件开发
jQuery插件的开发包括两种: 一种是类级别的插件开发,即给jQuery添加新的全局函数,相当于给jQuery类本身添加方法.jQuery的全局函数就是属于jQuery命名空间的函数,另一种是对象级 ...
- j2ee指导型框架或示例
springside appfuse springfuse
- librtmp推流使用aac编码音频的html5和flash播放问题
公司项目中使用rtmp推流,音频编码aac.视频编码H264.windows和android平台都没有发现问题.然而在IOS版本的APP中发现几个问题:1. 推流后flash播放异常2. IOS平台微 ...
- Git 一些日常使用积累
本来不想写这样的东西的,因为随处谷歌百度都有一大堆!但是,我却总是在百度谷歌,我在想,为什么我不自己写一篇存进来,顺便加深印象呢?既然这样,这篇随笔,就真的变成随笔好了,随时修改,随时添加. Git ...
- thymeleaf学习
一.简单表达格式: thymeleaf的官方参考文档 1.变量的表达式:${...} 2.选择变量表达式:*{...} 3.信息表达:#{...} 4.链接URL表达式:@{...} 二.字面值 ...