Comments (6)
Thank you for your fix, we'll work on making a new release that includes your contribution.
from oci-hdfs-connector.
The problem is with read
implementations of the com.oracle.bmc.hdfs.store.BmcReadAheadFSInputStream
: they do not call the super.read
and do not change statistics
on their own.
from oci-hdfs-connector.
Implementations should be changed to:
@Override
public int read() throws IOException {
LOG.debug("{}: Reading single byte at position {}", this, filePos);
if (dataPos == -1) {
fillBuffer();
}
if (dataPos == -1) {
return -1;
}
filePos++;
int result = Byte.toUnsignedInt(data[dataCurOffset++]);
+ this.statistics.incrementBytesRead(1);
if (atEndOfBuffer()) {
clearBuffer();
}
return result;
}
and
@Override
public int read(byte[] buffer, int offset, int length) throws IOException {
LOG.debug("{}: Reading {} bytes at current position {}", this, length, filePos);
if (dataPos == -1) {
fillBuffer();
}
if (dataPos == -1) {
return -1; // EOF
}
int n = Math.min(length, dataMax - dataCurOffset);
System.arraycopy(data, dataCurOffset, buffer, offset, n);
dataCurOffset += n;
filePos += n;
if (atEndOfBuffer()) {
if (n != length) {
LOG.debug("{}: Short Read; exhausted buffer", this);
}
clearBuffer();
}
+ this.statistics.incrementBytesRead(n);
return n;
}
from oci-hdfs-connector.
Tested it by referencing patched implementation in fs.oci.io.read.custom.stream
.
from oci-hdfs-connector.
PR: #78
from oci-hdfs-connector.
This was released in version 3.3.4.0.0.0. Closing.
from oci-hdfs-connector.
Related Issues (20)
- How to configure the filesystem implementation in spark configuration HOT 2
- BmcDataStore -> rename is not thread safe. throwing java.io.IOException: Unable to perform rename HOT 2
- OCI configurations get ignored in pyspark HOT 1
- The content type is not supported HOT 2
- Pyspark py4j.protocol.Py4JJavaError: An error occurred while calling o95.csv. HOT 3
- Missing fs.oci.buffer.dir HOT 5
- Support for Apache Flink HOT 2
- Add shading logic used to create oci-hdfs-full-<version>.jar HOT 4
- Potential data corruption issue for OCI HDFS Connector with RefreshableOnNotAuthenticatedProvider HOT 1
- There is a vulnerability in guava 28.0-jre,upgrade recommended HOT 1
- ls: Unable to fetch file status for HDFS, connector version: 3.3.0.3 HOT 1
- BmcDataStore -> renameDirectory fails to rename when a file has special characters(*,$,^,?,+,|) HOT 3
- hive external table of OCI object storage , run select count(*) return error : No FileSystem for scheme "oci" HOT 4
- presto access hive OCI object external table failed. return Unable to extract password HOT 6
- Full รผber jar contains unshaded problematic third party libraries HOT 3
- Closing stream and read fails, possible stale connection on upgrade from 3.2.1.3 to 3.3.0.7.0.1 with Jersey connector HOT 10
- Log4j vulnerability in OCI HDFS Connector HOT 6
- `ArrayIndexOutOfBoundsException` in read-ahead mode HOT 4
- Problem with certificates HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oci-hdfs-connector.