• getDetail()
    • 语法
    • 返回值
    • 错误
    • 示例

    getDetail()

    语法

    rg.getDetail()

    获取当前分区组信息。

    返回值

    返回当前分区组详细信息,类型为 json 对象。

    错误

    错误码

    示例

    获取 group1 分区组的详细信息,该分区组存在3个节点。字段信息解释可参考分区组列表章节。

    1. > var rg = db.getRG("group1")
    2. > rg.getDetail()
    3. {
    4. "Group": [
    5. {
    6. "HostName": "hostname1",
    7. "Status": 1,
    8. "dbpath": "/opt/sequoiadb/database/data/11830/",
    9. "Service": [
    10. {
    11. "Type": 0,
    12. "Name": "11830"
    13. },
    14. {
    15. "Type": 1,
    16. "Name": "11831"
    17. },
    18. {
    19. "Type": 2,
    20. "Name": "11832"
    21. }
    22. ],
    23. "NodeID": 1002
    24. },
    25. {
    26. "HostName": "hostname2",
    27. "Status": 1,
    28. "dbpath": "/opt/sequoiadb/database/data/11840/",
    29. "Service": [
    30. {
    31. "Type": 0,
    32. "Name": "11840"
    33. },
    34. {
    35. "Type": 1,
    36. "Name": "11841"
    37. },
    38. {
    39. "Type": 2,
    40. "Name": "11842"
    41. }
    42. ],
    43. "NodeID": 1004
    44. },
    45. {
    46. "HostName": "hostname3",
    47. "Status": 1,
    48. "dbpath": "/opt/sequoiadb/database/data/11850/",
    49. "Service": [
    50. {
    51. "Type": 0,
    52. "Name": "11850"
    53. },
    54. {
    55. "Type": 1,
    56. "Name": "11851"
    57. },
    58. {
    59. "Type": 2,
    60. "Name": "11852"
    61. }
    62. ],
    63. "NodeID": 1006
    64. }
    65. ],
    66. "GroupID": 1002,
    67. "GroupName": "group1",
    68. "PrimaryNode": 1004,
    69. "Role": 0,
    70. "Status": 1,
    71. "Version": 7,
    72. "_id": {
    73. "$oid": "580043577e70618777a2cf39"
    74. }
    75. }