Skip to content
Merged
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
18 changes: 9 additions & 9 deletions src/main/java/org/csource/fastdfs/StructStorageStat.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class StructStorageStat extends StructBase {
protected static final int FIELD_INDEX_ID = 1;
protected static final int FIELD_INDEX_IP_ADDR = 2;
protected static final int FIELD_INDEX_DOMAIN_NAME = 3;
protected static final int FIELD_INDEX_SRC_IP_ADDR = 4;
protected static final int FIELD_INDEX_SRC_ID = 4;
protected static final int FIELD_INDEX_VERSION = 5;
protected static final int FIELD_INDEX_JOIN_TIME = 6;
protected static final int FIELD_INDEX_UP_TIME = 7;
Expand Down Expand Up @@ -100,8 +100,8 @@ public class StructStorageStat extends StructBase {
fieldsArray[FIELD_INDEX_DOMAIN_NAME] = new StructBase.FieldInfo("domainName", offset, ProtoCommon.FDFS_DOMAIN_NAME_MAX_SIZE);
offset += ProtoCommon.FDFS_DOMAIN_NAME_MAX_SIZE;

fieldsArray[FIELD_INDEX_SRC_IP_ADDR] = new StructBase.FieldInfo("srcIpAddr", offset, ProtoCommon.FDFS_IPADDR_SIZE);
offset += ProtoCommon.FDFS_IPADDR_SIZE;
fieldsArray[FIELD_INDEX_SRC_ID] = new StructBase.FieldInfo("srcId", offset, ProtoCommon.FDFS_STORAGE_ID_MAX_SIZE);
offset += ProtoCommon.FDFS_STORAGE_ID_MAX_SIZE;

fieldsArray[FIELD_INDEX_VERSION] = new StructBase.FieldInfo("version", offset, ProtoCommon.FDFS_VERSION_SIZE);
offset += ProtoCommon.FDFS_VERSION_SIZE;
Expand Down Expand Up @@ -280,7 +280,7 @@ public class StructStorageStat extends StructBase {
protected byte status;
protected String id;
protected String ipAddr;
protected String srcIpAddr;
protected String srcId;
protected String domainName; //http domain name
protected String version;
protected long totalMB; //total disk storage in MB
Expand Down Expand Up @@ -377,12 +377,12 @@ public String getIpAddr() {
}

/**
* get source storage ip address
* get source storage id
*
* @return source storage ip address
* @return source storage id
*/
public String getSrcIpAddr() {
return this.srcIpAddr;
public String getSrcId() {
return this.srcId;
}

/**
Expand Down Expand Up @@ -917,7 +917,7 @@ public void setFields(byte[] bs, int offset) {
this.status = byteValue(bs, offset, fieldsArray[FIELD_INDEX_STATUS]);
this.id = stringValue(bs, offset, fieldsArray[FIELD_INDEX_ID]);
this.ipAddr = stringValue(bs, offset, fieldsArray[FIELD_INDEX_IP_ADDR]);
this.srcIpAddr = stringValue(bs, offset, fieldsArray[FIELD_INDEX_SRC_IP_ADDR]);
this.srcId = stringValue(bs, offset, fieldsArray[FIELD_INDEX_SRC_ID]);
this.domainName = stringValue(bs, offset, fieldsArray[FIELD_INDEX_DOMAIN_NAME]);
this.version = stringValue(bs, offset, fieldsArray[FIELD_INDEX_VERSION]);
this.totalMB = longValue(bs, offset, fieldsArray[FIELD_INDEX_TOTAL_MB]);
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/csource/fastdfs/Monitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static void main(String args[]) {
System.out.println("\t\tstorage_port = " + storageStat.getStoragePort());
System.out.println("\t\tstorage_http_port = " + storageStat.getStorageHttpPort());
System.out.println("\t\tcurrent_write_path = " + storageStat.getCurrentWritePath());
System.out.println("\t\tsource ip_addr = " + storageStat.getSrcIpAddr());
System.out.println("\t\tsource ip_id = " + storageStat.getSrcId());
System.out.println("\t\tif_trunk_server = " + storageStat.isTrunkServer());
System.out.println("\t\tconntion.alloc_count = " + storageStat.getConnectionAllocCount());
System.out.println("\t\tconntion.current_count = " + storageStat.getConnectionCurrentCount());
Expand Down