通常、Hadoop と Flink を使用する場合、分散ファイル システムからファイルを開く/読み取ると、java.io.InputStream を拡張する Source (Sink の対応部分) オブジェクトが返されます。
ただし、Apache Ignite では、IgfsSecondaryFileSystem、より具体的には IgniteHadoopIgfsSecondaryFileSystem は、" open " メソッドを (IgfsPath を渡して) 呼び出すと、タイプ HadoopIgfsSecondaryFileSystemPositionedReadable のオブジェクトを返します。
HadoopIgfsSecondaryFileSystemPositionedReadableは " read " メソッドを提供しますが、入力ストリームの位置など、読み取る予定のデータの場所に関する詳細を知る必要があります。
/**
* Read up to the specified number of bytes, from a given position within a file, and return the number of bytes
* read.
*
* @param pos Position in the input stream to seek.
* @param buf Buffer into which data is read.
* @param off Offset in the buffer from which stream data should be written.
* @param len The number of bytes to read.
* @return Total number of bytes read into the buffer, or -1 if there is no more data (EOF).
* @throws IOException In case of any exception.
*/
public int read(long pos, byte[] buf, int off, int len) throws IOException;
読み取りメソッドを呼び出す前に、これらの詳細を確認する方法は?
私はこれらのフレームワークにまったく慣れていませんが、Hadoop ファイル システムに保存されているファイルを指す IgfsPath に基づいて InputStream を取得する別の方法が存在する可能性がありますか?
ここで説明されていることを達成しようとしています: https://apacheignite-fs.readme.io/docs/secondary-file-system
ヒントをよろしくお願いします!