@Test
  public void testSetMaxFileSize() throws HBaseException {
    TableDescriptorBuilder builder =
      TableDescriptorBuilder.newBuilder(TableName.valueOf(name.getMethodName()));

    String maxFileSize = "1073741824";
    builder.setMaxFileSize(maxFileSize);
    assertEquals(1073741824, builder.build().getMaxFileSize());

    maxFileSize = "1GB";
    builder.setMaxFileSize(maxFileSize);
    assertEquals(1073741824, builder.build().getMaxFileSize());

    maxFileSize = "10GB 25MB";
    builder.setMaxFileSize(maxFileSize);
    assertEquals(10763632640L, builder.build().getMaxFileSize());

    // ignore case
    maxFileSize = "10GB 512mb 512KB 512b";
    builder.setMaxFileSize(maxFileSize);
    assertEquals(11274813952L, builder.build().getMaxFileSize());

    maxFileSize = "10737942528 B (10GB 512KB)";
    builder.setMaxFileSize(maxFileSize);
    assertEquals(10737942528L, builder.build().getMaxFileSize());
  }
Test default value handling for maxFileSize
hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestTableDescriptorBuilder.java