apache/hadoop · error · RuntimeException
Not invertible
Error message
Not invertible
What it means
Error "Not invertible" thrown in apache/hadoop.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GF256.java:228
}
for (int i = 0; i < n; i++) {
outMatrix[i * n + i] = 1;
}
// Inverse
for (int j, i = 0; i < n; i++) {
// Check for 0 in pivot element
if (inMatrix[i * n + i] == 0) {
// Find a row with non-zero in current column and swap
for (j = i + 1; j < n; j++) {
if (inMatrix[j * n + i] != 0) {
break;
}
}
if (j == n) {
// Couldn't find means it's singular
throw new RuntimeException("Not invertible");
}
for (int k = 0; k < n; k++) {
// Swap rows i,j
temp = inMatrix[i * n + k];
inMatrix[i * n + k] = inMatrix[j * n + k];
inMatrix[j * n + k] = temp;
temp = outMatrix[i * n + k];
outMatrix[i * n + k] = outMatrix[j * n + k];
outMatrix[j * n + k] = temp;
}
}
temp = gfInv(inMatrix[i * n + i]); // 1/pivot
for (j = 0; j < n; j++) {
// Scale row i by 1/pivot
inMatrix[i * n + j] = gfMul(inMatrix[i * n + j], temp);View on GitHub (pinned to 2add963021)
Solutions
- The generated coding matrix has no inverse; use the standard Vandermonde/Cauchy matrix generation provided by the coder instead of a custom matrix.
- Verify numDataUnits and numParityUnits are valid for the RS coder.
When it happens
Trigger: Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/util/GF256.java:228 when the library encounters an invalid state.
Common situations: Occurs when GF256 matrix inversion fails because the matrix is singular, typically from invalid erased index combinations. Validate erasedIndexes so the decode matrix is invertible.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/5f92fb1ea33b0720.
Report an issue: GitHub.