diff --git a/HISTORY b/HISTORY
index dfd20a5..c3b7f9b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,5 +1,9 @@
-Version 1.33 2024-07-21
+Version 1.34 2025-08-28
+ * adapt to FastDFS server V6.13 for read-write separation
+ you must upgrade your FastDFS server V6.13 and higher version
+
+Version 1.33 2025-07-21
* protocol automatically compatible with IPv4/IPv6 address
this version for FastDFS server V6.06 and higher version
diff --git a/pom.xml b/pom.xml
index ec93418..b960637 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.csource
fastdfs-client-java
- 1.33-SNAPSHOT
+ 1.34-SNAPSHOT
fastdfs-client-java
fastdfs client for java
jar
diff --git a/src/main/java/org/csource/fastdfs/ProtoCommon.java b/src/main/java/org/csource/fastdfs/ProtoCommon.java
index 9d90b5c..b0e27db 100644
--- a/src/main/java/org/csource/fastdfs/ProtoCommon.java
+++ b/src/main/java/org/csource/fastdfs/ProtoCommon.java
@@ -75,7 +75,6 @@ public class ProtoCommon {
public static final int FDFS_GROUP_NAME_MAX_LEN = 16;
public static final int FDFS_IPV4_SIZE = 16;
public static final int FDFS_IPV6_SIZE = 46;
- public static final int FDFS_DOMAIN_NAME_MAX_SIZE = 128;
public static final int FDFS_OLD_VERSION_SIZE = 6;
public static final int FDFS_NEW_VERSION_SIZE = 8;
public static final int FDFS_STORAGE_ID_MAX_SIZE = 16;
@@ -109,6 +108,12 @@ public class ProtoCommon {
protected static final int PROTO_HEADER_CMD_INDEX = FDFS_PROTO_PKG_LEN_SIZE;
protected static final int PROTO_HEADER_STATUS_INDEX = FDFS_PROTO_PKG_LEN_SIZE + 1;
+ //read write mode
+ public static final byte FDFS_RW_MODE_NONE = 0;
+ public static final byte FDFS_RW_MODE_READONLY = 4;
+ public static final byte FDFS_RW_MODE_WRITEONLY = 2;
+ public static final byte FDFS_RW_MODE_BOTH = FDFS_RW_MODE_READONLY + FDFS_RW_MODE_WRITEONLY;
+
private ProtoCommon() {
}
diff --git a/src/main/java/org/csource/fastdfs/StructGroupStat.java b/src/main/java/org/csource/fastdfs/StructGroupStat.java
index f291c49..3c5cd35 100644
--- a/src/main/java/org/csource/fastdfs/StructGroupStat.java
+++ b/src/main/java/org/csource/fastdfs/StructGroupStat.java
@@ -12,7 +12,7 @@ package org.csource.fastdfs;
* C struct body decoder
*
* @author Happy Fish / YuQing
- * @version Version 1.18
+ * @version Version 1.34
*/
public class StructGroupStat extends StructBase {
protected static final int FIELD_INDEX_GROUP_NAME = 0;
@@ -21,8 +21,8 @@ public class StructGroupStat extends StructBase {
protected static final int FIELD_INDEX_TRUNK_FREE_MB = 3;
protected static final int FIELD_INDEX_STORAGE_COUNT = 4;
protected static final int FIELD_INDEX_STORAGE_PORT = 5;
- protected static final int FIELD_INDEX_STORAGE_HTTP_PORT = 6;
- protected static final int FIELD_INDEX_ACTIVE_COUNT = 7;
+ protected static final int FIELD_INDEX_READABLE_SERVER_COUNT = 6;
+ protected static final int FIELD_INDEX_WRITABLE_SERVER_COUNT = 7;
protected static final int FIELD_INDEX_CURRENT_WRITE_SERVER = 8;
protected static final int FIELD_INDEX_STORE_PATH_COUNT = 9;
protected static final int FIELD_INDEX_SUBDIR_COUNT_PER_PATH = 10;
@@ -33,40 +33,52 @@ public class StructGroupStat extends StructBase {
static {
int offset = 0;
- fieldsArray[FIELD_INDEX_GROUP_NAME] = new StructBase.FieldInfo("groupName", offset, ProtoCommon.FDFS_GROUP_NAME_MAX_LEN + 1);
+ fieldsArray[FIELD_INDEX_GROUP_NAME] = new StructBase.FieldInfo(
+ "groupName", offset, ProtoCommon.FDFS_GROUP_NAME_MAX_LEN + 1);
offset += ProtoCommon.FDFS_GROUP_NAME_MAX_LEN + 1;
- fieldsArray[FIELD_INDEX_TOTAL_MB] = new StructBase.FieldInfo("totalMB", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ fieldsArray[FIELD_INDEX_TOTAL_MB] = new StructBase.FieldInfo(
+ "totalMB", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_FREE_MB] = new StructBase.FieldInfo("freeMB", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ fieldsArray[FIELD_INDEX_FREE_MB] = new StructBase.FieldInfo(
+ "freeMB", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TRUNK_FREE_MB] = new StructBase.FieldInfo("trunkFreeMB", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ fieldsArray[FIELD_INDEX_TRUNK_FREE_MB] = new StructBase.FieldInfo(
+ "trunkFreeMB", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_STORAGE_COUNT] = new StructBase.FieldInfo("storageCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ fieldsArray[FIELD_INDEX_STORAGE_COUNT] = new StructBase.FieldInfo(
+ "storageCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_STORAGE_PORT] = new StructBase.FieldInfo("storagePort", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ fieldsArray[FIELD_INDEX_STORAGE_PORT] = new StructBase.FieldInfo(
+ "storagePort", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_STORAGE_HTTP_PORT] = new StructBase.FieldInfo("storageHttpPort", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ fieldsArray[FIELD_INDEX_READABLE_SERVER_COUNT] = new StructBase.FieldInfo(
+ "readableServerCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_ACTIVE_COUNT] = new StructBase.FieldInfo("activeCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ fieldsArray[FIELD_INDEX_WRITABLE_SERVER_COUNT] = new StructBase.FieldInfo(
+ "writableServerCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_CURRENT_WRITE_SERVER] = new StructBase.FieldInfo("currentWriteServer", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ fieldsArray[FIELD_INDEX_CURRENT_WRITE_SERVER] = new StructBase.FieldInfo(
+ "currentWriteServer", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_STORE_PATH_COUNT] = new StructBase.FieldInfo("storePathCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ fieldsArray[FIELD_INDEX_STORE_PATH_COUNT] = new StructBase.FieldInfo(
+ "storePathCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUBDIR_COUNT_PER_PATH] = new StructBase.FieldInfo("subdirCountPerPath", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ fieldsArray[FIELD_INDEX_SUBDIR_COUNT_PER_PATH] = new StructBase.FieldInfo(
+ "subdirCountPerPath", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_CURRENT_TRUNK_FILE_ID] = new StructBase.FieldInfo("currentTrunkFileId", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ fieldsArray[FIELD_INDEX_CURRENT_TRUNK_FILE_ID] = new StructBase.FieldInfo(
+ "currentTrunkFileId", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
fieldsTotalSize = offset;
@@ -78,8 +90,8 @@ public class StructGroupStat extends StructBase {
protected long trunkFreeMB; //trunk free space in MB
protected int storageCount; //storage server count
protected int storagePort; //storage server port
- protected int storageHttpPort; //storage server HTTP port
- protected int activeCount; //active storage server count
+ protected int readableServerCount; //readable storage server count
+ protected int writableServerCount; //writable storage server count
protected int currentWriteServer; //current storage server index to upload file
protected int storePathCount; //store base path count of each storage server
protected int subdirCountPerPath; //sub dir count per store path
@@ -139,13 +151,22 @@ public class StructGroupStat extends StructBase {
return this.storageCount;
}
+ /**
+ * get readable storage server count
+ *
+ * @return readable storage server count
+ */
+ public int getReadableServerCount() {
+ return this.readableServerCount;
+ }
+
/**
* get active storage server count in this group
*
* @return active storage server count in this group
*/
- public int getActiveCount() {
- return this.activeCount;
+ public int getWritableServerCount() {
+ return this.writableServerCount;
}
/**
@@ -157,15 +178,6 @@ public class StructGroupStat extends StructBase {
return this.storagePort;
}
- /**
- * get storage server HTTP port
- *
- * @return storage server HTTP port
- */
- public int getStorageHttpPort() {
- return this.storageHttpPort;
- }
-
/**
* get current storage server index to upload file
*
@@ -215,8 +227,8 @@ public class StructGroupStat extends StructBase {
this.trunkFreeMB = longValue(bs, offset, fieldsArray[FIELD_INDEX_TRUNK_FREE_MB]);
this.storageCount = intValue(bs, offset, fieldsArray[FIELD_INDEX_STORAGE_COUNT]);
this.storagePort = intValue(bs, offset, fieldsArray[FIELD_INDEX_STORAGE_PORT]);
- this.storageHttpPort = intValue(bs, offset, fieldsArray[FIELD_INDEX_STORAGE_HTTP_PORT]);
- this.activeCount = intValue(bs, offset, fieldsArray[FIELD_INDEX_ACTIVE_COUNT]);
+ this.readableServerCount = intValue(bs, offset, fieldsArray[FIELD_INDEX_READABLE_SERVER_COUNT]);
+ this.writableServerCount = intValue(bs, offset, fieldsArray[FIELD_INDEX_WRITABLE_SERVER_COUNT]);
this.currentWriteServer = intValue(bs, offset, fieldsArray[FIELD_INDEX_CURRENT_WRITE_SERVER]);
this.storePathCount = intValue(bs, offset, fieldsArray[FIELD_INDEX_STORE_PATH_COUNT]);
this.subdirCountPerPath = intValue(bs, offset, fieldsArray[FIELD_INDEX_SUBDIR_COUNT_PER_PATH]);
diff --git a/src/main/java/org/csource/fastdfs/StructStorageStat.java b/src/main/java/org/csource/fastdfs/StructStorageStat.java
index 7693921..55b6857 100644
--- a/src/main/java/org/csource/fastdfs/StructStorageStat.java
+++ b/src/main/java/org/csource/fastdfs/StructStorageStat.java
@@ -14,13 +14,13 @@ import java.util.Date;
* C struct body decoder
*
* @author Happy Fish / YuQing
- * @version Version 1.33
+ * @version Version 1.34
*/
public class StructStorageStat extends StructBase {
protected static final int FIELD_INDEX_STATUS = 0;
- 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_RW_MODE = 1;
+ protected static final int FIELD_INDEX_ID = 2;
+ protected static final int FIELD_INDEX_IP_ADDR = 3;
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;
@@ -32,255 +32,314 @@ public class StructStorageStat extends StructBase {
protected static final int FIELD_INDEX_SUBDIR_COUNT_PER_PATH = 12;
protected static final int FIELD_INDEX_CURRENT_WRITE_PATH = 13;
protected static final int FIELD_INDEX_STORAGE_PORT = 14;
- protected static final int FIELD_INDEX_STORAGE_HTTP_PORT = 15;
-
- protected static final int FIELD_INDEX_CONNECTION_ALLOC_COUNT = 16;
- protected static final int FIELD_INDEX_CONNECTION_CURRENT_COUNT = 17;
- protected static final int FIELD_INDEX_CONNECTION_MAX_COUNT = 18;
-
- protected static final int FIELD_INDEX_TOTAL_UPLOAD_COUNT = 19;
- protected static final int FIELD_INDEX_SUCCESS_UPLOAD_COUNT = 20;
- protected static final int FIELD_INDEX_TOTAL_APPEND_COUNT = 21;
- protected static final int FIELD_INDEX_SUCCESS_APPEND_COUNT = 22;
- protected static final int FIELD_INDEX_TOTAL_MODIFY_COUNT = 23;
- protected static final int FIELD_INDEX_SUCCESS_MODIFY_COUNT = 24;
- protected static final int FIELD_INDEX_TOTAL_TRUNCATE_COUNT = 25;
- protected static final int FIELD_INDEX_SUCCESS_TRUNCATE_COUNT = 26;
- protected static final int FIELD_INDEX_TOTAL_SET_META_COUNT = 27;
- protected static final int FIELD_INDEX_SUCCESS_SET_META_COUNT = 28;
- protected static final int FIELD_INDEX_TOTAL_DELETE_COUNT = 29;
- protected static final int FIELD_INDEX_SUCCESS_DELETE_COUNT = 30;
- protected static final int FIELD_INDEX_TOTAL_DOWNLOAD_COUNT = 31;
- protected static final int FIELD_INDEX_SUCCESS_DOWNLOAD_COUNT = 32;
- protected static final int FIELD_INDEX_TOTAL_GET_META_COUNT = 33;
- protected static final int FIELD_INDEX_SUCCESS_GET_META_COUNT = 34;
- protected static final int FIELD_INDEX_TOTAL_CREATE_LINK_COUNT = 35;
- protected static final int FIELD_INDEX_SUCCESS_CREATE_LINK_COUNT = 36;
- protected static final int FIELD_INDEX_TOTAL_DELETE_LINK_COUNT = 37;
- protected static final int FIELD_INDEX_SUCCESS_DELETE_LINK_COUNT = 38;
- protected static final int FIELD_INDEX_TOTAL_UPLOAD_BYTES = 39;
- protected static final int FIELD_INDEX_SUCCESS_UPLOAD_BYTES = 40;
- protected static final int FIELD_INDEX_TOTAL_APPEND_BYTES = 41;
- protected static final int FIELD_INDEX_SUCCESS_APPEND_BYTES = 42;
- protected static final int FIELD_INDEX_TOTAL_MODIFY_BYTES = 43;
- protected static final int FIELD_INDEX_SUCCESS_MODIFY_BYTES = 44;
- protected static final int FIELD_INDEX_TOTAL_DOWNLOAD_BYTES = 45;
- protected static final int FIELD_INDEX_SUCCESS_DOWNLOAD_BYTES = 46;
- protected static final int FIELD_INDEX_TOTAL_SYNC_IN_BYTES = 47;
- protected static final int FIELD_INDEX_SUCCESS_SYNC_IN_BYTES = 48;
- protected static final int FIELD_INDEX_TOTAL_SYNC_OUT_BYTES = 49;
- protected static final int FIELD_INDEX_SUCCESS_SYNC_OUT_BYTES = 50;
- protected static final int FIELD_INDEX_TOTAL_FILE_OPEN_COUNT = 51;
- protected static final int FIELD_INDEX_SUCCESS_FILE_OPEN_COUNT = 52;
- protected static final int FIELD_INDEX_TOTAL_FILE_READ_COUNT = 53;
- protected static final int FIELD_INDEX_SUCCESS_FILE_READ_COUNT = 54;
- protected static final int FIELD_INDEX_TOTAL_FILE_WRITE_COUNT = 55;
- protected static final int FIELD_INDEX_SUCCESS_FILE_WRITE_COUNT = 56;
- protected static final int FIELD_INDEX_LAST_SOURCE_UPDATE = 57;
- protected static final int FIELD_INDEX_LAST_SYNC_UPDATE = 58;
- protected static final int FIELD_INDEX_LAST_SYNCED_TIMESTAMP = 59;
- protected static final int FIELD_INDEX_LAST_HEART_BEAT_TIME = 60;
- protected static final int FIELD_INDEX_IF_TRUNK_FILE = 61;
-
- protected static final int FIELD_COUNT = 62;
-
- protected static int initFieldsArray(StructBase.FieldInfo[] fieldsArray, int ipaddr_size, int version_size) {
- int offset = 0;
- fieldsArray[FIELD_INDEX_STATUS] = new StructBase.FieldInfo("status", offset, 1);
- offset += 1;
+ protected static final int FIELD_INDEX_CONNECTION_ALLOC_COUNT = 15;
+ protected static final int FIELD_INDEX_CONNECTION_CURRENT_COUNT = 16;
+ protected static final int FIELD_INDEX_CONNECTION_MAX_COUNT = 17;
+
+ protected static final int FIELD_INDEX_TOTAL_UPLOAD_COUNT = 18;
+ protected static final int FIELD_INDEX_SUCCESS_UPLOAD_COUNT = 19;
+ protected static final int FIELD_INDEX_TOTAL_APPEND_COUNT = 20;
+ protected static final int FIELD_INDEX_SUCCESS_APPEND_COUNT = 21;
+ protected static final int FIELD_INDEX_TOTAL_MODIFY_COUNT = 22;
+ protected static final int FIELD_INDEX_SUCCESS_MODIFY_COUNT = 23;
+ protected static final int FIELD_INDEX_TOTAL_TRUNCATE_COUNT = 24;
+ protected static final int FIELD_INDEX_SUCCESS_TRUNCATE_COUNT = 25;
+ protected static final int FIELD_INDEX_TOTAL_SET_META_COUNT = 26;
+ protected static final int FIELD_INDEX_SUCCESS_SET_META_COUNT = 27;
+ protected static final int FIELD_INDEX_TOTAL_DELETE_COUNT = 28;
+ protected static final int FIELD_INDEX_SUCCESS_DELETE_COUNT = 29;
+ protected static final int FIELD_INDEX_TOTAL_DOWNLOAD_COUNT = 30;
+ protected static final int FIELD_INDEX_SUCCESS_DOWNLOAD_COUNT = 31;
+ protected static final int FIELD_INDEX_TOTAL_GET_META_COUNT = 32;
+ protected static final int FIELD_INDEX_SUCCESS_GET_META_COUNT = 33;
+ protected static final int FIELD_INDEX_TOTAL_CREATE_LINK_COUNT = 34;
+ protected static final int FIELD_INDEX_SUCCESS_CREATE_LINK_COUNT = 35;
+ protected static final int FIELD_INDEX_TOTAL_DELETE_LINK_COUNT = 36;
+ protected static final int FIELD_INDEX_SUCCESS_DELETE_LINK_COUNT = 37;
+ protected static final int FIELD_INDEX_TOTAL_UPLOAD_BYTES = 38;
+ protected static final int FIELD_INDEX_SUCCESS_UPLOAD_BYTES = 39;
+ protected static final int FIELD_INDEX_TOTAL_APPEND_BYTES = 40;
+ protected static final int FIELD_INDEX_SUCCESS_APPEND_BYTES = 41;
+ protected static final int FIELD_INDEX_TOTAL_MODIFY_BYTES = 42;
+ protected static final int FIELD_INDEX_SUCCESS_MODIFY_BYTES = 43;
+ protected static final int FIELD_INDEX_TOTAL_DOWNLOAD_BYTES = 44;
+ protected static final int FIELD_INDEX_SUCCESS_DOWNLOAD_BYTES = 45;
+ protected static final int FIELD_INDEX_TOTAL_SYNC_IN_BYTES = 46;
+ protected static final int FIELD_INDEX_SUCCESS_SYNC_IN_BYTES = 47;
+ protected static final int FIELD_INDEX_TOTAL_SYNC_OUT_BYTES = 48;
+ protected static final int FIELD_INDEX_SUCCESS_SYNC_OUT_BYTES = 49;
+ protected static final int FIELD_INDEX_TOTAL_FILE_OPEN_COUNT = 50;
+ protected static final int FIELD_INDEX_SUCCESS_FILE_OPEN_COUNT = 51;
+ protected static final int FIELD_INDEX_TOTAL_FILE_READ_COUNT = 52;
+ protected static final int FIELD_INDEX_SUCCESS_FILE_READ_COUNT = 53;
+ protected static final int FIELD_INDEX_TOTAL_FILE_WRITE_COUNT = 54;
+ protected static final int FIELD_INDEX_SUCCESS_FILE_WRITE_COUNT = 55;
+ protected static final int FIELD_INDEX_LAST_SOURCE_UPDATE = 56;
+ protected static final int FIELD_INDEX_LAST_SYNC_UPDATE = 57;
+ protected static final int FIELD_INDEX_LAST_SYNCED_TIMESTAMP = 58;
+ protected static final int FIELD_INDEX_LAST_HEART_BEAT_TIME = 59;
+ protected static final int FIELD_INDEX_IF_TRUNK_FILE = 60;
+
+ protected static final int FIELD_COUNT = 61;
+
+ protected static int initFieldsArray(StructBase.FieldInfo[] fieldsArray,
+ int ipaddr_size, int version_size)
+ {
+ int offset = 0;
+
+ fieldsArray[FIELD_INDEX_STATUS] = new StructBase.FieldInfo(
+ "status", offset, 1);
+ offset += 1;
+
+ fieldsArray[FIELD_INDEX_RW_MODE] = new StructBase.FieldInfo(
+ "readWriteMode", offset, 1);
+ offset += 1;
+
+ fieldsArray[FIELD_INDEX_ID] = new StructBase.FieldInfo(
+ "id", offset, ProtoCommon.FDFS_STORAGE_ID_MAX_SIZE);
+ offset += ProtoCommon.FDFS_STORAGE_ID_MAX_SIZE;
+
+ fieldsArray[FIELD_INDEX_IP_ADDR] = new StructBase.FieldInfo(
+ "ipAddr", offset, ipaddr_size);
+ offset += 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, version_size);
+ offset += version_size;
+
+ fieldsArray[FIELD_INDEX_JOIN_TIME] = new StructBase.FieldInfo(
+ "joinTime", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_UP_TIME] = new StructBase.FieldInfo(
+ "upTime", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_TOTAL_MB] = new StructBase.FieldInfo(
+ "totalMB", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_FREE_MB] = new StructBase.FieldInfo(
+ "freeMB", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_UPLOAD_PRIORITY] = new StructBase.FieldInfo(
+ "uploadPriority", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_STORE_PATH_COUNT] = new StructBase.FieldInfo(
+ "storePathCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_SUBDIR_COUNT_PER_PATH] = new StructBase.FieldInfo(
+ "subdirCountPerPath", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_CURRENT_WRITE_PATH] = new StructBase.FieldInfo(
+ "currentWritePath", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_STORAGE_PORT] = new StructBase.FieldInfo(
+ "storagePort", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_CONNECTION_ALLOC_COUNT] = new StructBase.FieldInfo(
+ "connectionAllocCount", offset, 4);
+ offset += 4;
+
+ fieldsArray[FIELD_INDEX_CONNECTION_CURRENT_COUNT] = new StructBase.FieldInfo(
+ "connectionCurrentCount", offset, 4);
+ offset += 4;
+
+ fieldsArray[FIELD_INDEX_CONNECTION_MAX_COUNT] = new StructBase.FieldInfo(
+ "connectionMaxCount", offset, 4);
+ offset += 4;
+
+ fieldsArray[FIELD_INDEX_TOTAL_UPLOAD_COUNT] = new StructBase.FieldInfo(
+ "totalUploadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_SUCCESS_UPLOAD_COUNT] = new StructBase.FieldInfo(
+ "successUploadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_TOTAL_APPEND_COUNT] = new StructBase.FieldInfo(
+ "totalAppendCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+
+ fieldsArray[FIELD_INDEX_SUCCESS_APPEND_COUNT] = new StructBase.FieldInfo(
+ "successAppendCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_ID] = new StructBase.FieldInfo("id", offset, ProtoCommon.FDFS_STORAGE_ID_MAX_SIZE);
- offset += ProtoCommon.FDFS_STORAGE_ID_MAX_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_MODIFY_COUNT] = new StructBase.FieldInfo(
+ "totalModifyCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_IP_ADDR] = new StructBase.FieldInfo("ipAddr", offset, ipaddr_size);
- offset += ipaddr_size;
+ fieldsArray[FIELD_INDEX_SUCCESS_MODIFY_COUNT] = new StructBase.FieldInfo(
+ "successModifyCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- 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_TOTAL_TRUNCATE_COUNT] = new StructBase.FieldInfo(
+ "totalTruncateCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_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_SUCCESS_TRUNCATE_COUNT] = new StructBase.FieldInfo(
+ "successTruncateCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_VERSION] = new StructBase.FieldInfo("version", offset, version_size);
- offset += version_size;
+ fieldsArray[FIELD_INDEX_TOTAL_SET_META_COUNT] = new StructBase.FieldInfo(
+ "totalSetMetaCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_JOIN_TIME] = new StructBase.FieldInfo("joinTime", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_SET_META_COUNT] = new StructBase.FieldInfo(
+ "successSetMetaCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_UP_TIME] = new StructBase.FieldInfo("upTime", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_DELETE_COUNT] = new StructBase.FieldInfo(
+ "totalDeleteCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_MB] = new StructBase.FieldInfo("totalMB", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_DELETE_COUNT] = new StructBase.FieldInfo(
+ "successDeleteCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_FREE_MB] = new StructBase.FieldInfo("freeMB", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_DOWNLOAD_COUNT] = new StructBase.FieldInfo(
+ "totalDownloadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_UPLOAD_PRIORITY] = new StructBase.FieldInfo("uploadPriority", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_DOWNLOAD_COUNT] = new StructBase.FieldInfo(
+ "successDownloadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_STORE_PATH_COUNT] = new StructBase.FieldInfo("storePathCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_GET_META_COUNT] = new StructBase.FieldInfo(
+ "totalGetMetaCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUBDIR_COUNT_PER_PATH] = new StructBase.FieldInfo("subdirCountPerPath", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_GET_META_COUNT] = new StructBase.FieldInfo(
+ "successGetMetaCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_CURRENT_WRITE_PATH] = new StructBase.FieldInfo("currentWritePath", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_CREATE_LINK_COUNT] = new StructBase.FieldInfo(
+ "totalCreateLinkCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_STORAGE_PORT] = new StructBase.FieldInfo("storagePort", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_CREATE_LINK_COUNT] = new StructBase.FieldInfo(
+ "successCreateLinkCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_STORAGE_HTTP_PORT] = new StructBase.FieldInfo("storageHttpPort", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_DELETE_LINK_COUNT] = new StructBase.FieldInfo(
+ "totalDeleteLinkCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_CONNECTION_ALLOC_COUNT] = new StructBase.FieldInfo("connectionAllocCount", offset, 4);
- offset += 4;
+ fieldsArray[FIELD_INDEX_SUCCESS_DELETE_LINK_COUNT] = new StructBase.FieldInfo(
+ "successDeleteLinkCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_CONNECTION_CURRENT_COUNT] = new StructBase.FieldInfo("connectionCurrentCount", offset, 4);
- offset += 4;
+ fieldsArray[FIELD_INDEX_TOTAL_UPLOAD_BYTES] = new StructBase.FieldInfo(
+ "totalUploadBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_CONNECTION_MAX_COUNT] = new StructBase.FieldInfo("connectionMaxCount", offset, 4);
- offset += 4;
+ fieldsArray[FIELD_INDEX_SUCCESS_UPLOAD_BYTES] = new StructBase.FieldInfo(
+ "successUploadBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_UPLOAD_COUNT] = new StructBase.FieldInfo("totalUploadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_APPEND_BYTES] = new StructBase.FieldInfo(
+ "totalAppendBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUCCESS_UPLOAD_COUNT] = new StructBase.FieldInfo("successUploadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_APPEND_BYTES] = new StructBase.FieldInfo(
+ "successAppendBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_APPEND_COUNT] = new StructBase.FieldInfo("totalAppendCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_MODIFY_BYTES] = new StructBase.FieldInfo(
+ "totalModifyBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUCCESS_APPEND_COUNT] = new StructBase.FieldInfo("successAppendCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_MODIFY_BYTES] = new StructBase.FieldInfo(
+ "successModifyBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_MODIFY_COUNT] = new StructBase.FieldInfo("totalModifyCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_DOWNLOAD_BYTES] = new StructBase.FieldInfo(
+ "totalDownloadloadBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUCCESS_MODIFY_COUNT] = new StructBase.FieldInfo("successModifyCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_DOWNLOAD_BYTES] = new StructBase.FieldInfo(
+ "successDownloadloadBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_TRUNCATE_COUNT] = new StructBase.FieldInfo("totalTruncateCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_SYNC_IN_BYTES] = new StructBase.FieldInfo(
+ "totalSyncInBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUCCESS_TRUNCATE_COUNT] = new StructBase.FieldInfo("successTruncateCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_SYNC_IN_BYTES] = new StructBase.FieldInfo(
+ "successSyncInBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_SET_META_COUNT] = new StructBase.FieldInfo("totalSetMetaCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_SYNC_OUT_BYTES] = new StructBase.FieldInfo(
+ "totalSyncOutBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUCCESS_SET_META_COUNT] = new StructBase.FieldInfo("successSetMetaCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_SYNC_OUT_BYTES] = new StructBase.FieldInfo(
+ "successSyncOutBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_DELETE_COUNT] = new StructBase.FieldInfo("totalDeleteCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_FILE_OPEN_COUNT] = new StructBase.FieldInfo(
+ "totalFileOpenCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUCCESS_DELETE_COUNT] = new StructBase.FieldInfo("successDeleteCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_FILE_OPEN_COUNT] = new StructBase.FieldInfo(
+ "successFileOpenCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_DOWNLOAD_COUNT] = new StructBase.FieldInfo("totalDownloadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_FILE_READ_COUNT] = new StructBase.FieldInfo(
+ "totalFileReadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUCCESS_DOWNLOAD_COUNT] = new StructBase.FieldInfo("successDownloadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_FILE_READ_COUNT] = new StructBase.FieldInfo(
+ "successFileReadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_GET_META_COUNT] = new StructBase.FieldInfo("totalGetMetaCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_TOTAL_FILE_WRITE_COUNT] = new StructBase.FieldInfo(
+ "totalFileWriteCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUCCESS_GET_META_COUNT] = new StructBase.FieldInfo("successGetMetaCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_SUCCESS_FILE_WRITE_COUNT] = new StructBase.FieldInfo(
+ "successFileWriteCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_CREATE_LINK_COUNT] = new StructBase.FieldInfo("totalCreateLinkCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_LAST_SOURCE_UPDATE] = new StructBase.FieldInfo(
+ "lastSourceUpdate", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUCCESS_CREATE_LINK_COUNT] = new StructBase.FieldInfo("successCreateLinkCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_LAST_SYNC_UPDATE] = new StructBase.FieldInfo(
+ "lastSyncUpdate", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_DELETE_LINK_COUNT] = new StructBase.FieldInfo("totalDeleteLinkCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_LAST_SYNCED_TIMESTAMP] = new StructBase.FieldInfo(
+ "lastSyncedTimestamp", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_SUCCESS_DELETE_LINK_COUNT] = new StructBase.FieldInfo("successDeleteLinkCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_LAST_HEART_BEAT_TIME] = new StructBase.FieldInfo(
+ "lastHeartBeatTime", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
+ offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
- fieldsArray[FIELD_INDEX_TOTAL_UPLOAD_BYTES] = new StructBase.FieldInfo("totalUploadBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
+ fieldsArray[FIELD_INDEX_IF_TRUNK_FILE] = new StructBase.FieldInfo(
+ "ifTrunkServer", offset, 1);
+ offset += 1;
- fieldsArray[FIELD_INDEX_SUCCESS_UPLOAD_BYTES] = new StructBase.FieldInfo("successUploadBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_TOTAL_APPEND_BYTES] = new StructBase.FieldInfo("totalAppendBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_SUCCESS_APPEND_BYTES] = new StructBase.FieldInfo("successAppendBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_TOTAL_MODIFY_BYTES] = new StructBase.FieldInfo("totalModifyBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_SUCCESS_MODIFY_BYTES] = new StructBase.FieldInfo("successModifyBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_TOTAL_DOWNLOAD_BYTES] = new StructBase.FieldInfo("totalDownloadloadBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_SUCCESS_DOWNLOAD_BYTES] = new StructBase.FieldInfo("successDownloadloadBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_TOTAL_SYNC_IN_BYTES] = new StructBase.FieldInfo("totalSyncInBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_SUCCESS_SYNC_IN_BYTES] = new StructBase.FieldInfo("successSyncInBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_TOTAL_SYNC_OUT_BYTES] = new StructBase.FieldInfo("totalSyncOutBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_SUCCESS_SYNC_OUT_BYTES] = new StructBase.FieldInfo("successSyncOutBytes", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_TOTAL_FILE_OPEN_COUNT] = new StructBase.FieldInfo("totalFileOpenCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_SUCCESS_FILE_OPEN_COUNT] = new StructBase.FieldInfo("successFileOpenCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_TOTAL_FILE_READ_COUNT] = new StructBase.FieldInfo("totalFileReadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_SUCCESS_FILE_READ_COUNT] = new StructBase.FieldInfo("successFileReadCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_TOTAL_FILE_WRITE_COUNT] = new StructBase.FieldInfo("totalFileWriteCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_SUCCESS_FILE_WRITE_COUNT] = new StructBase.FieldInfo("successFileWriteCount", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_LAST_SOURCE_UPDATE] = new StructBase.FieldInfo("lastSourceUpdate", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_LAST_SYNC_UPDATE] = new StructBase.FieldInfo("lastSyncUpdate", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_LAST_SYNCED_TIMESTAMP] = new StructBase.FieldInfo("lastSyncedTimestamp", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_LAST_HEART_BEAT_TIME] = new StructBase.FieldInfo("lastHeartBeatTime", offset, ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE);
- offset += ProtoCommon.FDFS_PROTO_PKG_LEN_SIZE;
-
- fieldsArray[FIELD_INDEX_IF_TRUNK_FILE] = new StructBase.FieldInfo("ifTrunkServer", offset, 1);
- offset += 1;
-
- return offset;
+ return offset;
}
protected byte status;
+ protected byte readWriteMode;
protected String id;
protected String ipAddr;
protected String srcId;
- protected String domainName; //http domain name
protected String version;
protected long totalMB; //total disk storage in MB
protected long freeMB; //free disk storage in MB
@@ -290,7 +349,6 @@ public class StructStorageStat extends StructBase {
protected int storePathCount; //store base path count of each storage server
protected int subdirCountPerPath;
protected int storagePort;
- protected int storageHttpPort; //storage http server port
protected int currentWritePath; //current write path index
protected int connectionAllocCount;
protected int connectionCurrentCount;
@@ -348,6 +406,15 @@ public class StructStorageStat extends StructBase {
return this.status;
}
+ /**
+ * get the read write mode
+ *
+ * @return the read write mode
+ */
+ public byte getReadWriteMode() {
+ return this.readWriteMode;
+ }
+
/**
* get storage server id
*
@@ -375,15 +442,6 @@ public class StructStorageStat extends StructBase {
return this.srcId;
}
- /**
- * get the domain name of the storage server
- *
- * @return the domain name of the storage server
- */
- public String getDomainName() {
- return this.domainName;
- }
-
/**
* get storage version
*
@@ -465,15 +523,6 @@ public class StructStorageStat extends StructBase {
return this.storagePort;
}
- /**
- * get storage server HTTP port
- *
- * @return storage server HTTP port
- */
- public int getStorageHttpPort() {
- return this.storageHttpPort;
- }
-
/**
* get current write path index
*
@@ -905,10 +954,10 @@ public class StructStorageStat extends StructBase {
*/
protected void setFields(StructBase.FieldInfo[] fieldsArray, byte[] bs, int offset) {
this.status = byteValue(bs, offset, fieldsArray[FIELD_INDEX_STATUS]);
+ this.readWriteMode = byteValue(bs, offset, fieldsArray[FIELD_INDEX_RW_MODE]);
this.id = stringValue(bs, offset, fieldsArray[FIELD_INDEX_ID]);
this.ipAddr = stringValue(bs, offset, fieldsArray[FIELD_INDEX_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]);
this.freeMB = longValue(bs, offset, fieldsArray[FIELD_INDEX_FREE_MB]);
@@ -918,7 +967,6 @@ public class StructStorageStat extends StructBase {
this.storePathCount = intValue(bs, offset, fieldsArray[FIELD_INDEX_STORE_PATH_COUNT]);
this.subdirCountPerPath = intValue(bs, offset, fieldsArray[FIELD_INDEX_SUBDIR_COUNT_PER_PATH]);
this.storagePort = intValue(bs, offset, fieldsArray[FIELD_INDEX_STORAGE_PORT]);
- this.storageHttpPort = intValue(bs, offset, fieldsArray[FIELD_INDEX_STORAGE_HTTP_PORT]);
this.currentWritePath = intValue(bs, offset, fieldsArray[FIELD_INDEX_CURRENT_WRITE_PATH]);
this.connectionAllocCount = int32Value(bs, offset, fieldsArray[FIELD_INDEX_CONNECTION_ALLOC_COUNT]);
diff --git a/src/test/java/org/csource/fastdfs/Monitor.java b/src/test/java/org/csource/fastdfs/Monitor.java
index f7ed189..2ccf317 100644
--- a/src/test/java/org/csource/fastdfs/Monitor.java
+++ b/src/test/java/org/csource/fastdfs/Monitor.java
@@ -14,12 +14,28 @@ import java.text.SimpleDateFormat;
* load test class
*
* @author Happy Fish / YuQing
- * @version Version 1.20
+ * @version Version 1.34
*/
public class Monitor {
private Monitor() {
}
+ public static String getReadWriteModeCaption(byte readWriteMode) {
+
+ switch (readWriteMode) {
+ case ProtoCommon.FDFS_RW_MODE_NONE:
+ return "none (disabled)";
+ case ProtoCommon.FDFS_RW_MODE_READONLY:
+ return "readonly";
+ case ProtoCommon.FDFS_RW_MODE_WRITEONLY:
+ return "writeonly";
+ case ProtoCommon.FDFS_RW_MODE_BOTH:
+ return "both (normal)";
+ default:
+ return "unkown";
+ }
+ }
+
/**
* entry point
*
@@ -71,9 +87,9 @@ public class Monitor {
System.out.println("disk free space = " + groupStat.getFreeMB() + " MB");
System.out.println("trunk free space = " + groupStat.getTrunkFreeMB() + " MB");
System.out.println("storage server count = " + groupStat.getStorageCount());
- System.out.println("active server count = " + groupStat.getActiveCount());
+ System.out.println("readable server count = " + groupStat.getReadableServerCount());
+ System.out.println("writable server count = " + groupStat.getWritableServerCount());
System.out.println("storage server port = " + groupStat.getStoragePort());
- System.out.println("storage HTTP port = " + groupStat.getStorageHttpPort());
System.out.println("store path count = " + groupStat.getStorePathCount());
System.out.println("subdir count per path = " + groupStat.getSubdirCountPerPath());
System.out.println("current write server index = " + groupStat.getCurrentWriteServer());
@@ -93,8 +109,9 @@ public class Monitor {
stroageCount++;
System.out.println("\tStorage " + stroageCount + ":");
System.out.println("\t\tstorage id = " + storageStat.getId());
- System.out.println("\t\tip_addr = " + storageStat.getIpAddr() + " " + ProtoCommon.getStorageStatusCaption(storageStat.getStatus()));
- System.out.println("\t\thttp domain = " + storageStat.getDomainName());
+ System.out.println("\t\tip_addr = " + storageStat.getIpAddr() + " " +
+ ProtoCommon.getStorageStatusCaption(storageStat.getStatus()));
+ System.out.println("\t\tread write mode = " + getReadWriteModeCaption(storageStat.getReadWriteMode()));
System.out.println("\t\tversion = " + storageStat.getVersion());
System.out.println("\t\tjoin time = " + df.format(storageStat.getJoinTime()));
System.out.println("\t\tup time = " + (storageStat.getUpTime().getTime() == 0 ? "" : df.format(storageStat.getUpTime())));
@@ -104,7 +121,6 @@ public class Monitor {
System.out.println("\t\tstore_path_count = " + storageStat.getStorePathCount());
System.out.println("\t\tsubdir_count_per_path = " + storageStat.getSubdirCountPerPath());
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_id = " + storageStat.getSrcId());
System.out.println("\t\tif_trunk_server = " + storageStat.isTrunkServer());