HBASE-25421 There is no limit on the column length when creating a table (#2796)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
e099ef349b
commit
a4eb1aaf77
|
@ -1078,6 +1078,10 @@ public class TableDescriptorBuilder {
|
|||
if (family.getName() == null || family.getName().length <= 0) {
|
||||
throw new IllegalArgumentException("Family name cannot be null or empty");
|
||||
}
|
||||
int flength = family.getName() == null ? 0 : family.getName().length;
|
||||
if (flength > Byte.MAX_VALUE) {
|
||||
throw new IllegalArgumentException("The length of family name is bigger than " + Byte.MAX_VALUE);
|
||||
}
|
||||
if (hasColumnFamily(family.getName())) {
|
||||
throw new IllegalArgumentException("Family '"
|
||||
+ family.getNameAsString() + "' already exists so cannot be added");
|
||||
|
|
Loading…
Reference in New Issue