Details
-
Task
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
Docs Required, Release Notes Required
Description
Current EncryptedFileIO has wierd implementations of several methods. Like
@Override public int write(byte[] buf, int off, int len) throws IOException { throw new UnsupportedOperationException("Encrypted File doesn't support this operation"); } @Override public int read(byte[] buf, int off, int len) throws IOException { throw new UnsupportedOperationException("Encrypted File doesn't support this operation"); }
Why not supported?
Or:
@Override public int read(ByteBuffer destBuf) throws IOException { assert position() == 0; return plainFileIO.read(destBuf); }
Why encrypted reading is not supported beyond the header? Why `assert position() == 0`
The class contains several writes and reading implemented differently. Some of them are not supported.
Suggestion: Make one write(...) and one read(...) implementation and call them passing correct arguments. Read/write the header without encryption. Read/write everything beyond the header with encryption.
Attachments
Issue Links
- is caused by
-
IGNITE-15159 Static encrypted snapshots.
-
- Resolved
-