Skip to content

KAFKA-2624: Change log message position#287

Closed
dopuskh3 wants to merge 1 commit into
apache:trunkfrom
dopuskh3:KAFKA-2624
Closed

KAFKA-2624: Change log message position#287
dopuskh3 wants to merge 1 commit into
apache:trunkfrom
dopuskh3:KAFKA-2624

Conversation

@dopuskh3

@dopuskh3 dopuskh3 commented Oct 8, 2015

Copy link
Copy Markdown
Contributor

Log warning message before truncating log in order to
display right offset value for the truncated log.

Log warning message before truncating log in order to
display right offset value for the truncated log.
@lindong28

Copy link
Copy Markdown
Member

Thanks. LGTM

@dopuskh3

Copy link
Copy Markdown
Contributor Author

Hi,

Can we close this MR ?

Thanks
Francois

@lindong28

Copy link
Copy Markdown
Member

@dopuskh3 Maybe you can ping a reviewer directly to review the patch.

@junrao

junrao commented Nov 14, 2015

Copy link
Copy Markdown
Contributor

Thanks for the patch. LGTM

@asfgit asfgit closed this in 356544c Nov 14, 2015
asfgit pushed a commit that referenced this pull request Nov 14, 2015
Log warning message before truncating log in order to
display right offset value for the truncated log.

Author: Francois Visconte <f.visconte@criteo.com>

Reviewers: Dong Lin <lindong28@gmail.com>, Jun Rao <junrao@gmail.com>

Closes #287 from dopuskh3/KAFKA-2624

(cherry picked from commit 356544c)
Signed-off-by: Jun Rao <junrao@gmail.com>
granders referenced this pull request in confluentinc/kafka Nov 18, 2015
Log warning message before truncating log in order to
display right offset value for the truncated log.

Author: Francois Visconte <f.visconte@criteo.com>

Reviewers: Dong Lin <lindong28@gmail.com>, Jun Rao <junrao@gmail.com>

Closes #287 from dopuskh3/KAFKA-2624
efeg added a commit to efeg/kafka that referenced this pull request Jan 29, 2020
wyuka pushed a commit to wyuka/kafka that referenced this pull request Mar 4, 2022
TICKET = KAFKA-7186
LI_DESCERIPTION =
This is a rewrite of the original PR apache#75.
In kafka 3.0, structs are removed, and requests can be serialized directly into ByteBuffers.
In vanilla kafka, the header and body are serialized directly into a single ByteBuffer inside the SendBuilder.

However, to reduce the memory footprint of UMRs, we would still want the ByteBufferSends
destined to different brokers to share the same body ByteBuffer. To achieve that, this PR modifies
the Java code generator so that the generated UpdateMetadataRequestData has the following
implementation for its write method

`
    private final ReentrantLock bodyBufferLock = new ReentrantLock();
    private ByteBuffer bodyBuffer = null;
    @OverRide
    public void write(Writable _writable, ObjectSerializationCache _cache, short _version) {
        bodyBufferLock.lock();
        try{
            if (bodyBuffer == null) {
                ObjectSerializationCache serializationCache = new ObjectSerializationCache();
                MessageSizeAccumulator messageSize = new MessageSizeAccumulator();
                addSize(messageSize, serializationCache, _version);
                bodyBuffer = ByteBuffer.allocate(messageSize.totalSize());
                doWrite(new ByteBufferAccessor(bodyBuffer), _cache, _version);
                bodyBuffer.flip();
            }
        } finally {
            bodyBufferLock.unlock();
        }
        _writable.writeByteBuffer(bodyBuffer);
    }
`

All other types of requests would end up with a write implementation as follows, which is
essentially the same as the vanilla implementation.
`
    @OverRide
    public void write(Writable _writable, ObjectSerializationCache _cache, short _version) {
        doWrite(_writable, _cache, _version);
    }

`

EXIT_CRITERIA = KAFKA-7186
wyuka pushed a commit to wyuka/kafka that referenced this pull request Mar 28, 2022
TICKET = KAFKA-7186
LI_DESCERIPTION =
This is a rewrite of the original PR apache#75.
In kafka 3.0, structs are removed, and requests can be serialized directly into ByteBuffers.
In vanilla kafka, the header and body are serialized directly into a single ByteBuffer inside the SendBuilder.

However, to reduce the memory footprint of UMRs, we would still want the ByteBufferSends
destined to different brokers to share the same body ByteBuffer. To achieve that, this PR modifies
the Java code generator so that the generated UpdateMetadataRequestData has the following
implementation for its write method

`
    private final ReentrantLock bodyBufferLock = new ReentrantLock();
    private ByteBuffer bodyBuffer = null;
    @OverRide
    public void write(Writable _writable, ObjectSerializationCache _cache, short _version) {
        bodyBufferLock.lock();
        try{
            if (bodyBuffer == null) {
                ObjectSerializationCache serializationCache = new ObjectSerializationCache();
                MessageSizeAccumulator messageSize = new MessageSizeAccumulator();
                addSize(messageSize, serializationCache, _version);
                bodyBuffer = ByteBuffer.allocate(messageSize.totalSize());
                doWrite(new ByteBufferAccessor(bodyBuffer), _cache, _version);
                bodyBuffer.flip();
            }
        } finally {
            bodyBufferLock.unlock();
        }
        _writable.writeByteBuffer(bodyBuffer);
    }
`

All other types of requests would end up with a write implementation as follows, which is
essentially the same as the vanilla implementation.
`
    @OverRide
    public void write(Writable _writable, ObjectSerializationCache _cache, short _version) {
        doWrite(_writable, _cache, _version);
    }

`

EXIT_CRITERIA = KAFKA-7186
wyuka pushed a commit to wyuka/kafka that referenced this pull request Jun 16, 2022
TICKET = KAFKA-7186
LI_DESCERIPTION =
This is a rewrite of the original PR apache#75.
In kafka 3.0, structs are removed, and requests can be serialized directly into ByteBuffers.
In vanilla kafka, the header and body are serialized directly into a single ByteBuffer inside the SendBuilder.

However, to reduce the memory footprint of UMRs, we would still want the ByteBufferSends
destined to different brokers to share the same body ByteBuffer. To achieve that, this PR modifies
the Java code generator so that the generated UpdateMetadataRequestData has the following
implementation for its write method

`
    private final ReentrantLock bodyBufferLock = new ReentrantLock();
    private ByteBuffer bodyBuffer = null;
    @OverRide
    public void write(Writable _writable, ObjectSerializationCache _cache, short _version) {
        bodyBufferLock.lock();
        try{
            if (bodyBuffer == null) {
                ObjectSerializationCache serializationCache = new ObjectSerializationCache();
                MessageSizeAccumulator messageSize = new MessageSizeAccumulator();
                addSize(messageSize, serializationCache, _version);
                bodyBuffer = ByteBuffer.allocate(messageSize.totalSize());
                doWrite(new ByteBufferAccessor(bodyBuffer), _cache, _version);
                bodyBuffer.flip();
            }
        } finally {
            bodyBufferLock.unlock();
        }
        _writable.writeByteBuffer(bodyBuffer);
    }
`

All other types of requests would end up with a write implementation as follows, which is
essentially the same as the vanilla implementation.
`
    @OverRide
    public void write(Writable _writable, ObjectSerializationCache _cache, short _version) {
        doWrite(_writable, _cache, _version);
    }

`

EXIT_CRITERIA = KAFKA-7186
davide-armand pushed a commit to aiven/kafka that referenced this pull request Dec 1, 2025
jeqo added a commit to aiven/kafka that referenced this pull request Jan 16, 2026
traceyyoshima added a commit to traceyyoshima/kafka that referenced this pull request May 22, 2026
Single bulk apply of the Language Engine's IntelliJ-style format
profile across the kafka source tree. Pairs with the IntelliJ-real
control branch `intellij-formatting` for side-by-side comparison.

Engine state at apply time includes the following format fixes
landed against the language-engine repo:

  Pre-PR #11:
  - PR apache#275 multi-line // comment indent group
  - PR apache#276 BLANK_LINES_AROUND_CLASS + sibling no-op repair
  - PR apache#277 string-concat chain anchor preservation
  - PR apache#279 forward style through apply routes
  - PR apache#281 Result-tab line-number alignment
  - PR apache#282 spaces after return / throw / yield / instanceof
  - PR apache#283 chain-dot postfix preservation
  - PR apache#284 BlankLines sibling minimum.* conversion
  - PR apache#285 chain-dot single-anchor (N=1) preservation
  - PR apache#286 string-concat chain partial-cascade fix
  - PR apache#287 method-decl param re-align for misaligned source
  - PR apache#288 annotation-in-array-init indent

  Post-original-PR #11 (new in this re-apply):
  - PR apache#289 partial-cascade post-rewrite-anchor (4 shape fixes:
    chain-dot postfix follow-on, MI/NewClass close-paren cascade,
    ternary continuation, lambda body continuation)

Stats: 3101 files written, 0 failures, 2678 already-idempotent
files skipped (no_change). Corpus byte delta vs trunk: -510 bytes
(106275 insertions / 106785 deletions).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants