org.apache.hadoop.fs-Seekable
本来要先看BufferedFSInputStream的,但是它实现了Seekable和PositionedReadable接口,就先看这两个,再看它会比较容易理解些
package org.apache.hadoop.fs; import java.io.*; /** Stream that permits seeking. */
//提供按位置查找功能的接口
public interface Seekable {
/**
* Seek to the given offset from the start of the file.
* The next read() will be from that location. Can't
* seek past the end of the file.
*/
void seek(long pos) throws IOException;
//从指定文件中的位置pos,对文件流进行前向搜索。
/**
* Return the current offset from the start of the file
*/
long getPos() throws IOException;
//返回文件流中当前偏移位置。
/**
* Seeks a different copy of the data. Returns true if
* found a new source, false otherwise.
*/
boolean seekToNewSource(long targetPos) throws IOException;
//从targetPos位置搜索文件数据的一个不同拷贝,搜索到则返回true,否则返回false。
}
org.apache.hadoop.fs-Seekable的更多相关文章
- 用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 ...
随机推荐
- bzoj 2594 [Wc2006]水管局长数据加强版(LCT+最小生成树)
[深坑勿入] [给个链接] http://blog.csdn.net/popoqqq/article/details/41348549 #include<cstdio> #include& ...
- Python对象初探
数据结构 PyObject_HEAD //对象公共头部 Py_ssize_t ob_refcnt; //对象引用数 PyTypeObject *ob_type; //对象类型 PyObject_V ...
- Tkinter教程之Listbox篇
本文转载自:http://blog.csdn.net/jcodeer/article/details/1811310 #Tkinter教程之Listbox篇#Listbox为列表框控件,它可以包含一个 ...
- Python xlsx 读取
代码示例 #!/usr/bin/env python import xlrd, sys, re, os workbook = xlrd.open_workbook( sys.argv[1] )for ...
- python编码问题的理解与解决
错误:'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) 看到网上很多都不清楚,做了一天的 ...
- 见过的最好AWK手册
原文: http://linuxfire.com.cn/~lily/awk.html 简体中文版由bones7456 (http://li2z.cn)整理. 原文:应该是 http://phi.sin ...
- IOS下arm64汇编疑问
之前所有关于32位下的纯汇编.s代码,在编译arm64的时候,很多错误,不得已只能用C代码. 但是arm_neon.h内部类C接口的汇编,基本上没有问题.不敢完全保证,还有待确认.关于arm64位的汇 ...
- 启动程序的同时传参给接收程序(XE8+WIN764)
相关资料: http://blog.csdn.net/yanjiaye520/article/details/7590252 注意事项: 1.ParamStr(0)是实例自己. 2.传的参数是以空格分 ...
- ocp 1Z0-047 1-60题解析
1. You need to load information about new customers from the NEW_CUST table into the tables CUST and ...
- [iOS微博项目 - 1.4] - 各种item NavigationBar & NavigationItem & BarButtonItem || TabBar & TabBarItem
一.UINavigationItem1> 获得方式self.navigationItem // self是指控制器2> 作用可以用来设置当前控制器顶部导航栏的内容// 设置导航栏中间的内容 ...