Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bookkeeper-proto/src/main/proto/BookkeeperProtocol.proto
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ message GetBookieInfoResponse {
required StatusCode status = 1;
optional int64 totalDiskCapacity = 2;
optional int64 freeDiskSpace = 3;
optional int32 journalIoUtil = 4;
optional int32 ledgerIoUtil = 5;
optional int32 cpuUsedRate = 6;
optional int64 writeBytePerSecond = 7;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we name it writeBytesPerSecond?

}

message GetListOfEntriesOfLedgerResponse {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/**
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/

package org.apache.bookkeeper.bookie;

public class BaseMetric {
int journalIoUtil;
int ledgerIoUtil;
int cpuUsedRate;
long writeBytePerSecond;

BaseMetric() {
journalIoUtil = -1;
ledgerIoUtil = -1;
cpuUsedRate = -1;
writeBytePerSecond = -1;
}

public int getJournalIoUtil() {
return journalIoUtil;
}

public void setJournalIoUtil(int journalIoUtil) {
this.journalIoUtil = journalIoUtil;
}

public int getLedgerIoUtil() {
return ledgerIoUtil;
}

public void setLedgerIoUtil(int ledgerIoUtil) {
this.ledgerIoUtil = ledgerIoUtil;
}

public int getCpuUsedRate() {
return cpuUsedRate;
}

public void setCpuUsedRate(int cpuUsedRate) {
this.cpuUsedRate = cpuUsedRate;
}

public long getWriteBytePerSecond() {
return writeBytePerSecond;
}

public void setWriteBytePerSecond(long writeBytePerSecond) {
this.writeBytePerSecond = writeBytePerSecond;
}

@Override
public String toString() {
return "BaseMetric{" +
"journalIoUtil=" + journalIoUtil +
", ledgerIoUtil=" + ledgerIoUtil +
", cpuUsedRate=" + cpuUsedRate +
", writeBytePerSecond=" + writeBytePerSecond +
'}';
}
}
Loading