lucene4: finish org.elasticsearch.common.compress cleanup
This commit is contained in:
parent
93906903b6
commit
f57efcf6c8
|
@ -73,7 +73,8 @@ public class CompressedDirectory extends Directory implements ForceSyncDirectory
|
|||
@Override
|
||||
public long fileLength(String name) throws IOException {
|
||||
if (actualLength && decompressExtensions.contains(getExtension(name))) {
|
||||
IndexInput in = openInput(name);
|
||||
// LUCENE 4 UPGRADE: Is this the right IOContext?
|
||||
IndexInput in = openInput(name, IOContext.READONCE);
|
||||
try {
|
||||
return in.length();
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -65,7 +65,7 @@ public class LZFCompressedIndexInput extends CompressedIndexInput<LZFCompressorC
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object clone() {
|
||||
public IndexInput clone() {
|
||||
LZFCompressedIndexInput cloned = (LZFCompressedIndexInput) super.clone();
|
||||
cloned.inputBuffer = new byte[LZFChunk.MAX_CHUNK_LEN];
|
||||
return cloned;
|
||||
|
|
|
@ -59,7 +59,7 @@ public abstract class SnappyCompressedIndexInput extends CompressedIndexInput<Sn
|
|||
}
|
||||
|
||||
@Override
|
||||
public Object clone() {
|
||||
public IndexInput clone() {
|
||||
SnappyCompressedIndexInput cloned = (SnappyCompressedIndexInput) super.clone();
|
||||
cloned.inputBuffer = new byte[inputBuffer.length];
|
||||
return cloned;
|
||||
|
|
Loading…
Reference in New Issue