ChineseTony commented on PR #10287:
URL: https://github.com/apache/rocketmq/pull/10287#issuecomment-4394891216
thanks review,I think shoud add getPullOffsetTable method and transient
this feild
`
public static void main( String[] args ) {
ConsumerOffsetManager consumerOffsetManager = new
ConsumerOffsetManager();
String consumerOffsetManagerJson =
JSON.toJSONString(consumerOffsetManager);
System.out.println(consumerOffsetManagerJson);
ConsumerOffsetSerializeWrapper consumerOffsetSerializeWrapper = new
ConsumerOffsetSerializeWrapper();
String consumerOffsetSerializeWrapperJson =
JSON.toJSONString(consumerOffsetSerializeWrapper);
System.out.println(consumerOffsetSerializeWrapperJson);
// {"offsetTable":{},"pullOffsetTable":{}}
// {"offsetTable":{}}
}
static class ConsumerOffsetManager{
protected ConcurrentMap<String/* topic@group */,
ConcurrentMap<Integer, Long>> offsetTable =
new ConcurrentHashMap<>(512);
protected final ConcurrentMap<String, ConcurrentMap<Integer, Long>>
resetOffsetTable =
new ConcurrentHashMap<>(512);
private final ConcurrentMap<String/* topic@group */,
ConcurrentMap<Integer, Long>> pullOffsetTable =
new ConcurrentHashMap<>(512);
public ConcurrentMap<String/* topic@group */, ConcurrentMap<Integer,
Long>> getOffsetTable() {
return offsetTable;
}
public void setOffsetTable(ConcurrentMap<String/* topic@group */,
ConcurrentMap<Integer, Long>> offsetTable) {
this.offsetTable = offsetTable;
}
public ConcurrentMap<String/* topic@group */, ConcurrentMap<Integer,
Long>> getPullOffsetTable() {
return pullOffsetTable;
}
}
static class ConsumerOffsetSerializeWrapper{
protected ConcurrentMap<String/* topic@group */,
ConcurrentMap<Integer, Long>> offsetTable =
new ConcurrentHashMap<>(512);
protected final ConcurrentMap<String, ConcurrentMap<Integer, Long>>
resetOffsetTable =
new ConcurrentHashMap<>(512);
public ConcurrentMap<String/* topic@group */, ConcurrentMap<Integer,
Long>> getOffsetTable() {
return offsetTable;
}
public void setOffsetTable(ConcurrentMap<String/* topic@group */,
ConcurrentMap<Integer, Long>> offsetTable) {
this.offsetTable = offsetTable;
}
}
`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]