@Test
  public void testLengthIsSerialized() throws Exception {
    TableSplit split1 = new TableSplit(TableName.valueOf(name.getMethodName()),
      Bytes.toBytes("row-start"), Bytes.toBytes("row-end"), "location", 666);

    TableSplit deserialized = new TableSplit(TableName.valueOf(name.getMethodName()),
      Bytes.toBytes("row-start2"), Bytes.toBytes("row-end2"), "location1");
    ReflectionUtils.copy(new Configuration(), split1, deserialized);

    Assert.assertEquals(666, deserialized.getLength());
  }
Length of region need to be properly serialized.
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSplit.java