File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/main/java/com/alipay/oceanbase/rpc/location/model Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2727import com .alipay .oceanbase .rpc .protocol .payload .impl .execute .ObFetchPartitionMetaResult ;
2828import com .alipay .oceanbase .rpc .protocol .payload .impl .execute .ObFetchPartitionMetaType ;
2929import com .alipay .oceanbase .rpc .table .ObTable ;
30+ import com .fasterxml .jackson .databind .SerializationFeature ;
3031import org .slf4j .Logger ;
3132
3233import java .util .Map ;
4344public class TableLocations {
4445 private static final Logger logger = getLogger (TableLocations .class );
4546 private static final ObjectMapper objectMapper = new ObjectMapper ();
47+ static {
48+ // FAIL_ON_EMPTY_BEANS means that whether throwing exception if there is no any serializable member with getter or setter in an object
49+ // considering partitionElements in range partDesc is a list of Comparable interface and Comparable has no getter and setter
50+ // we have to set this configuration as false because tableEntry may be serialized in debug log
51+ objectMapper .configure (SerializationFeature .FAIL_ON_EMPTY_BEANS , false );
52+ }
4653 private final ObTableClient tableClient ;
4754 private Map <String , Lock > metaRefreshingLocks = new ConcurrentHashMap <String , Lock >();
4855 private Map <String , Lock > locationBatchRefreshingLocks = new ConcurrentHashMap <String , Lock >();
You can’t perform that action at this time.
0 commit comments