Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOPS-1621] Increased the row size of hdfs_xattrs table #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/main/java/io/hops/metadata/hdfs/entity/StoredXAttr.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public final class StoredXAttr {
public static final int MAX_NUM_USER_XATTRS_PER_INODE = 127;
public static final int MAX_NUM_SYS_XATTRS_PER_INODE = 127;
public static final int MAX_XATTR_NAME_SIZE = 255;
public static final int MAX_XATTR_VALUE_ROW_SIZE = 13500;
public static int MAX_XATTR_VALUE_ROW_SIZE = 29500;
public static final int MAX_XATTR_MAX_NUM_PARTS = 255;
public static final int MAX_XATTR_VALUE_SIZE =
MAX_XATTR_MAX_NUM_PARTS * MAX_XATTR_VALUE_ROW_SIZE;
Expand Down Expand Up @@ -116,11 +116,17 @@ public String toString() {

private final PrimaryKey primaryKey;
private final byte[] value;
private final short numParts;
private short oldNumParts = -1;
public StoredXAttr(long inodeId, byte namespace, String name, byte[] value) {

public StoredXAttr(long inodeId, byte namespace, String name, byte[] value, short num_parts) {
this.primaryKey = new PrimaryKey(inodeId, namespace, name);
this.value = value;
this.numParts = num_parts;
}

public StoredXAttr(long inodeId, byte namespace, String name, byte[] value) {
this(inodeId, namespace, name, value, getNumParts(value));
}

public long getInodeId() {
Expand Down Expand Up @@ -162,8 +168,9 @@ public final static String getXAttrString(byte[] val){
}

public short getNumParts(){
return getNumParts(value);
return numParts;
}

public byte[] getValue(short index) {
return getValue(value, index);
}
Expand Down