SMB: Wrap at 140 columns (#34492)
Applies our max column width to the store-smb project.
This commit is contained in:
parent
b6aa42777a
commit
5d74f8085b
|
@ -674,5 +674,4 @@
|
||||||
<suppress files="plugins[/\\]repository-hdfs[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]repositories[/\\]hdfs[/\\]HdfsTests.java" checks="LineLength" />
|
<suppress files="plugins[/\\]repository-hdfs[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]repositories[/\\]hdfs[/\\]HdfsTests.java" checks="LineLength" />
|
||||||
<suppress files="plugins[/\\]repository-s3[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]repositories[/\\]s3[/\\]S3Repository.java" checks="LineLength" />
|
<suppress files="plugins[/\\]repository-s3[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]repositories[/\\]s3[/\\]S3Repository.java" checks="LineLength" />
|
||||||
<suppress files="plugins[/\\]repository-s3[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]repositories[/\\]s3[/\\]AmazonS3Wrapper.java" checks="LineLength" />
|
<suppress files="plugins[/\\]repository-s3[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]repositories[/\\]s3[/\\]AmazonS3Wrapper.java" checks="LineLength" />
|
||||||
<suppress files="plugins[/\\]store-smb[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]index[/\\]store[/\\]SmbDirectoryWrapper.java" checks="LineLength" />
|
|
||||||
</suppressions>
|
</suppressions>
|
||||||
|
|
|
@ -60,7 +60,10 @@ public final class SmbDirectoryWrapper extends FilterDirectory {
|
||||||
static final int CHUNK_SIZE = 8192;
|
static final int CHUNK_SIZE = 8192;
|
||||||
|
|
||||||
SmbFSIndexOutput(String name) throws IOException {
|
SmbFSIndexOutput(String name) throws IOException {
|
||||||
super("SmbFSIndexOutput(path=\"" + fsDirectory.getDirectory().resolve(name) + "\")", name, new FilterOutputStream(Channels.newOutputStream(Files.newByteChannel(fsDirectory.getDirectory().resolve(name), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.READ, StandardOpenOption.WRITE))) {
|
super("SmbFSIndexOutput(path=\"" + fsDirectory.getDirectory().resolve(name) + "\")", name,
|
||||||
|
new FilterOutputStream(Channels.newOutputStream(Files.newByteChannel(fsDirectory.getDirectory().resolve(name),
|
||||||
|
StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING,
|
||||||
|
StandardOpenOption.READ, StandardOpenOption.WRITE))) {
|
||||||
// This implementation ensures, that we never write more than CHUNK_SIZE bytes:
|
// This implementation ensures, that we never write more than CHUNK_SIZE bytes:
|
||||||
@Override
|
@Override
|
||||||
public void write(byte[] b, int offset, int length) throws IOException {
|
public void write(byte[] b, int offset, int length) throws IOException {
|
||||||
|
@ -71,7 +74,8 @@ public final class SmbDirectoryWrapper extends FilterDirectory {
|
||||||
offset += chunk;
|
offset += chunk;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, CHUNK_SIZE);
|
},
|
||||||
|
CHUNK_SIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue