File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
hbase-client/src/main/java/org/apache/hadoop/hbase/client Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1078,6 +1078,10 @@ public ModifyableTableDescriptor setColumnFamily(final ColumnFamilyDescriptor fa
10781078 if (family .getName () == null || family .getName ().length <= 0 ) {
10791079 throw new IllegalArgumentException ("Family name cannot be null or empty" );
10801080 }
1081+ int flength = family .getName () == null ? 0 : family .getName ().length ;
1082+ if (flength > Byte .MAX_VALUE ) {
1083+ throw new IllegalArgumentException ("The length of family name is bigger than " + Byte .MAX_VALUE );
1084+ }
10811085 if (hasColumnFamily (family .getName ())) {
10821086 throw new IllegalArgumentException ("Family '"
10831087 + family .getNameAsString () + "' already exists so cannot be added" );
You can’t perform that action at this time.
0 commit comments